Plugin Directory

Changeset 2359404


Ignore:
Timestamp:
08/12/2020 07:46:30 PM (6 years ago)
Author:
mpntod
Message:

Internationalisation

Location:
page-hierarchy-plug-in/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • page-hierarchy-plug-in/trunk/ldpagehierarchy.php

    r1842134 r2359404  
    44Description: An easy widget to let you show a clickable list of pages below a particular 'parent' page on your site
    55Author: Martin Tod
    6 Version: 2.0.6
     6Version: 2.0.7
    77
    88*/
     
    6060        $options = get_option('widget_subpagehierarchy');
    6161        if ( !is_array($options) )
    62             $options = array('title'=>__('New title','subpagehierarchy'), 'headpage'=>'0');
     62            $options = array('title'=>__('New title','page-hierarchy-plug-in'), 'headpage'=>'0');
    6363        if ( $_POST['subpagehierarchy-submit'] ) {
    6464
     
    7474        // Here is our little form segment. Notice that we don't need a
    7575        // complete form. This will be embedded into the existing form.
    76         echo '<p style="text-align:right;"><label for="subpagehierarchy-title">'.__('Title:', 'subpagehierarchy').' <input style="width: 200px;" id="subpagehierarchy-title" name="subpagehierarchy-title" type="text" value="'.$title.'" /></label></p>';
     76        echo '<p style="text-align:right;"><label for="subpagehierarchy-title">'.__('Title:', 'page-hierarchy-plug-in').' <input style="width: 200px;" id="subpagehierarchy-title" name="subpagehierarchy-title" type="text" value="'.$title.'" /></label></p>';
    7777        // Get the details for the drop down box
    7878        $dropargs = array(
     
    8383        $pages = get_pages();
    8484        if(!empty($pages)):
    85             echo '<p style="text-align:right;"><label for="subpagehierarchy-headpage">'. __('Head page:', 'subpagehierarchy');
     85            echo '<p style="text-align:right;"><label for="subpagehierarchy-headpage">'. __('Head page:', 'page-hierarchy-plug-in');
    8686            wp_dropdown_pages( $dropargs );
    8787            echo '</label></p>';
    8888        else:
    89             echo '<p style="text-align:right;"><em>'.__('To use this widget, please add some pages to your site.','subpagehierarchy').'</em></p>';
     89            echo '<p style="text-align:right;"><em>'.__('To use this widget, please add some pages to your site.','page-hierarchy-plug-in').'</em></p>';
    9090        endif;
    9191        echo '<input type="hidden" id="subpagehierarchy-submit" name="subpagehierarchy-submit" value="1" />';
     
    9393    // This registers our widget so it appears with the other available
    9494    // widgets and can be dragged and dropped into any active sidebars.
    95     wp_register_sidebar_widget('ldpagehierarchy', __('Sub page hierarchy [old]','subpagehierarchy'), 'widget_subpagehierarchy', array('description'=> __( 'Adds a sidebar widget to let you show the list of pages beneath a particular page on your site.', 'subpagehierarchy' )));
     95    wp_register_sidebar_widget('ldpagehierarchy', __('Sub page hierarchy [old]','page-hierarchy-plug-in'), 'widget_subpagehierarchy', array('description'=> __( 'Adds a sidebar widget to let you show the list of pages beneath a particular page on your site.', 'page-hierarchy-plug-in' )));
    9696
    9797    // This registers our optional widget control form. Because of this
    9898    // our widget will have a button that reveals a 300x100 pixel form.
    99     wp_register_widget_control('ldpagehierarchy', __('Sub page hierarchy [old]','subpagehierarchy'), 'widget_subpagehierarchy_control');
     99    wp_register_widget_control('ldpagehierarchy', __('Sub page hierarchy [old]','page-hierarchy-plug-in'), 'widget_subpagehierarchy_control');
    100100}
    101101
     
    117117        parent::__construct(
    118118            'subpagehierarchy_widget', // Base ID
    119             __('Sub page hierarchy', 'subpagehierarchy'), // Name
     119            __('Sub page hierarchy', 'page-hierarchy-plug-in'), // Name
    120120            array(
    121                 'description' => __( 'Adds a sidebar widget to let you show the list of pages beneath a particular page on your site.', 'subpagehierarchy' ),
     121                'description' => __( 'Adds a sidebar widget to let you show the list of pages beneath a particular page on your site.', 'page-hierarchy-plug-in' ),
    122122                'customize_selective_refresh' => true,
    123123            ) // Args
     
    163163        $options = get_option('widget_subpagehierarchy');
    164164        if ( !isset($instance['title']) ):
    165             $instance = array('title'=>__('','subpagehierarchy') , 'headpage'=> 0 );
     165            $instance = array('title'=>__('','page-hierarchy-plug-in') , 'headpage'=> 0 );
    166166        endif;
    167167        $title = $instance['title'];
     
    177177        ?>
    178178        <p>
    179         <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:','subpagehierarchy' ); ?></label>
     179        <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:','page-hierarchy-plug-in' ); ?></label>
    180180        <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>">
    181181        </p>
     
    189189        if(!empty($pages)):
    190190        ?>
    191             <p><label for="<?php $this->get_field_id( 'headpage' ) ?>"><?php _e('Head page:', 'subpagehierarchy'); ?></label>
     191            <p><label for="<?php $this->get_field_id( 'headpage' ) ?>"><?php _e('Head page:', 'page-hierarchy-plug-in'); ?></label>
    192192            <?php
    193193            wp_dropdown_pages( $dropargs );
     
    195195        else:
    196196            ?>
    197             <p class="widefat"><em><?php _e('To use this widget, please add some pages to your site.','subpagehierarchy'); ?></em></p>
     197            <p class="widefat"><em><?php _e('To use this widget, please add some pages to your site.','page-hierarchy-plug-in'); ?></em></p>
    198198            <?php
    199199        endif;
     
    201201        if($depth) $depthchecked = 'checked="checked"';
    202202        ?>
    203         <p><input id="<?php echo $this->get_field_id( 'depth' ); ?>" name="<?php echo $this->get_field_name( 'depth' ); ?>" type="checkbox" value="1" <?php echo $depthchecked ?>><label for="<?php echo $this->get_field_id( 'depth' ); ?>"><?php _e( 'Only show top level pages','subpagehierarchy' ); ?></label></p>
     203        <p><input id="<?php echo $this->get_field_id( 'depth' ); ?>" name="<?php echo $this->get_field_name( 'depth' ); ?>" type="checkbox" value="1" <?php echo $depthchecked ?>><label for="<?php echo $this->get_field_id( 'depth' ); ?>"><?php _e( 'Only show top level pages','page-hierarchy-plug-in' ); ?></label></p>
    204204        <?php
    205205        $linkheadchecked = '';
    206206        if($linkhead) $linkheadchecked = 'checked="checked"';
    207207        ?>
    208         <p><input id="<?php echo $this->get_field_id( 'linkhead' ); ?>" name="<?php echo $this->get_field_name( 'linkhead' ); ?>" type="checkbox" value="1" <?php echo $linkheadchecked ?>><label for="<?php echo $this->get_field_id( 'depth' ); ?>"><?php _e( "Link the title to the 'head page'",'subpagehierarchy' ); ?></label></p>
     208        <p><input id="<?php echo $this->get_field_id( 'linkhead' ); ?>" name="<?php echo $this->get_field_name( 'linkhead' ); ?>" type="checkbox" value="1" <?php echo $linkheadchecked ?>><label for="<?php echo $this->get_field_id( 'depth' ); ?>"><?php _e( "Link the title to the 'head page'",'page-hierarchy-plug-in' ); ?></label></p>
    209209        <?php
    210210    }
  • page-hierarchy-plug-in/trunk/readme.txt

    r2358823 r2359404  
    66Tested up to: 5.5
    77Author URI: http://www.martintod.org.uk/
    8 Stable tag: 2.0.6
     8Stable tag: 2.0.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737
    3838== Upgrade notice ==
    39 = 2.0.6 =
    40 * Support for selective refresh
     39= 2.0.7 =
     40* Support for internationalisation
    4141
    4242== Changelog ==
    43 = 2.0.6 =
     43= 2.0.7 =
    4444* Support for selective refresh
    4545
Note: See TracChangeset for help on using the changeset viewer.