Changeset 758 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/inc/widgets.php
- Timestamp:
- 07/23/2014 06:52:58 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/inc/widgets.php
r708 r758 12 12 class WCB_Widget_Sponsors extends WP_Widget { 13 13 14 protected $textdomain = ''; // @see __construct()15 16 14 function __construct() { 17 global $wcpt_plugin;18 $this->textdomain = $wcpt_plugin->textdomain;19 20 15 $widget_ops = array( 21 16 'classname' => 'wcb_widget_sponsors', 22 'description' => __( 'Your WordCamp’s Sponsors', $this->textdomain),17 'description' => __( 'Your WordCamp’s Sponsors', 'wordcamporg' ), 23 18 ); 24 $this->WP_Widget( 'wcb_sponsors', __( 'Sponsors', $this->textdomain), $widget_ops );19 $this->WP_Widget( 'wcb_sponsors', __( 'Sponsors', 'wordcamporg' ), $widget_ops ); 25 20 } 26 21 … … 87 82 $title = $instance['title']; 88 83 ?> 89 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain); ?> <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 ); ?>" /></label></p>84 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'wordcamporg' ); ?> <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 ); ?>" /></label></p> 90 85 <?php 91 86 } … … 111 106 class WCPT_Widget_Speakers extends WP_Widget { 112 107 113 protected $textdomain = ''; // @see __construct()114 108 protected $cache_time = 3600; // seconds 115 109 116 110 function __construct() { 117 global $wcpt_plugin;118 $this->textdomain = $wcpt_plugin->textdomain;119 120 111 $widget_ops = array( 121 112 'classname' => 'wcpt_widget_speakers', 122 'description' => __( 'Your WordCamp’s Speakers', $this->textdomain),113 'description' => __( 'Your WordCamp’s Speakers', 'wordcamporg' ), 123 114 ); 124 $this->WP_Widget( 'wcpt_speakers', __( 'Speakers', $this->textdomain), $widget_ops );115 $this->WP_Widget( 'wcpt_speakers', __( 'Speakers', 'wordcamporg' ), $widget_ops ); 125 116 } 126 117 … … 160 151 $speakers_permalink = $wcpt_plugin->get_speakers_permalink(); 161 152 if ( ! empty( $speakers_permalink ) ) 162 printf( '<a class="wcpt-speakers-link" href="%s">%s</a>', esc_url( $speakers_permalink ), esc_html( __( 'View all speakers →', $this->textdomain) ) );153 printf( '<a class="wcpt-speakers-link" href="%s">%s</a>', esc_url( $speakers_permalink ), esc_html( __( 'View all speakers →', 'wordcamporg' ) ) ); 163 154 164 155 echo $args['after_widget']; … … 178 169 $random = (bool) $instance['random']; 179 170 ?> 180 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain); ?> <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 ); ?>" /></label></p>181 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of speakers to show:', $this->textdomain); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p>171 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'wordcamporg' ); ?> <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 ); ?>" /></label></p> 172 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of speakers to show:', 'wordcamporg' ); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p> 182 173 <p> 183 174 <input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id( 'random' ); ?>" name="<?php echo $this->get_field_name( 'random' ); ?>" <?php checked( $random ); ?> /> 184 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', $this->textdomain); ?></label>175 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', 'wordcamporg' ); ?></label> 185 176 </p> 186 177 … … 217 208 class WCPT_Widget_Sessions extends WP_Widget { 218 209 219 protected $textdomain = ''; // @see __construct()220 210 protected $cache_time = 3600; // seconds 221 211 222 212 function __construct() { 223 global $wcpt_plugin;224 $this->textdomain = $wcpt_plugin->textdomain;225 226 213 $widget_ops = array( 227 214 'classname' => 'wcpt_widget_sessions', 228 'description' => __( 'Show off your WordCamp sessions', $this->textdomain),215 'description' => __( 'Show off your WordCamp sessions', 'wordcamporg' ), 229 216 ); 230 $this->WP_Widget( 'wcpt_sessions', __( 'Sessions', $this->textdomain), $widget_ops );217 $this->WP_Widget( 'wcpt_sessions', __( 'Sessions', 'wordcamporg' ), $widget_ops ); 231 218 } 232 219 … … 270 257 $sessions_permalink = $wcpt_plugin->get_sessions_permalink(); 271 258 if ( ! empty( $sessions_permalink ) ) 272 printf( '<a class="wcpt-sessions-link" href="%s">%s</a>', esc_url( $sessions_permalink ), esc_html( __( 'View all sessions →', $this->textdomain) ) );259 printf( '<a class="wcpt-sessions-link" href="%s">%s</a>', esc_url( $sessions_permalink ), esc_html( __( 'View all sessions →', 'wordcamporg' ) ) ); 273 260 274 261 echo $args['after_widget']; … … 288 275 $random = (bool) $instance['random']; 289 276 ?> 290 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain); ?> <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 ); ?>" /></label></p>291 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of speakers to show:', $this->textdomain); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p>277 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'wordcamporg' ); ?> <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 ); ?>" /></label></p> 278 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of speakers to show:', 'wordcamporg' ); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p> 292 279 <p> 293 280 <input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id( 'random' ); ?>" name="<?php echo $this->get_field_name( 'random' ); ?>" <?php checked( $random ); ?> /> 294 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', $this->textdomain); ?></label>281 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', 'wordcamporg' ); ?></label> 295 282 </p> 296 283 … … 326 313 */ 327 314 class WCPT_Widget_Organizers extends WP_Widget { 328 329 protected $textdomain = ''; // @see __construct()330 315 protected $cache_time = 3600; // seconds 331 316 332 317 function __construct() { 333 global $wcpt_plugin;334 $this->textdomain = $wcpt_plugin->textdomain;335 336 318 $widget_ops = array( 337 319 'classname' => 'wcpt_widget_organizers', 338 'description' => __( 'Display your organizing team in the sidebar', $this->textdomain),320 'description' => __( 'Display your organizing team in the sidebar', 'wordcamporg' ), 339 321 ); 340 $this->WP_Widget( 'wcpt_organizers', __( 'Organizers', $this->textdomain), $widget_ops );322 $this->WP_Widget( 'wcpt_organizers', __( 'Organizers', 'wordcamporg' ), $widget_ops ); 341 323 } 342 324 … … 376 358 $organizers_permalink = $wcpt_plugin->get_organizers_permalink(); 377 359 if ( ! empty( $organizers_permalink ) ) 378 printf( '<a class="wcpt-organizers-link" href="%s">%s</a>', esc_url( $organizers_permalink ), esc_html( __( 'Organizing team →', $this->textdomain) ) );360 printf( '<a class="wcpt-organizers-link" href="%s">%s</a>', esc_url( $organizers_permalink ), esc_html( __( 'Organizing team →', 'wordcamporg' ) ) ); 379 361 380 362 echo $args['after_widget']; … … 394 376 $random = (bool) $instance['random']; 395 377 ?> 396 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', $this->textdomain); ?> <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 ); ?>" /></label></p>397 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of organizers to show:', $this->textdomain); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p>378 <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'wordcamporg' ); ?> <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 ); ?>" /></label></p> 379 <p><label for="<?php echo $this->get_field_id( 'count' ); ?>"><?php _e( 'Number of organizers to show:', 'wordcamporg' ); ?> <input type="text" size="3" id="<?php echo $this->get_field_id( 'count' ); ?>" name="<?php echo $this->get_field_name( 'count' ); ?>" value="<?php echo esc_attr( $count ); ?>" /></label></p> 398 380 <p> 399 381 <input class="checkbox" type="checkbox" id="<?php echo $this->get_field_id( 'random' ); ?>" name="<?php echo $this->get_field_name( 'random' ); ?>" <?php checked( $random ); ?> /> 400 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', $this->textdomain); ?></label>382 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php _e( 'Display in random order', 'wordcamporg' ); ?></label> 401 383 </p> 402 384
Note: See TracChangeset
for help on using the changeset viewer.