Plugin Directory

Changeset 776541


Ignore:
Timestamp:
09/21/2013 10:08:57 PM (13 years ago)
Author:
carbeck
Message:

Fixing another stupid thing, sorry

Location:
simple-interlinear-glosses
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • simple-interlinear-glosses/tags/0.2.2/cb_gloss.php

    r776540 r776541  
    33/* Plugin Name: Simple Interlinear Glosses
    44 * Plugin URI: http://benung.nfshost.com/archives/1721
    5 
     5 * Description: A WordPress shortcode to make simple interlinear glosses.
    66 * Author: Carsten Becker
    7  * Version: 0.2.2
     7 * Version: 2012-09-22
    88 * Author URI: http://sanstitre.nfshost.com
    99 *
     
    112112    /*** START HTML CONVERSION HERE ***/
    113113   
    114 
     114    $result = "<div class='cb-gloss' style='margin-bottom: 0em;'>\n";
    115115
    116116    // This will turn the whole thing into a definitions list
     
    151151} /* END fn_cb_glosses() */
    152152
    153 // Easy-peasy function to put arbitrary stuff between [smcp]…[/smcp] into small caps
    154 // (using the .smcp class defined in ./style.css) – Does NOT work in [gloss] block!
    155 // Use |…| there for explicit small caps.
     153add_shortcode('gloss', 'fn_cb_gloss');
    156154
    157 function fn_cb_smcp($content = null) {
    158     return "<span class='smcp'>" . $content . "</span>";
    159 } /* END fn_cb_smcp() */
     155// Register the plugin's style.css with WordPress, *properly*, as defined per WordPress Codex ...
    160156
    161 
    162 
    163 add_shortcode('gloss', 'fn_cb_gloss');
    164 add_shortcode('smcp', 'fn_cb_smcp');
    165 
    166 
    167 
    168 
     157add_action('wp_enqueue_scripts', 'add_cb_gloss_style');
    169158function add_cb_gloss_style() {
    170159    $myStyleUrl = plugins_url('style.css', __FILE__);
    171160    $myStyleFile = WP_PLUGIN_DIR . '/cb-gloss/style.css';
    172161    if ( file_exists($myStyleFile) ) {
    173         wp_register_style('cb-gloss', $myStyleUrl);
    174         wp_enqueue_style( 'cb-gloss');
     162        wp_register_style('myStyleSheets', $myStyleUrl);
     163        wp_enqueue_style( 'myStyleSheets');
    175164    }
    176165}
  • simple-interlinear-glosses/trunk/cb_gloss.php

    r776538 r776541  
    33/* Plugin Name: Simple Interlinear Glosses
    44 * Plugin URI: http://benung.nfshost.com/archives/1721
    5 
     5 * Description: A WordPress shortcode to make simple interlinear glosses.
    66 * Author: Carsten Becker
    7  * Version: 0.2.2
     7 * Version: 2012-09-22
    88 * Author URI: http://sanstitre.nfshost.com
    99 *
     
    112112    /*** START HTML CONVERSION HERE ***/
    113113   
    114 
     114    $result = "<div class='cb-gloss' style='margin-bottom: 0em;'>\n";
    115115
    116116    // This will turn the whole thing into a definitions list
     
    151151} /* END fn_cb_glosses() */
    152152
    153 // Easy-peasy function to put arbitrary stuff between [smcp]…[/smcp] into small caps
    154 // (using the .smcp class defined in ./style.css) – Does NOT work in [gloss] block!
    155 // Use |…| there for explicit small caps.
     153add_shortcode('gloss', 'fn_cb_gloss');
    156154
    157 function fn_cb_smcp($content = null) {
    158     return "<span class='smcp'>" . $content . "</span>";
    159 } /* END fn_cb_smcp() */
     155// Register the plugin's style.css with WordPress, *properly*, as defined per WordPress Codex ...
    160156
    161 
    162 
    163 add_shortcode('gloss', 'fn_cb_gloss');
    164 add_shortcode('smcp', 'fn_cb_smcp');
    165 
    166 
    167 
    168 
     157add_action('wp_enqueue_scripts', 'add_cb_gloss_style');
    169158function add_cb_gloss_style() {
    170159    $myStyleUrl = plugins_url('style.css', __FILE__);
    171160    $myStyleFile = WP_PLUGIN_DIR . '/cb-gloss/style.css';
    172161    if ( file_exists($myStyleFile) ) {
    173         wp_register_style('cb-gloss', $myStyleUrl);
    174         wp_enqueue_style( 'cb-gloss');
     162        wp_register_style('myStyleSheets', $myStyleUrl);
     163        wp_enqueue_style( 'myStyleSheets');
    175164    }
    176165}
Note: See TracChangeset for help on using the changeset viewer.