Changeset 1355

Show
Ignore:
Timestamp:
04/10/05 14:38:20 (3 years ago)
Author:
MtDewVirus
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • card-converter/branches/wp-1.5/card-converter.php

    r889 r1355  
    22/* 
    33Plugin Name: Card Converter 
    4 Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/ 
     4Plugin URI: http://mtdewvirus.com/code/ 
    55Description: Replace playing card abbreviations with a CSS playing card. Allows you to write <card>As</card>, but WP to display a CSS representation of the Ace of spades. 
    66Author: Nick Momrik 
    7 Version: 1.11 
     7Version: 1.13 
    88Author URI: http://mtdewvirus.com/ 
    99*/  
     
    8787} 
    8888 
    89 // CSS 
    90 function mdv_card_converter_head() { 
    91 echo "<style type='text/css'> 
    92       .redcardsuit, .blackcardsuit, .nocardsuit, .invalidcard { 
    93             padding: 0px 1px 0px 1px; 
    94             margin: 0px 1px 0px 1px; 
    95           background-color:#ffc; 
    96             border:1px solid #888; 
    97             font: 15px Courier; 
    98             line-height: 150%; 
    99       } 
    100       .redcardsuit { 
    101             color: red; 
    102       } 
    103       .blackcardsuit { 
    104             color: black; 
    105       } 
    106       .nocardsuit { 
    107             color: blue; 
    108       } 
    109 </style>"; 
     89function mdv_card_converter_css() { 
     90//Adds CSS to head 
     91echo <<<END 
     92      <style type='text/css'> 
     93            .redcardsuit, .blackcardsuit, .nocardsuit, .invalidcard { 
     94                  padding: 0px 1px 0px 1px; 
     95                  margin: 0px 1px 0px 1px; 
     96                  background-color:#ffc; 
     97                  border:1px solid #888; 
     98                  font: 15px Courier; 
     99                  line-height: 150%; 
     100            } 
     101            .redcardsuit { 
     102                  color: red; 
     103            } 
     104            .blackcardsuit { 
     105                  color: black; 
     106            } 
     107            .nocardsuit { 
     108                  color: blue; 
     109            } 
     110      </style> 
     111END; 
    110112} 
    111  
    112113 
    113114// Define custom tags to allow span tag 
     
    122123                        'b' => array(), 
    123124                        'blockquote' => array('cite' => array()), 
     125                        'card' => array(), 
    124126                        'code' => array(), 
    125127                        'em' => array(), 
     
    133135add_filter('the_excerpt', 'mdv_card_converter'); 
    134136add_filter('comment_text', 'mdv_card_converter', 9); 
    135 add_action('wp_head', 'mdv_card_converter_head'); 
     137add_action('wp_head', 'mdv_card_converter_css'); 
    136138?> 
  • card-converter/trunk/card-converter.php

    r889 r1355  
    22/* 
    33Plugin Name: Card Converter 
    4 Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/ 
     4Plugin URI: http://mtdewvirus.com/code/ 
    55Description: Replace playing card abbreviations with a CSS playing card. Allows you to write &lt;card&gt;As&lt;/card&gt;, but WP to display a CSS representation of the Ace of spades. 
    66Author: Nick Momrik 
    7 Version: 1.11 
     7Version: 1.13 
    88Author URI: http://mtdewvirus.com/ 
    99*/  
     
    8787} 
    8888 
    89 // CSS 
    90 function mdv_card_converter_head() { 
    91 echo "<style type='text/css'> 
    92       .redcardsuit, .blackcardsuit, .nocardsuit, .invalidcard { 
    93             padding: 0px 1px 0px 1px; 
    94             margin: 0px 1px 0px 1px; 
    95           background-color:#ffc; 
    96             border:1px solid #888; 
    97             font: 15px Courier; 
    98             line-height: 150%; 
    99       } 
    100       .redcardsuit { 
    101             color: red; 
    102       } 
    103       .blackcardsuit { 
    104             color: black; 
    105       } 
    106       .nocardsuit { 
    107             color: blue; 
    108       } 
    109 </style>"; 
     89function mdv_card_converter_css() { 
     90//Adds CSS to head 
     91echo <<<END 
     92      <style type='text/css'> 
     93            .redcardsuit, .blackcardsuit, .nocardsuit, .invalidcard { 
     94                  padding: 0px 1px 0px 1px; 
     95                  margin: 0px 1px 0px 1px; 
     96                  background-color:#ffc; 
     97                  border:1px solid #888; 
     98                  font: 15px Courier; 
     99                  line-height: 150%; 
     100            } 
     101            .redcardsuit { 
     102                  color: red; 
     103            } 
     104            .blackcardsuit { 
     105                  color: black; 
     106            } 
     107            .nocardsuit { 
     108                  color: blue; 
     109            } 
     110      </style> 
     111END; 
    110112} 
    111  
    112113 
    113114// Define custom tags to allow span tag 
     
    122123                        'b' => array(), 
    123124                        'blockquote' => array('cite' => array()), 
     125                        'card' => array(), 
    124126                        'code' => array(), 
    125127                        'em' => array(), 
     
    133135add_filter('the_excerpt', 'mdv_card_converter'); 
    134136add_filter('comment_text', 'mdv_card_converter', 9); 
    135 add_action('wp_head', 'mdv_card_converter_head'); 
     137add_action('wp_head', 'mdv_card_converter_css'); 
    136138?>