Changeset 884221
- Timestamp:
- 03/29/2014 03:44:25 PM (12 years ago)
- File:
-
- 1 edited
-
optimized-dropdown-menus/trunk/optimized-dm.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
optimized-dropdown-menus/trunk/optimized-dm.php
r638382 r884221 7 7 Author URI: http://maorchasen.com 8 8 Version: 1.1 9 Text Domain: optimized_dd 9 10 Tags: widget-only, widget, seo 10 11 License: GPL2 … … 49 50 // If no menus exists, direct the user to go and create some. 50 51 if ( !$menus ) { 51 echo '<p>'. sprintf( __('No menus have been created yet. <a href="%s">Create some</a>.' ), admin_url('nav-menus.php') ) .'</p>';52 echo '<p>'. sprintf( __('No menus have been created yet. <a href="%s">Create some</a>.', 'optimized_dd' ), admin_url('nav-menus.php') ) .'</p>'; 52 53 return; 53 54 } 54 55 ?> 55 56 <p> 56 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:' ) ?></label>57 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'optimized_dd') ?></label> 57 58 <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $title ); ?>" /> 58 59 </p> 59 60 <p> 60 <label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:' ); ?></label>61 <label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:', 'optimized_dd'); ?></label> 61 62 <select id="<?php echo $this->get_field_id('nav_menu'); ?>" name="<?php echo $this->get_field_name('nav_menu'); ?>"> 62 63 <?php … … 73 74 <p> 74 75 <input class="checkbox" type="checkbox" <?php echo ($html5 == 'on') ? 'checked="checked"' : ''; ?> id="<?php echo $this->get_field_id( 'html5' ); ?>" name="<?php echo $this->get_field_name( 'html5' ); ?>" /> 75 <label for="<?php echo $this->get_field_id( 'html5' ); ?>"> Use HTML5 <code><nav></code> element?</label>76 <label for="<?php echo $this->get_field_id( 'html5' ); ?>"> <?php echo sprintf( _x( 'Use HTML5 %s element?', '<nav>', 'optimized_dd' ), '<code><nav></code>' ); ?></label> 76 77 </p> 77 78 <?php … … 79 80 80 81 function update( $new_instance, $old_instance ) { 81 82 82 $instance['title'] = $new_instance['title']; 83 83 $instance['nav_menu'] = (int) $new_instance['nav_menu']; … … 125 125 add_action( 'widgets_init', array( $this, 'load_widget' ) ); 126 126 add_action( 'template_redirect', array( $this, 'setup_frontend_js' ) ); 127 // i18n 128 add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); 129 } 130 131 function load_textdomain() { 132 load_plugin_textdomain( 'optimized_dd', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 127 133 } 128 134
Note: See TracChangeset
for help on using the changeset viewer.