Changeset 2359404
- Timestamp:
- 08/12/2020 07:46:30 PM (6 years ago)
- Location:
- page-hierarchy-plug-in/trunk
- Files:
-
- 2 edited
-
ldpagehierarchy.php (modified) (11 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
page-hierarchy-plug-in/trunk/ldpagehierarchy.php
r1842134 r2359404 4 4 Description: An easy widget to let you show a clickable list of pages below a particular 'parent' page on your site 5 5 Author: Martin Tod 6 Version: 2.0. 66 Version: 2.0.7 7 7 8 8 */ … … 60 60 $options = get_option('widget_subpagehierarchy'); 61 61 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'); 63 63 if ( $_POST['subpagehierarchy-submit'] ) { 64 64 … … 74 74 // Here is our little form segment. Notice that we don't need a 75 75 // 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>'; 77 77 // Get the details for the drop down box 78 78 $dropargs = array( … … 83 83 $pages = get_pages(); 84 84 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'); 86 86 wp_dropdown_pages( $dropargs ); 87 87 echo '</label></p>'; 88 88 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>'; 90 90 endif; 91 91 echo '<input type="hidden" id="subpagehierarchy-submit" name="subpagehierarchy-submit" value="1" />'; … … 93 93 // This registers our widget so it appears with the other available 94 94 // 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' ))); 96 96 97 97 // This registers our optional widget control form. Because of this 98 98 // 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'); 100 100 } 101 101 … … 117 117 parent::__construct( 118 118 'subpagehierarchy_widget', // Base ID 119 __('Sub page hierarchy', ' subpagehierarchy'), // Name119 __('Sub page hierarchy', 'page-hierarchy-plug-in'), // Name 120 120 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' ), 122 122 'customize_selective_refresh' => true, 123 123 ) // Args … … 163 163 $options = get_option('widget_subpagehierarchy'); 164 164 if ( !isset($instance['title']) ): 165 $instance = array('title'=>__('',' subpagehierarchy') , 'headpage'=> 0 );165 $instance = array('title'=>__('','page-hierarchy-plug-in') , 'headpage'=> 0 ); 166 166 endif; 167 167 $title = $instance['title']; … … 177 177 ?> 178 178 <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> 180 180 <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 ); ?>"> 181 181 </p> … … 189 189 if(!empty($pages)): 190 190 ?> 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> 192 192 <?php 193 193 wp_dropdown_pages( $dropargs ); … … 195 195 else: 196 196 ?> 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> 198 198 <?php 199 199 endif; … … 201 201 if($depth) $depthchecked = 'checked="checked"'; 202 202 ?> 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> 204 204 <?php 205 205 $linkheadchecked = ''; 206 206 if($linkhead) $linkheadchecked = 'checked="checked"'; 207 207 ?> 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> 209 209 <?php 210 210 } -
page-hierarchy-plug-in/trunk/readme.txt
r2358823 r2359404 6 6 Tested up to: 5.5 7 7 Author URI: http://www.martintod.org.uk/ 8 Stable tag: 2.0. 68 Stable tag: 2.0.7 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 37 38 38 == Upgrade notice == 39 = 2.0. 6=40 * Support for selective refresh39 = 2.0.7 = 40 * Support for internationalisation 41 41 42 42 == Changelog == 43 = 2.0. 6=43 = 2.0.7 = 44 44 * Support for selective refresh 45 45
Note: See TracChangeset
for help on using the changeset viewer.