Plugin Directory

Changeset 361384


Ignore:
Timestamp:
03/17/2011 07:52:22 PM (14 years ago)
Author:
chetan
Message:

Styling is now automatic. Description updated.

Location:
small-caps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • small-caps/trunk/readme.txt

    r66131 r361384  
    44Tags: smallcaps, abbr, typography
    55Requires at least: 2.0.2
    6 Tested up to:
     6Tested up to: 3.1
    77Stable tag: trunk
    88
     
    1111== Description ==
    1212
    13 Encloses capitalized words with three or characters more within `<abbr> </abbr>` tags, so that abbr tags could be styled to display small caps&mdash;for typographical effect. More here: http://ckunte.com/archives/small-caps .
     13Encloses capitalized words with three or characters more within `<abbr> </abbr>` tags, so that abbr tags could be styled to display small caps&mdash;for typographical effect.
    1414
    1515== Installation ==
     
    17171. Upload `small-caps.php` to the `/wp-content/plugins/` folder.
    18182. Activate the plugin through the 'Plugins' menu in WordPress.
    19 3. Add the following styling to your style.css file:
     193. The following styling is now part of the plugin code:
    2020
    2121abbr { text-transform:lowercase; font-variant:small-caps }
    2222
    23 Optional: If you prefer this to be automatically added to the header of your template, across the themes without editing them yourself manually to add the above styling, then, you may uncomment lines 32 through to 38 in the plugin file `small-caps.php` .
     23Optional: If you prefer to custom-style the appearance of small caps, then, you may comment lines 27 through to 33 in the plugin file `small-caps.php`, and then add the custom styling in your theme's style.css file.
    2424
    2525== Frequently Asked Questions ==
  • small-caps/trunk/small-caps.php

    r59659 r361384  
    44Plugin URI: http://wordpress.org/extend/plugins/small-caps/
    55Description: Small caps for capitalized words. This plugin looks for sequences of 3 or more uppercase letters or numbers, such as CSS, HTML and W3C, and wraps an `&lt;abbr&gt;` tag around them. Credits to <a href="http://webtypography.net/">Webtypography</a> for the function, and for inspiration.
    6 Version: 1.0
    7 Author: Chetan Kunte
    8 Author URI: http://ckunte.com/
     6Version: 1.0.1
     7Author: Chyetanya Kunte
     8Author URI: http://ckunte.net/
    99*/
    1010//
     
    2323}
    2424//
    25 // Adding styling to template's head section.
    26 // Intentionally excluded for users' freedom to style.
    27 // See: http://ckunte.com/archives/small-caps
    28 //
    2925// Styling abbr to lowercase first, and then to small-caps.
    3026//
    31 // Uncomment following lines (take out those //s, if you prefer automatic styling as specified below.
    32 // function ckunte_smallcaps_wp_head () {
    33 //      echo "\n<style type=\"text/css\">abbr{text-transform:lowercase; font-variant:small-caps;}</style>\n";
    34 // }
    35 //
    36 // if (function_exists('add_action')) {
    37 //    add_action( 'wp_head', 'ckunte_smallcaps_wp_head' );
    38 // }
    39 //
     27function ckunte_smallcaps_wp_head () {
     28     echo "\n<style type=\"text/css\">abbr{text-transform:lowercase; font-variant:small-caps;}</style>\n";
     29}
     30
     31if (function_exists('add_action')) {
     32   add_action( 'wp_head', 'ckunte_smallcaps_wp_head' );
     33}
     34
    4035?>
Note: See TracChangeset for help on using the changeset viewer.