Changeset 776541
- Timestamp:
- 09/21/2013 10:08:57 PM (13 years ago)
- Location:
- simple-interlinear-glosses
- Files:
-
- 2 edited
-
tags/0.2.2/cb_gloss.php (modified) (3 diffs)
-
trunk/cb_gloss.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-interlinear-glosses/tags/0.2.2/cb_gloss.php
r776540 r776541 3 3 /* Plugin Name: Simple Interlinear Glosses 4 4 * Plugin URI: http://benung.nfshost.com/archives/1721 5 5 * Description: A WordPress shortcode to make simple interlinear glosses. 6 6 * Author: Carsten Becker 7 * Version: 0.2.27 * Version: 2012-09-22 8 8 * Author URI: http://sanstitre.nfshost.com 9 9 * … … 112 112 /*** START HTML CONVERSION HERE ***/ 113 113 114 114 $result = "<div class='cb-gloss' style='margin-bottom: 0em;'>\n"; 115 115 116 116 // This will turn the whole thing into a definitions list … … 151 151 } /* END fn_cb_glosses() */ 152 152 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. 153 add_shortcode('gloss', 'fn_cb_gloss'); 156 154 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 ... 160 156 161 162 163 add_shortcode('gloss', 'fn_cb_gloss'); 164 add_shortcode('smcp', 'fn_cb_smcp'); 165 166 167 168 157 add_action('wp_enqueue_scripts', 'add_cb_gloss_style'); 169 158 function add_cb_gloss_style() { 170 159 $myStyleUrl = plugins_url('style.css', __FILE__); 171 160 $myStyleFile = WP_PLUGIN_DIR . '/cb-gloss/style.css'; 172 161 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'); 175 164 } 176 165 } -
simple-interlinear-glosses/trunk/cb_gloss.php
r776538 r776541 3 3 /* Plugin Name: Simple Interlinear Glosses 4 4 * Plugin URI: http://benung.nfshost.com/archives/1721 5 5 * Description: A WordPress shortcode to make simple interlinear glosses. 6 6 * Author: Carsten Becker 7 * Version: 0.2.27 * Version: 2012-09-22 8 8 * Author URI: http://sanstitre.nfshost.com 9 9 * … … 112 112 /*** START HTML CONVERSION HERE ***/ 113 113 114 114 $result = "<div class='cb-gloss' style='margin-bottom: 0em;'>\n"; 115 115 116 116 // This will turn the whole thing into a definitions list … … 151 151 } /* END fn_cb_glosses() */ 152 152 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. 153 add_shortcode('gloss', 'fn_cb_gloss'); 156 154 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 ... 160 156 161 162 163 add_shortcode('gloss', 'fn_cb_gloss'); 164 add_shortcode('smcp', 'fn_cb_smcp'); 165 166 167 168 157 add_action('wp_enqueue_scripts', 'add_cb_gloss_style'); 169 158 function add_cb_gloss_style() { 170 159 $myStyleUrl = plugins_url('style.css', __FILE__); 171 160 $myStyleFile = WP_PLUGIN_DIR . '/cb-gloss/style.css'; 172 161 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'); 175 164 } 176 165 }
Note: See TracChangeset
for help on using the changeset viewer.