Changeset 1444846
- Timestamp:
- 06/28/2016 09:52:24 AM (10 years ago)
- File:
-
- 1 edited
-
wp-wadvisor/trunk/widget-wadvisor.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-wadvisor/trunk/widget-wadvisor.php
r1444809 r1444846 6 6 Author: JF Lefebvre 7 7 Version: 1.0 8 Requires at least: 3.9 8 9 Author URI: https://wadvisor.com/jeff 10 Text Domain: wp-wadvisor 9 11 */ 10 12 … … 17 19 register_widget( 'Wadvisor_Page_Widget' ); 18 20 }); 21 19 22 20 23 /** … … 31 34 parent::__construct( 32 35 'Wadvisor_Page_Widget', // Base ID 33 __(' wadvisor-page-widget-name', 'wp-wadvisor'), // Widget name will appear in UI34 array( 'description' => __(' wadvisor-page-widget-description', 'wp-wadvisor'), ) // Args36 __('Wadvisor page widget', 'wp-wadvisor'), // Widget name will appear in UI 37 array( 'description' => __('Generates a Wadvisor Page feed in your widget area.', 'wp-wadvisor'), ) // Args 35 38 ); 36 39 … … 140 143 $title = $instance[ 'title' ]; 141 144 } else { 142 $title = __(' wadvisor-page-widget-default-title', 'wp-wadvisor');145 $title = __('Widget Wadvisor', 'wp-wadvisor'); 143 146 } 144 147 if ( isset( $instance[ 'id' ] ) ) { … … 179 182 ?> 180 183 <p> 181 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e(' wadvisor-page-widget-label-title', 'wp-wadvisor'); ?></label>184 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e('Title:', 'wp-wadvisor'); ?></label> 182 185 <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 ); ?>" 183 186 </p> 184 187 <p> 185 <label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e(' wadvisor-page-widget-label-id', 'wp-wadvisor'); ?></label>188 <label for="<?php echo $this->get_field_id( 'id' ); ?>"><?php _e('Page id*:', 'wp-wadvisor'); ?></label> 186 189 <input class="widefat" id="<?php echo $this->get_field_id( 'id' ); ?>" name="<?php echo $this->get_field_name( 'id' ); ?>" type="text" value="<?php echo esc_attr( $id ); ?>" required="required"> 187 190 </p> 188 191 <p> 189 <label for="<?php echo $this->get_field_id( 'default_lang' ); ?>"><?php _e(' wadvisor-page-widget-label-default-language', 'wp-wadvisor'); ?></label>192 <label for="<?php echo $this->get_field_id( 'default_lang' ); ?>"><?php _e('Default language:', 'wp-wadvisor'); ?></label> 190 193 <select class="widefat" id="<?php echo $this->get_field_id( 'default_lang' ); ?>" name="<?php echo $this->get_field_name( 'default_lang' ); ?>"> 191 <option value=""><?php _e(' wadvisor-page-widget-label-language-auto', 'wp-wadvisor'); ?></option>192 <option value="fr-fr" <?php echo ($default_lang=='fr-fr')?'selected':''; ?>><?php _e(' wadvisor-page-widget-label-language-fr-fr', 'wp-wadvisor'); ?></option>193 <option value="en-us" <?php echo ($default_lang=='en-us')?'selected':''; ?>><?php _e(' wadvisor-page-widget-label-language-en-us', 'wp-wadvisor'); ?></option>194 <option value="en-gb" <?php echo ($default_lang=='en-gb')?'selected':''; ?>><?php _e(' wadvisor-page-widget-label-language-en-gb', 'wp-wadvisor'); ?></option>194 <option value=""><?php _e('Auto', 'wp-wadvisor'); ?></option> 195 <option value="fr-fr" <?php echo ($default_lang=='fr-fr')?'selected':''; ?>><?php _e('French (France)', 'wp-wadvisor'); ?></option> 196 <option value="en-us" <?php echo ($default_lang=='en-us')?'selected':''; ?>><?php _e('English (US)', 'wp-wadvisor'); ?></option> 197 <option value="en-gb" <?php echo ($default_lang=='en-gb')?'selected':''; ?>><?php _e('English (GB)', 'wp-wadvisor'); ?></option> 195 198 </select> 196 199 </p> 197 200 <p> 198 <label for="<?php echo $this->get_field_id( 'show_covers' ); ?>"><?php _e(' wadvisor-page-widget-label-show-covers', 'wp-wadvisor'); ?></label>201 <label for="<?php echo $this->get_field_id( 'show_covers' ); ?>"><?php _e('Show covers:', 'wp-wadvisor'); ?></label> 199 202 <input class="widefat" id="<?php echo $this->get_field_id( 'show_covers' ); ?>" name="<?php echo $this->get_field_name( 'show_covers' ); ?>" type="checkbox" value="true" <?php echo ($show_covers=='true')?'checked':''; ?>> 200 203 </p> 201 204 <p> 202 <label for="<?php echo $this->get_field_id( 'show_followers' ); ?>"><?php _e(' wadvisor-page-widget-label-show-followers', 'wp-wadvisor'); ?></label>205 <label for="<?php echo $this->get_field_id( 'show_followers' ); ?>"><?php _e('Show followers:', 'wp-wadvisor'); ?></label> 203 206 <input class="widefat" id="<?php echo $this->get_field_id( 'show_followers' ); ?>" name="<?php echo $this->get_field_name( 'show_followers' ); ?>" type="checkbox" value="true" <?php echo ($show_followers=='true')?'checked':''; ?>> 204 207 </p> 205 208 <p> 206 <label for="<?php echo $this->get_field_id( 'show_questions' ); ?>"><?php _e(' wadvisor-page-widget-label-show-questions', 'wp-wadvisor'); ?></label>209 <label for="<?php echo $this->get_field_id( 'show_questions' ); ?>"><?php _e('Show questions:', 'wp-wadvisor'); ?></label> 207 210 <input class="widefat" id="<?php echo $this->get_field_id( 'show_questions' ); ?>" name="<?php echo $this->get_field_name( 'show_questions' ); ?>" type="checkbox" value="true" <?php echo ($show_questions=='true')?'checked':''; ?>> 208 211 </p> 209 212 <p> 210 <label for="<?php echo $this->get_field_id( 'questions_limit' ); ?>"><?php _e(' wadvisor-page-widget-label-questions-limit', 'wp-wadvisor'); ?></label>213 <label for="<?php echo $this->get_field_id( 'questions_limit' ); ?>"><?php _e('Questions limit:', 'wp-wadvisor'); ?></label> 211 214 <input class="widefat" id="<?php echo $this->get_field_id( 'questions_limit' ); ?>" name="<?php echo $this->get_field_name( 'questions_limit' ); ?>" type="text" value="<?php echo esc_attr( $questions_limit ); ?>"> 212 215 </p> 213 216 <p> 214 <label for="<?php echo $this->get_field_id( 'questions_max_height' ); ?>"><?php _e(' wadvisor-page-widget-label-max-height', 'wp-wadvisor'); ?></label>217 <label for="<?php echo $this->get_field_id( 'questions_max_height' ); ?>"><?php _e('Questions max height:', 'wp-wadvisor'); ?></label> 215 218 <input class="widefat" id="<?php echo $this->get_field_id( 'questions_max_height' ); ?>" name="<?php echo $this->get_field_name( 'questions_max_height' ); ?>" type="text" value="<?php echo esc_attr( $questions_max_height ); ?>"> 216 219 </p>
Note: See TracChangeset
for help on using the changeset viewer.