Changeset 758
- Timestamp:
- 07/23/2014 06:52:58 PM (10 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/inc/back-compat.php
r2 r758 7 7 */ 8 8 class WordCamp_Post_Types_Plugin_Back_Compat { 9 protected $textdomain = '';10 9 protected $stylesheet = ''; 11 10 … … 39 38 global $wcpt_plugin; 40 39 41 // Keep the textdomain and keep a link to the main plugin object. 42 $this->textdomain = $wcpt_plugin->textdomain; 40 // Keep a link to the main plugin object. 43 41 $this->wcpt =& $wcpt_plugin; 44 42 … … 178 176 179 177 if ( ! empty( $speakers ) ) 180 $meta['speakers'] = sprintf( __( 'Presented by %s', $this->textdomain), esc_html( $speakers ) );178 $meta['speakers'] = sprintf( __( 'Presented by %s', 'wordcamporg' ), esc_html( $speakers ) ); 181 179 182 180 if ( ! empty( $track ) ) 183 $meta['track'] = sprintf( __( '%s Track', $this->textdomain), esc_html( $track ) );181 $meta['track'] = sprintf( __( '%s Track', 'wordcamporg' ), esc_html( $track ) ); 184 182 185 183 $track_url = get_term_link( $track, 'wcb_track' ); … … 319 317 320 318 if ( ! empty( $speakers ) ) 321 $meta['speakers'] = sprintf( __( 'Presented by %s', $this->textdomain), esc_html( $speakers ) );319 $meta['speakers'] = sprintf( __( 'Presented by %s', 'wordcamporg' ), esc_html( $speakers ) ); 322 320 323 321 if ( ! empty( $track ) ) 324 $meta['track'] = sprintf( __( '%s Track', $this->textdomain), esc_html( $track ) );322 $meta['track'] = sprintf( __( '%s Track', 'wordcamporg' ), esc_html( $track ) ); 325 323 326 324 $track_url = get_term_link( $track, 'wcb_track' ); -
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 -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
r723 r758 8 8 9 9 class WordCamp_Post_Types_Plugin { 10 public $textdomain = 'wordcampbase';11 10 12 11 /** … … 64 63 */ 65 64 function admin_menu() { 66 $page = add_submenu_page( 'edit.php?post_type=wcb_sponsor', __( 'Order Sponsor Levels', $this->textdomain ), __( 'Order Sponsor Levels', $this->textdomain), 'edit_posts', 'sponsor_levels', array( $this, 'render_order_sponsor_levels' ) );65 $page = add_submenu_page( 'edit.php?post_type=wcb_sponsor', __( 'Order Sponsor Levels', 'wordcamporg' ), __( 'Order Sponsor Levels', 'wordcamporg' ), 'edit_posts', 'sponsor_levels', array( $this, 'render_order_sponsor_levels' ) ); 67 66 68 67 add_action( "admin_print_scripts-$page", array( $this, 'enqueue_order_sponsor_levels_scripts' ) ); … … 88 87 <div class="wrap"> 89 88 <?php screen_icon(); ?> 90 <h2><?php _e( 'Order Sponsor Levels', $this->textdomain); ?></h2>89 <h2><?php _e( 'Order Sponsor Levels', 'wordcamporg' ); ?></h2> 91 90 92 91 <?php if ( false !== $_REQUEST['updated'] ) : ?> 93 <div class="updated fade"><p><strong><?php _e( 'Options saved', $this->textdomain); ?></strong></p></div>92 <div class="updated fade"><p><strong><?php _e( 'Options saved', 'wordcamporg' ); ?></strong></p></div> 94 93 <?php endif; ?> 95 94 … … 97 96 <?php settings_fields( 'wcb_sponsor_options' ); ?> 98 97 <div class="description sponsor-order-instructions"> 99 <?php _e( 'Change the order of sponsor levels are displayed in the sponsors page template.', $this->textdomain); ?>98 <?php _e( 'Change the order of sponsor levels are displayed in the sponsors page template.', 'wordcamporg' ); ?> 100 99 </div> 101 100 <ul class="sponsor-order"> … … 108 107 </ul> 109 108 <p class="submit"> 110 <input type="submit" class="button-primary" value="<?php _e( 'Save Options', $this->textdomain); ?>" />109 <input type="submit" class="button-primary" value="<?php _e( 'Save Options', 'wordcamporg' ); ?>" /> 111 110 </p> 112 111 </form> … … 853 852 // Add speakers and tracks to session meta. 854 853 if ( ! empty( $speakers_names ) && ! empty( $tracks_names ) ) 855 $session_meta .= sprintf( __( 'Presented by %1$s in %2$s.', $this->textdomain), implode( ', ', $speakers_names ), implode( ', ', $tracks_names ) );854 $session_meta .= sprintf( __( 'Presented by %1$s in %2$s.', 'wordcamporg' ), implode( ', ', $speakers_names ), implode( ', ', $tracks_names ) ); 856 855 elseif ( ! empty( $speakers_names ) ) 857 $session_meta .= sprintf( __( 'Presented by %s.', $this->textdomain), implode( ', ', $speakers_names ) );856 $session_meta .= sprintf( __( 'Presented by %s.', 'wordcamporg' ), implode( ', ', $speakers_names ) ); 858 857 elseif ( ! empty( $tracks_names ) ) 859 $session_meta .= sprintf( __( 'Presented in %s.', $this->textdomain), implode( ', ', $tracks_names ) );858 $session_meta .= sprintf( __( 'Presented in %s.', 'wordcamporg' ), implode( ', ', $tracks_names ) ); 860 859 861 860 if ( ! empty( $session_meta ) ) … … 957 956 */ 958 957 function add_meta_boxes() { 959 add_meta_box( 'speaker-info', __( 'Speaker Info', $this->textdomain), array( $this, 'metabox_speaker_info' ), 'wcb_speaker', 'side' );960 add_meta_box( 'organizer-info', __( 'Organizer Info', $this->textdomain), array( $this, 'metabox_organizer_info' ), 'wcb_organizer', 'side' );961 add_meta_box( 'speakers-list', __( 'Speakers', $this->textdomain), array( $this, 'metabox_speakers_list' ), 'wcb_session', 'side' );962 add_meta_box( 'session-info', __( 'Session Info', $this->textdomain), array( $this, 'metabox_session_info' ), 'wcb_session', 'side' );958 add_meta_box( 'speaker-info', __( 'Speaker Info', 'wordcamporg' ), array( $this, 'metabox_speaker_info' ), 'wcb_speaker', 'side' ); 959 add_meta_box( 'organizer-info', __( 'Organizer Info', 'wordcamporg' ), array( $this, 'metabox_organizer_info' ), 'wcb_organizer', 'side' ); 960 add_meta_box( 'speakers-list', __( 'Speakers', 'wordcamporg' ), array( $this, 'metabox_speakers_list' ), 'wcb_session', 'side' ); 961 add_meta_box( 'session-info', __( 'Session Info', 'wordcamporg' ), array( $this, 'metabox_session_info' ), 'wcb_session', 'side' ); 963 962 add_meta_box( 'sponsor-info', __( 'Sponsor Info', 'wordcampbase' ), array( $this, 'metabox_sponsor_info' ), 'wcb_sponsor', 'side' ); 964 963 } … … 979 978 <?php wp_nonce_field( 'edit-speaker-info', 'wcpt-meta-speaker-info' ); ?> 980 979 <p> 981 <label for="wcpt-gravatar-email"><?php _e( 'Gravatar Email:', $this->textdomain); ?></label>980 <label for="wcpt-gravatar-email"><?php _e( 'Gravatar Email:', 'wordcamporg' ); ?></label> 982 981 <input type="text" class="widefat" id="wcpt-gravatar-email" name="wcpt-gravatar-email" value="<?php echo esc_attr( $email ); ?>" /> 983 982 </p> 984 983 985 984 <p> 986 <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', $this->textdomain); ?></label>985 <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', 'wordcamporg' ); ?></label> 987 986 <input type="text" class="widefat" id="wcpt-wporg-username" name="wcpt-wporg-username" value="<?php echo esc_attr( $wporg_username ); ?>" /> 988 987 </p> … … 1004 1003 <?php wp_nonce_field( 'edit-organizer-info', 'wcpt-meta-organizer-info' ); ?> 1005 1004 <p> 1006 <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', $this->textdomain); ?></label>1005 <label for="wcpt-wporg-username"><?php _e( 'WordPress.org Username:', 'wordcamporg' ); ?></label> 1007 1006 <input type="text" class="widefat" id="wcpt-wporg-username" name="wcpt-wporg-username" value="<?php echo esc_attr( $wporg_username ); ?>" /> 1008 1007 </p> … … 1033 1032 <!--<input type="text" class="text" id="wcpt-speakers-list" name="wcpt-speakers-list" value="<?php echo esc_attr( $speakers ); ?>" />--> 1034 1033 <textarea class="large-text" placeholder="Start typing a name" id="wcpt-speakers-list" name="wcpt-speakers-list"><?php echo esc_textarea( $speakers ); ?></textarea> 1035 <p class="description"><?php _e( 'A speaker entry must exist first. Separate multiple speakers with commas.', $this->textdomain); ?></p>1034 <p class="description"><?php _e( 'A speaker entry must exist first. Separate multiple speakers with commas.', 'wordcamporg' ); ?></p> 1036 1035 <script> 1037 1036 jQuery(document).ready( function($) { … … 1087 1086 <?php wp_nonce_field( 'edit-session-info', 'wcpt-meta-session-info' ); ?> 1088 1087 <p> 1089 <label for="wcpt-session-time"><?php _e( 'When:', $this->textdomain); ?></label>1088 <label for="wcpt-session-time"><?php _e( 'When:', 'wordcamporg' ); ?></label> 1090 1089 <input type="text" class="widefat" id="wcpt-session-time" name="wcpt-session-time" value="<?php echo esc_attr( $session_time ); ?>" /> 1091 1090 <span style="display: block; margin-top: 4px;" class="description">For example: <?php echo date( 'Y-m-d H:i:s' ); ?></span> 1092 1091 </p> 1093 1092 <p> 1094 <label for="wcpt-session-type"><?php _e( 'Type:', $this->textdomain); ?></label>1093 <label for="wcpt-session-type"><?php _e( 'Type:', 'wordcamporg' ); ?></label> 1095 1094 <select id="wcpt-session-type" name="wcpt-session-type"> 1096 <option value="session" <?php selected( $session_type, 'session' ); ?>><?php _e( 'Regular Session', $this->textdomain); ?></option>1097 <option value="custom" <?php selected( $session_type, 'custom' ); ?>><?php _e( 'Break, Lunch, etc.', $this->textdomain); ?></option>1095 <option value="session" <?php selected( $session_type, 'session' ); ?>><?php _e( 'Regular Session', 'wordcamporg' ); ?></option> 1096 <option value="custom" <?php selected( $session_type, 'custom' ); ?>><?php _e( 'Break, Lunch, etc.', 'wordcamporg' ); ?></option> 1098 1097 </select> 1099 1098 </p> … … 1282 1281 // Speaker post type labels. 1283 1282 $labels = array( 1284 'name' => __( 'Speakers', $this->textdomain),1285 'singular_name' => __( 'Speaker', $this->textdomain),1286 'add_new' => __( 'Add New', $this->textdomain),1287 'add_new_item' => __( 'Create New Speaker', $this->textdomain),1288 'edit' => __( 'Edit', $this->textdomain),1289 'edit_item' => __( 'Edit Speaker', $this->textdomain),1290 'new_item' => __( 'New Speaker', $this->textdomain),1291 'view' => __( 'View Speaker', $this->textdomain),1292 'view_item' => __( 'View Speaker', $this->textdomain),1293 'search_items' => __( 'Search Speakers', $this->textdomain),1294 'not_found' => __( 'No speakers found', $this->textdomain),1295 'not_found_in_trash' => __( 'No speakers found in Trash', $this->textdomain),1296 'parent_item_colon' => __( 'Parent Speaker:', $this->textdomain),1283 'name' => __( 'Speakers', 'wordcamporg' ), 1284 'singular_name' => __( 'Speaker', 'wordcamporg' ), 1285 'add_new' => __( 'Add New', 'wordcamporg' ), 1286 'add_new_item' => __( 'Create New Speaker', 'wordcamporg' ), 1287 'edit' => __( 'Edit', 'wordcamporg' ), 1288 'edit_item' => __( 'Edit Speaker', 'wordcamporg' ), 1289 'new_item' => __( 'New Speaker', 'wordcamporg' ), 1290 'view' => __( 'View Speaker', 'wordcamporg' ), 1291 'view_item' => __( 'View Speaker', 'wordcamporg' ), 1292 'search_items' => __( 'Search Speakers', 'wordcamporg' ), 1293 'not_found' => __( 'No speakers found', 'wordcamporg' ), 1294 'not_found_in_trash' => __( 'No speakers found in Trash', 'wordcamporg' ), 1295 'parent_item_colon' => __( 'Parent Speaker:', 'wordcamporg' ), 1297 1296 ); 1298 1297 … … 1314 1313 // Session post type labels. 1315 1314 $labels = array( 1316 'name' => __( 'Sessions', $this->textdomain),1317 'singular_name' => __( 'Session', $this->textdomain),1318 'add_new' => __( 'Add New', $this->textdomain),1319 'add_new_item' => __( 'Create New Session', $this->textdomain),1320 'edit' => __( 'Edit', $this->textdomain),1321 'edit_item' => __( 'Edit Session', $this->textdomain),1322 'new_item' => __( 'New Session', $this->textdomain),1323 'view' => __( 'View Session', $this->textdomain),1324 'view_item' => __( 'View Session', $this->textdomain),1325 'search_items' => __( 'Search Sessions', $this->textdomain),1326 'not_found' => __( 'No sessions found', $this->textdomain),1327 'not_found_in_trash' => __( 'No sessions found in Trash', $this->textdomain),1328 'parent_item_colon' => __( 'Parent Session:', $this->textdomain),1315 'name' => __( 'Sessions', 'wordcamporg' ), 1316 'singular_name' => __( 'Session', 'wordcamporg' ), 1317 'add_new' => __( 'Add New', 'wordcamporg' ), 1318 'add_new_item' => __( 'Create New Session', 'wordcamporg' ), 1319 'edit' => __( 'Edit', 'wordcamporg' ), 1320 'edit_item' => __( 'Edit Session', 'wordcamporg' ), 1321 'new_item' => __( 'New Session', 'wordcamporg' ), 1322 'view' => __( 'View Session', 'wordcamporg' ), 1323 'view_item' => __( 'View Session', 'wordcamporg' ), 1324 'search_items' => __( 'Search Sessions', 'wordcamporg' ), 1325 'not_found' => __( 'No sessions found', 'wordcamporg' ), 1326 'not_found_in_trash' => __( 'No sessions found in Trash', 'wordcamporg' ), 1327 'parent_item_colon' => __( 'Parent Session:', 'wordcamporg' ), 1329 1328 ); 1330 1329 … … 1346 1345 // Sponsor post type labels. 1347 1346 $labels = array( 1348 'name' => __( 'Sponsors', $this->textdomain),1349 'singular_name' => __( 'Sponsor', $this->textdomain),1350 'add_new' => __( 'Add New', $this->textdomain),1351 'add_new_item' => __( 'Create New Sponsor', $this->textdomain),1352 'edit' => __( 'Edit', $this->textdomain),1353 'edit_item' => __( 'Edit Sponsor', $this->textdomain),1354 'new_item' => __( 'New Sponsor', $this->textdomain),1355 'view' => __( 'View Sponsor', $this->textdomain),1356 'view_item' => __( 'View Sponsor', $this->textdomain),1357 'search_items' => __( 'Search Sponsors', $this->textdomain),1358 'not_found' => __( 'No sponsors found', $this->textdomain),1359 'not_found_in_trash' => __( 'No sponsors found in Trash', $this->textdomain),1360 'parent_item_colon' => __( 'Parent Sponsor:', $this->textdomain),1347 'name' => __( 'Sponsors', 'wordcamporg' ), 1348 'singular_name' => __( 'Sponsor', 'wordcamporg' ), 1349 'add_new' => __( 'Add New', 'wordcamporg' ), 1350 'add_new_item' => __( 'Create New Sponsor', 'wordcamporg' ), 1351 'edit' => __( 'Edit', 'wordcamporg' ), 1352 'edit_item' => __( 'Edit Sponsor', 'wordcamporg' ), 1353 'new_item' => __( 'New Sponsor', 'wordcamporg' ), 1354 'view' => __( 'View Sponsor', 'wordcamporg' ), 1355 'view_item' => __( 'View Sponsor', 'wordcamporg' ), 1356 'search_items' => __( 'Search Sponsors', 'wordcamporg' ), 1357 'not_found' => __( 'No sponsors found', 'wordcamporg' ), 1358 'not_found_in_trash' => __( 'No sponsors found in Trash', 'wordcamporg' ), 1359 'parent_item_colon' => __( 'Parent Sponsor:', 'wordcamporg' ), 1361 1360 ); 1362 1361 … … 1378 1377 // Organizer post type labels. 1379 1378 $labels = array( 1380 'name' => __( 'Organizers', $this->textdomain),1381 'singular_name' => __( 'Organizer', $this->textdomain),1382 'add_new' => __( 'Add New', $this->textdomain),1383 'add_new_item' => __( 'Create New Organizer', $this->textdomain),1384 'edit' => __( 'Edit', $this->textdomain),1385 'edit_item' => __( 'Edit Organizer', $this->textdomain),1386 'new_item' => __( 'New Organizer', $this->textdomain),1387 'view' => __( 'View Organizer', $this->textdomain),1388 'view_item' => __( 'View Organizer', $this->textdomain),1389 'search_items' => __( 'Search Organizers', $this->textdomain),1390 'not_found' => __( 'No organizers found', $this->textdomain),1391 'not_found_in_trash' => __( 'No organizers found in Trash', $this->textdomain),1392 'parent_item_colon' => __( 'Parent Organizer:', $this->textdomain),1379 'name' => __( 'Organizers', 'wordcamporg' ), 1380 'singular_name' => __( 'Organizer', 'wordcamporg' ), 1381 'add_new' => __( 'Add New', 'wordcamporg' ), 1382 'add_new_item' => __( 'Create New Organizer', 'wordcamporg' ), 1383 'edit' => __( 'Edit', 'wordcamporg' ), 1384 'edit_item' => __( 'Edit Organizer', 'wordcamporg' ), 1385 'new_item' => __( 'New Organizer', 'wordcamporg' ), 1386 'view' => __( 'View Organizer', 'wordcamporg' ), 1387 'view_item' => __( 'View Organizer', 'wordcamporg' ), 1388 'search_items' => __( 'Search Organizers', 'wordcamporg' ), 1389 'not_found' => __( 'No organizers found', 'wordcamporg' ), 1390 'not_found_in_trash' => __( 'No organizers found in Trash', 'wordcamporg' ), 1391 'parent_item_colon' => __( 'Parent Organizer:', 'wordcamporg' ), 1393 1392 ); 1394 1393 … … 1415 1414 // Labels for tracks. 1416 1415 $labels = array( 1417 'name' => __( 'Tracks', $this->textdomain),1418 'singular_name' => __( 'Track', $this->textdomain),1419 'search_items' => __( 'Search Tracks', $this->textdomain),1420 'popular_items' => __( 'Popular Tracks', $this->textdomain),1421 'all_items' => __( 'All Tracks', $this->textdomain),1422 'edit_item' => __( 'Edit Track', $this->textdomain),1423 'update_item' => __( 'Update Track', $this->textdomain),1424 'add_new_item' => __( 'Add Track', $this->textdomain),1425 'new_item_name' => __( 'New Track', $this->textdomain),1416 'name' => __( 'Tracks', 'wordcamporg' ), 1417 'singular_name' => __( 'Track', 'wordcamporg' ), 1418 'search_items' => __( 'Search Tracks', 'wordcamporg' ), 1419 'popular_items' => __( 'Popular Tracks','wordcamporg' ), 1420 'all_items' => __( 'All Tracks', 'wordcamporg' ), 1421 'edit_item' => __( 'Edit Track', 'wordcamporg' ), 1422 'update_item' => __( 'Update Track', 'wordcamporg' ), 1423 'add_new_item' => __( 'Add Track', 'wordcamporg' ), 1424 'new_item_name' => __( 'New Track', 'wordcamporg' ), 1426 1425 ); 1427 1426 … … 1438 1437 // Labels for sponsor levels. 1439 1438 $labels = array( 1440 'name' => __( 'Sponsor Levels', $this->textdomain),1441 'singular_name' => __( 'Sponsor Level', $this->textdomain),1442 'search_items' => __( 'Search Sponsor Levels', $this->textdomain),1443 'popular_items' => __( 'Popular Sponsor Levels', $this->textdomain),1444 'all_items' => __( 'All Sponsor Levels', $this->textdomain),1445 'edit_item' => __( 'Edit Sponsor Level', $this->textdomain),1446 'update_item' => __( 'Update Sponsor Level', $this->textdomain),1447 'add_new_item' => __( 'Add Sponsor Level', $this->textdomain),1448 'new_item_name' => __( 'New Sponsor Level', $this->textdomain),1439 'name' => __( 'Sponsor Levels', 'wordcamporg' ), 1440 'singular_name' => __( 'Sponsor Level', 'wordcamporg' ), 1441 'search_items' => __( 'Search Sponsor Levels', 'wordcamporg' ), 1442 'popular_items' => __( 'Popular Sponsor Levels', 'wordcamporg' ), 1443 'all_items' => __( 'All Sponsor Levels', 'wordcamporg' ), 1444 'edit_item' => __( 'Edit Sponsor Level', 'wordcamporg' ), 1445 'update_item' => __( 'Update Sponsor Level', 'wordcamporg' ), 1446 'add_new_item' => __( 'Add Sponsor Level', 'wordcamporg' ), 1447 'new_item_name' => __( 'New Sponsor Level', 'wordcamporg' ), 1449 1448 ); 1450 1449 … … 1473 1472 case 'manage_wcb_organizer_posts_columns': 1474 1473 // Insert at offset 1, that's right after the checkbox. 1475 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_organizer_avatar' => __( 'Avatar', $this->textdomain) ) + array_slice( $columns, 1, null, true );1474 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_organizer_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true ); 1476 1475 break; 1477 1476 case 'manage_wcb_speaker_posts_columns': 1478 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_speaker_avatar' => __( 'Avatar', $this->textdomain) ) + array_slice( $columns, 1, null, true );1477 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_speaker_avatar' => __( 'Avatar', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true ); 1479 1478 break; 1480 1479 case 'manage_wcb_session_posts_columns': 1481 $columns = array_slice( $columns, 0, 2, true ) + array( 'wcb_session_speakers' => __( 'Speakers', $this->textdomain) ) + array_slice( $columns, 2, null, true );1482 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_session_time' => __( 'Time', $this->textdomain) ) + array_slice( $columns, 1, null, true );1480 $columns = array_slice( $columns, 0, 2, true ) + array( 'wcb_session_speakers' => __( 'Speakers', 'wordcamporg' ) ) + array_slice( $columns, 2, null, true ); 1481 $columns = array_slice( $columns, 0, 1, true ) + array( 'wcb_session_time' => __( 'Time', 'wordcamporg' ) ) + array_slice( $columns, 1, null, true ); 1483 1482 break; 1484 1483 default: … … 1556 1555 1557 1556 if ( 'session' == $session_type ) 1558 $states['wcpt-session-type'] = __( 'Session', $this->textdomain);1557 $states['wcpt-session-type'] = __( 'Session', 'wordcamporg' ); 1559 1558 elseif ( 'custom' == $session_type ) 1560 $states['wcpt-session-type'] = __( 'Custom', $this->textdomain);1559 $states['wcpt-session-type'] = __( 'Custom', 'wordcamporg' ); 1561 1560 1562 1561 return $states; … … 1578 1577 // Load the plugin class. 1579 1578 $GLOBALS['wcpt_plugin'] = new WordCamp_Post_Types_Plugin; 1579 1580 1581 /* 1582 $track_slugs = 'talks,workshops'; 1583 $transient_key = 'wcpt_track_speaker_ids_' . substr( md5( $track_slugs ), 0, 22 ); // discard trailing hash characters to stay within transient limit 1584 1585 if ( ! $speaker_ids = get_transient( $transient_key ) ) { 1586 $speaker_ids = array(); 1587 $track_sessions = get_posts( array( 1588 'post_type' => 'wcb_session', 1589 'numberposts' => -1, 1590 'tax_query' => array( 1591 array( 1592 'taxonomy' => 'wcb_track', 1593 'field' => 'slug', 1594 'terms' => explode( ',', $track_slugs ), 1595 ), 1596 ), 1597 ) ); 1598 1599 foreach ( $track_sessions as $session ) { 1600 $session_speaker_ids = get_post_meta( $session->ID, '_wcpt_speaker_id' ); 1601 $speaker_ids = array_merge( $speaker_ids, $session_speaker_ids ); 1602 } 1603 1604 //set_transient( $transient_key, $speaker_ids, HOUR_IN_SECONDS ); 1605 } 1606 1607 $speakers = get_posts( array( 1608 'post_type' => 'wcb_speaker', 1609 'numberposts' => -1, 1610 'post__in' => $speaker_ids, 1611 ) ); 1612 1613 var_dump( $track_slugs, $transient_key, $track_sessions, $speaker_ids, $speakers ); wp_die(''); 1614 */
Note: See TracChangeset
for help on using the changeset viewer.