WordPress.org

Plugin Directory

Changeset 610064


Ignore:
Timestamp:
10/09/12 15:24:33 (18 months ago)
Author:
joostdekeijzer
Message:

added help texts to edit pages

Location:
euro-fxref-currency-converter/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • euro-fxref-currency-converter/trunk/eurofxref.php

    r606594 r610064  
    3535        add_shortcode( 'currency', array( $this, 'currency_converter' ) ); 
    3636        add_shortcode( 'currency_legal', array( $this, 'legal_string' ) ); 
     37 
     38        add_action( 'admin_head', array( $this, 'insert_help_tab' )  ); 
    3739    } 
    3840 
     
    111113    } 
    112114 
     115 
     116    function insert_help_tab() { 
     117        global $post_type; 
     118        $screen = get_current_screen(); 
     119        if( 'post' != $screen->base || !post_type_supports($post_type, 'editor') ) return; 
     120     
     121        $id = __CLASS__ . '_help_id'; 
     122        $title = __( "Using the [currency] shortcodes", __CLASS__ ); 
     123        $help = <<<EOH 
     124<p><strong>currency</strong> shortcode examples:<br/> 
     125    <code>[currency from="EUR" to="GBP" amount="10"]</code><br/> 
     126    <code>[currency from="JPY" to="CHF" amount="750"]</code></p> 
     127<p>Full example with default values:<br/> 
     128    <code>[currency from="EUR" to="USD" amount="1" iso=false show_from=true between="&amp;nbsp;/&amp;nbsp;" append="&amp;nbsp;*" round=true round_append="=" to_style="cursor:help;border-bottom:1px dotted gray;"]</code></p> 
     129 
     130<p><strong>currency_legal</strong> shortcode examples:<br/> 
     131    <code>[currency_legal]</code><br/> 
     132    <code>[currency_legal prepend='* ']</code> (full example with default value)</p> 
     133<p>The legal text is:<br/> 
     134    'For informational purposes only. Exchange rates may vary. Based on <a href="http://www.ecb.europa.eu/stats/eurofxref/" target="_blank">ECB reference rates</a>.'</p> 
     135 
     136<p><strong>Need more help?</strong><br/> 
     137    Please visit <a href="http://wordpress.org/extend/plugins/euro-fxref-currency-converter/other_notes/" target="_blank">http://wordpress.org/extend/plugins/euro-fxref-currency-converter/other_notes/</a> for more examples and a full list of supported currencies.</p> 
     138EOH; 
     139 
     140        $screen->add_help_tab( array( 
     141            'id' => $id, 
     142            'title' => $title, 
     143            'content' => $help, 
     144        ) ); 
     145    } 
     146 
    113147    private function _loadEuroFxRef( $transient_label ) { 
    114148        //This is aPHP(5)script example on how eurofxref-daily.xml can be parsed 
  • euro-fxref-currency-converter/trunk/readme.txt

    r609478 r610064  
    55Requires at least: 3.3 
    66Tested up to:  3.4 
    7 Stable tag: 1.0 
     7Stable tag: 1.1 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    120120== Changelog == 
    121121 
     122= 1.1 = 
     123* added help text to edit pages 
     124 
    122125= 1.0 = 
    123126* first public version 
Note: See TracChangeset for help on using the changeset viewer.