Changeset 2877
- Timestamp:
- 04/01/2016 09:16:09 PM (9 years ago)
- Location:
- sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/views/wordcamp/metabox-status.php
r2824 r2877 45 45 <div class="clear"></div> 46 46 </div> <!-- #minor-publishing --> 47 48 47 49 48 <div id="major-publishing-actions"> 50 49 <div id="delete-action"> -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-admin.php
r171 r2877 85 85 */ 86 86 function admin_head () { 87 ?> 87 ?> 88 88 89 <style type="text/css" media="screen"> 89 /*<![CDATA[*/ 90 <?php 91 // Add extra actions to WordCamp Post Type admin header area 92 do_action( 'wcpt_admin_head' ); 93 ?> 90 /*<![CDATA[*/ 91 <?php 92 // Add extra actions to WordCamp Post Type admin header area 93 do_action( 'wcpt_admin_head' ); 94 ?> 95 /*]]>*/ 96 </style> 94 97 95 /*]]>*/ 96 </style> 97 <?php 98 <?php 98 99 } 99 100 … … 125 126 return false; 126 127 127 ?> 128 <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3> 129 <table class="form-table"> 130 <tr valign="top"> 131 <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th> 132 <td> 128 ?> 129 <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3> 133 130 134 </td> 135 </tr> 136 </table> 137 <?php 131 <table class="form-table"> 132 <tr valign="top"> 133 <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th> 134 <td> 135 136 </td> 137 </tr> 138 </table> 139 <?php 138 140 139 141 // Add extra actions to WordCamp Post Type profile update … … 171 173 // Loop through menu order and do some rearranging 172 174 foreach ( $menu_order as $index => $item ) { 173 174 175 // Current item is our forum CPT, so set our separator here 175 176 if ( ( ( 'edit.php?post_type=' . WCPT_POST_TYPE_ID ) == $item ) ) { … … 181 182 if ( !in_array( $item, array( 'separator-wcpt' ) ) ) 182 183 $wcpt_menu_order[] = $item; 183 184 184 } 185 185 -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-functions.php
r2847 r2877 44 44 */ 45 45 function wcpt_has_access () { 46 47 46 if ( is_super_admin () ) 48 47 $has_access = true; -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-loader.php
r2838 r2877 83 83 84 84 // Load everything up 85 $wcpt_loader = new WCPT_Loader;85 $wcpt_loader = new WCPT_Loader; 86 86 $wordcamp_loader = new WordCamp_Loader; -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r2876 r2877 123 123 $statuses = WordCamp_Loader::get_post_statuses(); 124 124 125 add_meta_box( 'submitdiv', __( 'Status', 'wordcamporg' ), array( $this, 'metabox_status' ), 126 WCPT_POST_TYPE_ID, 'side', 'high' ); 125 add_meta_box( 126 'submitdiv', 127 __( 'Status', 'wordcamporg' ), 128 array( $this, 'metabox_status' ), 129 WCPT_POST_TYPE_ID, 130 'side', 131 'high' 132 ); 127 133 } 128 134 … … 136 142 */ 137 143 function metabox_save( $post_id, $post ) { 138 139 144 // Don't add/remove meta on revisions and auto-saves 140 145 if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) … … 166 171 // Loop through meta keys and update 167 172 foreach ( $wcpt_meta_keys as $key => $value ) { 168 169 173 // Get post value 170 174 $post_value = wcpt_key_to_str( $key, 'wcpt_' ); … … 224 228 } 225 229 226 227 230 /** 228 231 * Geocode the given address into a latitude and longitude pair. … … 261 264 */ 262 265 function meta_keys( $meta_group = '' ) { 263 264 266 /* 265 267 * Warning: These keys are used for both the input field label and the postmeta key, so if you want to … … 276 278 case 'organizer': 277 279 $retval = array ( 278 'Organizer Name' => 'text',279 'WordPress.org Username' => 'text',280 'Email Address' => 'text',// Note: This is the lead organizer's e-mail address, which is different than the "E-mail Address" field281 'Telephone' => 'text',282 'Mailing Address' => 'textarea',283 'Sponsor Wrangler Name' => 'text',284 'Sponsor Wrangler E-mail Address' => 'text',285 'Budget Wrangler Name' => 'text',286 'Budget Wrangler E-mail Address' => 'text',287 'Venue Wrangler Name' => 'text',288 'Venue Wrangler E-mail Address' => 'text',289 'Speaker Wrangler Name' => 'text',290 'Speaker Wrangler E-mail Address' => 'text',291 'Food/Beverage Wrangler Name' => 'text',292 'Food/Beverage Wrangler E-mail Address' => 'text',293 'Swag Wrangler Name' => 'text',294 'Swag Wrangler E-mail Address' => 'text',295 'Volunteer Wrangler Name' => 'text',296 'Volunteer Wrangler E-mail Address' => 'text',297 'Printing Wrangler Name' => 'text',298 'Printing Wrangler E-mail Address' => 'text',299 'Design Wrangler Name' => 'text',300 'Design Wrangler E-mail Address' => 'text',301 'Website Wrangler Name' => 'text',302 'Website Wrangler E-mail Address' => 'text',303 'Social Media/Publicity Wrangler Name' 304 'Social Media/Publicity Wrangler E-mail Address' 305 'A/V Wrangler Name' => 'text',306 'A/V Wrangler E-mail Address' => 'text',307 'Party Wrangler Name' => 'text',308 'Party Wrangler E-mail Address' => 'text',309 'Travel Wrangler Name' => 'text',310 'Travel Wrangler E-mail Address' => 'text',311 'Safety Wrangler Name' => 'text',312 'Safety Wrangler E-mail Address' => 'text',313 'Mentor Name' => 'text',314 'Mentor E-mail Address' => 'text',280 'Organizer Name' => 'text', 281 'WordPress.org Username' => 'text', 282 'Email Address' => 'text', // Note: This is the lead organizer's e-mail address, which is different than the "E-mail Address" field 283 'Telephone' => 'text', 284 'Mailing Address' => 'textarea', 285 'Sponsor Wrangler Name' => 'text', 286 'Sponsor Wrangler E-mail Address' => 'text', 287 'Budget Wrangler Name' => 'text', 288 'Budget Wrangler E-mail Address' => 'text', 289 'Venue Wrangler Name' => 'text', 290 'Venue Wrangler E-mail Address' => 'text', 291 'Speaker Wrangler Name' => 'text', 292 'Speaker Wrangler E-mail Address' => 'text', 293 'Food/Beverage Wrangler Name' => 'text', 294 'Food/Beverage Wrangler E-mail Address' => 'text', 295 'Swag Wrangler Name' => 'text', 296 'Swag Wrangler E-mail Address' => 'text', 297 'Volunteer Wrangler Name' => 'text', 298 'Volunteer Wrangler E-mail Address' => 'text', 299 'Printing Wrangler Name' => 'text', 300 'Printing Wrangler E-mail Address' => 'text', 301 'Design Wrangler Name' => 'text', 302 'Design Wrangler E-mail Address' => 'text', 303 'Website Wrangler Name' => 'text', 304 'Website Wrangler E-mail Address' => 'text', 305 'Social Media/Publicity Wrangler Name' => 'text', 306 'Social Media/Publicity Wrangler E-mail Address' => 'text', 307 'A/V Wrangler Name' => 'text', 308 'A/V Wrangler E-mail Address' => 'text', 309 'Party Wrangler Name' => 'text', 310 'Party Wrangler E-mail Address' => 'text', 311 'Travel Wrangler Name' => 'text', 312 'Travel Wrangler E-mail Address' => 'text', 313 'Safety Wrangler Name' => 'text', 314 'Safety Wrangler E-mail Address' => 'text', 315 'Mentor Name' => 'text', 316 'Mentor E-mail Address' => 'text', 315 317 ); 316 318 … … 356 358 'Multi-Event Sponsor Region' => 'mes-dropdown', 357 359 358 'Organizer Name' => 'text',359 'WordPress.org Username' => 'text',360 'Email Address' => 'text',361 'Telephone' => 'text',362 'Mailing Address' => 'textarea',363 'Sponsor Wrangler Name' => 'text',364 'Sponsor Wrangler E-mail Address' => 'text',365 'Budget Wrangler Name' => 'text',366 'Budget Wrangler E-mail Address' => 'text',367 'Venue Wrangler Name' => 'text',368 'Venue Wrangler E-mail Address' => 'text',369 'Speaker Wrangler Name' => 'text',370 'Speaker Wrangler E-mail Address' => 'text',371 'Food/Beverage Wrangler Name' => 'text',372 'Food/Beverage Wrangler E-mail Address' => 'text',373 'Swag Wrangler Name' => 'text',374 'Swag Wrangler E-mail Address' => 'text',375 'Volunteer Wrangler Name' => 'text',376 'Volunteer Wrangler E-mail Address' => 'text',377 'Printing Wrangler Name' => 'text',378 'Printing Wrangler E-mail Address' => 'text',379 'Design Wrangler Name' => 'text',380 'Design Wrangler E-mail Address' => 'text',381 'Website Wrangler Name' => 'text',382 'Website Wrangler E-mail Address' => 'text',383 'Social Media/Publicity Wrangler Name' 384 'Social Media/Publicity Wrangler E-mail Address' 385 'A/V Wrangler Name' => 'text',386 'A/V Wrangler E-mail Address' => 'text',387 'Party Wrangler Name' => 'text',388 'Party Wrangler E-mail Address' => 'text',389 'Travel Wrangler Name' => 'text',390 'Travel Wrangler E-mail Address' => 'text',391 'Safety Wrangler Name' => 'text',392 'Safety Wrangler E-mail Address' => 'text',393 'Mentor Name' => 'text',394 'Mentor E-mail Address' => 'text',360 'Organizer Name' => 'text', 361 'WordPress.org Username' => 'text', 362 'Email Address' => 'text', 363 'Telephone' => 'text', 364 'Mailing Address' => 'textarea', 365 'Sponsor Wrangler Name' => 'text', 366 'Sponsor Wrangler E-mail Address' => 'text', 367 'Budget Wrangler Name' => 'text', 368 'Budget Wrangler E-mail Address' => 'text', 369 'Venue Wrangler Name' => 'text', 370 'Venue Wrangler E-mail Address' => 'text', 371 'Speaker Wrangler Name' => 'text', 372 'Speaker Wrangler E-mail Address' => 'text', 373 'Food/Beverage Wrangler Name' => 'text', 374 'Food/Beverage Wrangler E-mail Address' => 'text', 375 'Swag Wrangler Name' => 'text', 376 'Swag Wrangler E-mail Address' => 'text', 377 'Volunteer Wrangler Name' => 'text', 378 'Volunteer Wrangler E-mail Address' => 'text', 379 'Printing Wrangler Name' => 'text', 380 'Printing Wrangler E-mail Address' => 'text', 381 'Design Wrangler Name' => 'text', 382 'Design Wrangler E-mail Address' => 'text', 383 'Website Wrangler Name' => 'text', 384 'Website Wrangler E-mail Address' => 'text', 385 'Social Media/Publicity Wrangler Name' => 'text', 386 'Social Media/Publicity Wrangler E-mail Address' => 'text', 387 'A/V Wrangler Name' => 'text', 388 'A/V Wrangler E-mail Address' => 'text', 389 'Party Wrangler Name' => 'text', 390 'Party Wrangler E-mail Address' => 'text', 391 'Travel Wrangler Name' => 'text', 392 'Travel Wrangler E-mail Address' => 'text', 393 'Safety Wrangler Name' => 'text', 394 'Safety Wrangler E-mail Address' => 'text', 395 'Mentor Name' => 'text', 396 'Mentor E-mail Address' => 'text', 395 397 396 398 'Venue Name' => 'text', … … 420 422 function admin_print_scripts() { 421 423 if ( get_post_type() == WCPT_POST_TYPE_ID ) : 424 422 425 ?> 423 426 … … 467 470 if ( !wcpt_has_access() ) 468 471 return false; 469 470 472 } 471 473 … … 478 480 */ 479 481 function user_profile_wordcamp( $profileuser ) { 480 481 482 if ( !wcpt_has_access() ) 482 483 return false; 483 484 484 ?> 485 485 486 486 <h3><?php _e( 'WordCamps', 'wcpt' ); ?></h3> 487 487 488 <table class="form-table"> 488 489 <tr valign="top"> 489 490 <th scope="row"><?php _e( 'WordCamps', 'wcpt' ); ?></th> 491 490 492 <td> 491 492 493 </td> 493 494 </tr> … … 558 559 559 560 case 'wcpt_date' : 560 561 561 // Has a start date 562 562 if ( $start = wcpt_get_wordcamp_start_date() ) { … … 612 612 echo implode( ' - ', (array) $wc ); 613 613 } 614 614 615 return $actions; 615 616 } … … 723 724 724 725 if ( ! empty( $post_data['post_status'] ) ) { 725 726 726 // Only network admins can change WordCamp statuses. 727 727 if ( ! current_user_can( 'network_admin' ) ) { … … 930 930 public function original_application_metabox( $post ) { 931 931 $application_data = get_post_meta( $post->ID, '_application_data', true ); 932 933 932 require_once( WCPT_DIR . 'views/wordcamp/metabox-original-application.php' ); 934 933 } -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-loader.php
r2870 r2877 1 1 <?php 2 define( 'WCPT_POST_TYPE_ID', 'wordcamp' ); 3 define( 'WCPT_YEAR_ID', 'wordcamp_year' ); 4 define( 'WCPT_SLUG', 'wordcamps' ); 2 3 define( 'WCPT_POST_TYPE_ID', 'wordcamp' ); 4 define( 'WCPT_YEAR_ID', 'wordcamp_year' ); 5 define( 'WCPT_SLUG', 'wordcamps' ); 5 6 define( 'WCPT_DEFAULT_STATUS', 'wcpt-needs-vetting' ); 6 7 define( 'WCPT_FINAL_STATUS', 'wcpt-closed' ); 7 // todo realign 8 9 if ( !class_exists( 'WordCamp_Loader' ) ) : 8 9 if ( ! class_exists( 'WordCamp_Loader' ) ) : 10 10 /** 11 11 * WordCamp_Loader … … 22 22 */ 23 23 function __construct() { 24 add_action( 'plugins_loaded', array( $this, 'includes' ) ); 25 26 add_action( 'init', array( $this, 'register_post_types' ) ); 27 add_action( 'init', array( $this, 'register_post_statuses' ) ); 24 add_action( 'plugins_loaded', array( $this, 'includes' ) ); 25 add_action( 'init', array( $this, 'register_post_types' ) ); 26 add_action( 'init', array( $this, 'register_post_statuses' ) ); 28 27 } 29 28 … … 36 35 */ 37 36 function includes () { 38 39 37 // Load the files 40 38 require_once ( WCPT_DIR . 'wcpt-wordcamp/wordcamp-template.php' ); … … 45 43 46 44 require_once( WCPT_DIR . 'wcpt-wordcamp/wordcamp-new-site.php' ); 45 47 46 $GLOBALS['wordcamp_new_site'] = new WordCamp_New_Site; 48 47 } … … 56 55 */ 57 56 function register_post_types() { 58 59 57 // WordCamp post type labels 60 58 $wcpt_labels = array ( 61 'name' => __( 'WordCamps', 'wcpt' ),62 'singular_name' => __( 'WordCamp', 'wcpt' ),63 'add_new' => __( 'Add New', 'wcpt' ),64 'add_new_item' => __( 'Create New WordCamp', 'wcpt' ),65 'edit' => __( 'Edit', 'wcpt' ),66 'edit_item' => __( 'Edit WordCamp', 'wcpt' ),67 'new_item' => __( 'New WordCamp', 'wcpt' ),68 'view' => __( 'View WordCamp', 'wcpt' ),69 'view_item' => __( 'View WordCamp', 'wcpt' ),70 'search_items' => __( 'Search WordCamps', 'wcpt' ),71 'not_found' => __( 'No WordCamps found', 'wcpt' ),59 'name' => __( 'WordCamps', 'wcpt' ), 60 'singular_name' => __( 'WordCamp', 'wcpt' ), 61 'add_new' => __( 'Add New', 'wcpt' ), 62 'add_new_item' => __( 'Create New WordCamp', 'wcpt' ), 63 'edit' => __( 'Edit', 'wcpt' ), 64 'edit_item' => __( 'Edit WordCamp', 'wcpt' ), 65 'new_item' => __( 'New WordCamp', 'wcpt' ), 66 'view' => __( 'View WordCamp', 'wcpt' ), 67 'view_item' => __( 'View WordCamp', 'wcpt' ), 68 'search_items' => __( 'Search WordCamps', 'wcpt' ), 69 'not_found' => __( 'No WordCamps found', 'wcpt' ), 72 70 'not_found_in_trash' => __( 'No WordCamps found in Trash', 'wcpt' ), 73 'parent_item_colon' => __( 'Parent WordCamp:', 'wcpt' )71 'parent_item_colon' => __( 'Parent WordCamp:', 'wcpt' ) 74 72 ); 75 73 … … 127 125 public static function get_post_statuses() { 128 126 return array( 129 'wcpt-needs-vetting' => _x( 'Needs Vetting', 'wordcamp status', 'wordcamporg' ),130 'wcpt-needs-orientati' => _x( 'Needs Orientation/Interview', 'wordcamp status', 'wordcamporg' ),131 'wcpt-more-info-reque' => _x( 'More Info Requested', 'wordcamp status', 'wordcamporg' ),132 'wcpt-needs-rejection' => _x( 'Needs Rejection E-mail', 'wordcamp status', 'wordcamporg' ),133 'wcpt-interview-sched' => _x( 'Interview/Orientation Scheduled', 'wordcamp status', 'wordcamporg' ),134 'wcpt-rejected' => _x( 'Rejected', 'wordcamp status', 'wordcamporg' ),127 'wcpt-needs-vetting' => _x( 'Needs Vetting', 'wordcamp status', 'wordcamporg' ), 128 'wcpt-needs-orientati' => _x( 'Needs Orientation/Interview', 'wordcamp status', 'wordcamporg' ), 129 'wcpt-more-info-reque' => _x( 'More Info Requested', 'wordcamp status', 'wordcamporg' ), 130 'wcpt-needs-rejection' => _x( 'Needs Rejection E-mail', 'wordcamp status', 'wordcamporg' ), 131 'wcpt-interview-sched' => _x( 'Interview/Orientation Scheduled', 'wordcamp status', 'wordcamporg' ), 132 'wcpt-rejected' => _x( 'Rejected', 'wordcamp status', 'wordcamporg' ), 135 133 'wcpt-approved-pre-pl' => _x( 'Approved for Pre-Planning Pending Agreement', 'wordcamp status', 'wordcamporg' ), 136 'wcpt-needs-email' => _x( 'Needs E-mail Address', 'wordcamp status', 'wordcamporg' ),137 'wcpt-needs-site' => _x( 'Needs Site', 'wordcamp status', 'wordcamporg' ),138 'wcpt-needs-polldaddy' => _x( 'Needs Polldaddy Account', 'wordcamp status', 'wordcamporg' ),139 'wcpt-needs-mentor' => _x( 'Needs Mentor', 'wordcamp status', 'wordcamporg' ),140 'wcpt-needs-pre-plann' => _x( 'Needs to be Added to Pre-Planning Schedule', 'wordcamp status', 'wordcamporg' ),141 'wcpt-pre-planning' => _x( 'In Pre-Planning', 'wordcamp status', 'wordcamporg' ),142 'wcpt-needs-budget-re' => _x( 'Needs Budget Review', 'wordcamp status', 'wordcamporg' ),143 'wcpt-budget-rev-sche' => _x( 'Budget Review Scheduled', 'wordcamp status', 'wordcamporg' ),144 'wcpt-needs-contract' => _x( 'Needs Contract to be Signed', 'wordcamp status', 'wordcamporg' ),145 'wcpt-needs-fill-list' => _x( 'Needs to Fill Out WordCamp Listing', 'wordcamp status', 'wordcamporg' ),146 'wcpt-needs-schedule' => _x( 'Needs to be Added to Official Schedule', 'wordcamp status', 'wordcamporg' ),147 'wcpt-scheduled' => _x( 'WordCamp Scheduled', 'wordcamp status', 'wordcamporg' ),148 'wcpt-needs-debrief' => _x( 'Needs Debrief', 'wordcamp status', 'wordcamporg' ),149 'wcpt-debrief-schedul' => _x( 'Debrief Scheduled', 'wordcamp status', 'wordcamporg' ),150 'wcpt-closed' => _x( 'WordCamp Closed', 'wordcamp status', 'wordcamporg' ),134 'wcpt-needs-email' => _x( 'Needs E-mail Address', 'wordcamp status', 'wordcamporg' ), 135 'wcpt-needs-site' => _x( 'Needs Site', 'wordcamp status', 'wordcamporg' ), 136 'wcpt-needs-polldaddy' => _x( 'Needs Polldaddy Account', 'wordcamp status', 'wordcamporg' ), 137 'wcpt-needs-mentor' => _x( 'Needs Mentor', 'wordcamp status', 'wordcamporg' ), 138 'wcpt-needs-pre-plann' => _x( 'Needs to be Added to Pre-Planning Schedule', 'wordcamp status', 'wordcamporg' ), 139 'wcpt-pre-planning' => _x( 'In Pre-Planning', 'wordcamp status', 'wordcamporg' ), 140 'wcpt-needs-budget-re' => _x( 'Needs Budget Review', 'wordcamp status', 'wordcamporg' ), 141 'wcpt-budget-rev-sche' => _x( 'Budget Review Scheduled', 'wordcamp status', 'wordcamporg' ), 142 'wcpt-needs-contract' => _x( 'Needs Contract to be Signed', 'wordcamp status', 'wordcamporg' ), 143 'wcpt-needs-fill-list' => _x( 'Needs to Fill Out WordCamp Listing', 'wordcamp status', 'wordcamporg' ), 144 'wcpt-needs-schedule' => _x( 'Needs to be Added to Official Schedule', 'wordcamp status', 'wordcamporg' ), 145 'wcpt-scheduled' => _x( 'WordCamp Scheduled', 'wordcamp status', 'wordcamporg' ), 146 'wcpt-needs-debrief' => _x( 'Needs Debrief', 'wordcamp status', 'wordcamporg' ), 147 'wcpt-debrief-schedul' => _x( 'Debrief Scheduled', 'wordcamp status', 'wordcamporg' ), 148 'wcpt-closed' => _x( 'WordCamp Closed', 'wordcamp status', 'wordcamporg' ), 151 149 ); 152 150 } -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
r2876 r2877 205 205 // Make sure the new blog is https. 206 206 update_option( 'siteurl', set_url_scheme( get_option( 'siteurl' ), 'https' ) ); 207 update_option( 'home', set_url_scheme( get_option( 'home' ),'https' ) );207 update_option( 'home', set_url_scheme( get_option( 'home' ), 'https' ) ); 208 208 } 209 209 -
sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-template.php
r1652 r2877 14 14 * @return object Multidimensional array of WordCamp information 15 15 */ 16 function wcpt_has_wordcamps 16 function wcpt_has_wordcamps( $args = '' ) { 17 17 global $wcpt_template; 18 18 19 $default = array 19 $default = array( 20 20 // Narrow query down to WordCamp Post Type 21 21 'post_type' => WCPT_POST_TYPE_ID, … … 84 84 * @return object WordCamp information 85 85 */ 86 function wcpt_wordcamps 86 function wcpt_wordcamps() { 87 87 global $wcpt_template; 88 88 return $wcpt_template->have_posts(); … … 101 101 * @return object WordCamp information 102 102 */ 103 function wcpt_the_wordcamp 103 function wcpt_the_wordcamp() { 104 104 global $wcpt_template; 105 105 return $wcpt_template->the_post(); … … 117 117 * @uses wcpt_get_wordcamp_id() 118 118 */ 119 function wcpt_wordcamp_id 119 function wcpt_wordcamp_id() { 120 120 echo wcpt_get_wordcamp_id(); 121 121 } … … 131 131 * @return string WordCamp id 132 132 */ 133 function wcpt_get_wordcamp_id 133 function wcpt_get_wordcamp_id() { 134 134 global $wcpt_template; 135 135 … … 154 154 * @uses wcpt_get_wordcamp_permalink() 155 155 */ 156 function wcpt_wordcamp_permalink 156 function wcpt_wordcamp_permalink( $wordcamp_id = 0 ) { 157 157 echo wcpt_get_wordcamp_permalink( $wordcamp_id ); 158 158 } … … 171 171 * @return string Permanent link to WordCamp 172 172 */ 173 function wcpt_get_wordcamp_permalink 173 function wcpt_get_wordcamp_permalink( $wordcamp_id = 0 ) { 174 174 if ( empty( $wordcamp_id ) ) 175 175 $wordcamp_id = wcpt_get_wordcamp_id(); … … 190 190 * @uses wcpt_get_wordcamp_title() 191 191 */ 192 function wcpt_wordcamp_title 192 function wcpt_wordcamp_title( $wordcamp_id = 0 ) { 193 193 echo wcpt_get_wordcamp_title( $wordcamp_id ); 194 194 } … … 208 208 * 209 209 */ 210 function wcpt_get_wordcamp_title 210 function wcpt_get_wordcamp_title( $wordcamp_id = 0 ) { 211 211 return apply_filters( 'wcpt_get_wordcamp_title', get_the_title( $wordcamp_id ) ); 212 212 } … … 224 224 * @uses wcpt_get_wordcamp_link() 225 225 */ 226 function wcpt_wordcamp_link 226 function wcpt_wordcamp_link( $wordcamp_id = 0 ) { 227 227 echo wcpt_get_wordcamp_link( $wordcamp_id ); 228 228 } … … 242 242 * 243 243 */ 244 function wcpt_get_wordcamp_link 244 function wcpt_get_wordcamp_link( $wordcamp_id = 0 ) { 245 245 246 246 $title = get_the_title( $wordcamp_id ); … … 269 269 * @param int $wordcamp_id optional 270 270 */ 271 function wcpt_wordcamp_start_date 271 function wcpt_wordcamp_start_date( $wordcamp_id = 0, $format = 'F j, Y' ) { 272 272 echo wcpt_get_wordcamp_start_date( $wordcamp_id, $format ); 273 273 } … … 284 284 * @param int $wordcamp_id optional 285 285 */ 286 function wcpt_get_wordcamp_start_date 286 function wcpt_get_wordcamp_start_date( $wordcamp_id = 0, $format = 'F j, Y' ) { 287 287 if ( empty( $wordcamp_id ) ) 288 288 $wordcamp_id = wcpt_get_wordcamp_id(); … … 306 306 * @param int $wordcamp_id optional 307 307 */ 308 function wcpt_wordcamp_end_date 308 function wcpt_wordcamp_end_date( $wordcamp_id = 0, $format = 'F j, Y' ) { 309 309 echo wcpt_get_wordcamp_end_date( $wordcamp_id, $format ); 310 310 } … … 321 321 * @param int $wordcamp_id optional 322 322 */ 323 function wcpt_get_wordcamp_end_date 323 function wcpt_get_wordcamp_end_date( $wordcamp_id = 0, $format = 'F j, Y' ) { 324 324 if ( empty( $wordcamp_id ) ) 325 325 $wordcamp_id = wcpt_get_wordcamp_id(); … … 343 343 * @param int $wordcamp_id optional 344 344 */ 345 function wcpt_wordcamp_location 345 function wcpt_wordcamp_location( $wordcamp_id = 0 ) { 346 346 echo wcpt_get_wordcamp_location( $wordcamp_id ); 347 347 } … … 358 358 * @param int $wordcamp_id optional 359 359 */ 360 function wcpt_get_wordcamp_location 360 function wcpt_get_wordcamp_location( $wordcamp_id = 0 ) { 361 361 if ( empty( $wordcamp_id ) ) 362 362 $wordcamp_id = wcpt_get_wordcamp_id(); … … 377 377 * @param int $wordcamp_id optional 378 378 */ 379 function wcpt_wordcamp_organizer_name 379 function wcpt_wordcamp_organizer_name( $wordcamp_id = 0 ) { 380 380 echo wcpt_get_wordcamp_organizer_name( $wordcamp_id ); 381 381 } … … 392 392 * @param int $wordcamp_id optional 393 393 */ 394 function wcpt_get_wordcamp_organizer_name 394 function wcpt_get_wordcamp_organizer_name( $wordcamp_id = 0 ) { 395 395 if ( empty( $wordcamp_id ) ) 396 396 $wordcamp_id = wcpt_get_wordcamp_id(); … … 411 411 * @param int $wordcamp_id optional 412 412 */ 413 function wcpt_wordcamp_venue_name 413 function wcpt_wordcamp_venue_name( $wordcamp_id = 0 ) { 414 414 echo wcpt_get_wordcamp_venue_name( $wordcamp_id ); 415 415 } … … 426 426 * @param int $wordcamp_id optional 427 427 */ 428 function wcpt_get_wordcamp_venue_name 428 function wcpt_get_wordcamp_venue_name( $wordcamp_id = 0 ) { 429 429 if ( empty( $wordcamp_id ) ) 430 430 $wordcamp_id = wcpt_get_wordcamp_id(); … … 445 445 * @param int $wordcamp_id optional 446 446 */ 447 function wcpt_wordcamp_url 447 function wcpt_wordcamp_url( $wordcamp_id = 0 ) { 448 448 echo wcpt_get_wordcamp_url( $wordcamp_id ); 449 449 } … … 460 460 * @param int $wordcamp_id optional 461 461 */ 462 function wcpt_get_wordcamp_url 462 function wcpt_get_wordcamp_url( $wordcamp_id = 0 ) { 463 463 if ( empty( $wordcamp_id ) ) 464 464 $wordcamp_id = wcpt_get_wordcamp_id(); … … 478 478 * @global WP_Query $wcpt_template 479 479 */ 480 function wcpt_wordcamp_pagination_count 480 function wcpt_wordcamp_pagination_count() { 481 481 echo wcpt_get_wordcamp_pagination_count(); 482 482 } … … 493 493 * @return string 494 494 */ 495 function wcpt_get_wordcamp_pagination_count 495 function wcpt_get_wordcamp_pagination_count() { 496 496 global $wcpt_template; 497 497 … … 521 521 * @since WordCamp Post Type (0.1) 522 522 */ 523 function wcpt_wordcamp_pagination_links 523 function wcpt_wordcamp_pagination_links() { 524 524 echo wcpt_get_wordcamp_pagination_links(); 525 525 } … … 536 536 * @return string 537 537 */ 538 function wcpt_get_wordcamp_pagination_links 538 function wcpt_get_wordcamp_pagination_links() { 539 539 global $wcpt_template; 540 540 … … 547 547 */ 548 548 if ( ! function_exists( 'wcpt_wordcamp_physical_address' ) ) : 549 function wcpt_wordcamp_physical_address( $wordcamp_id = 0 ) {550 echo wp_filter_kses( nl2br( wcpt_get_wordcamp_physical_address( $wordcamp_id ) ) );551 }549 function wcpt_wordcamp_physical_address( $wordcamp_id = 0 ) { 550 echo wp_filter_kses( nl2br( wcpt_get_wordcamp_physical_address( $wordcamp_id ) ) ); 551 } 552 552 endif; 553 553 554 554 if ( ! function_exists( 'wcpt_get_wordcamp_physical_address' ) ) : 555 555 function wcpt_get_wordcamp_physical_address( $wordcamp_id = 0 ) { 556 556 if ( empty( $wordcamp_id ) ) … … 560 560 return apply_filters( 'wcpt_get_wordcamp_physical_address', $address ); 561 561 } 562 562 endif; 563 563 564 564 if ( ! function_exists( 'wcpt_wordcamp_venue_url' ) ) : 565 function wcpt_wordcamp_venue_url( $wordcamp_id = 0 ) {566 echo esc_url( wcpt_get_wordcamp_venue_url( $wordcamp_id ) );567 }565 function wcpt_wordcamp_venue_url( $wordcamp_id = 0 ) { 566 echo esc_url( wcpt_get_wordcamp_venue_url( $wordcamp_id ) ); 567 } 568 568 endif; 569 569 570 570 if ( ! function_exists( 'wcpt_get_wordcamp_venue_url' ) ) : 571 571 function wcpt_get_wordcamp_venue_url( $wordcamp_id = 0 ) { 572 572 if ( empty( $wordcamp_id ) ) … … 576 576 return apply_filters( 'wcpt_get_wordcamp_venue_url', $venue_url ); 577 577 } 578 578 endif; 579 579 580 580 if ( ! function_exists( 'wcpt_get_wordcamp_twitter_screen_name' ) ) : 581 function wcpt_get_wordcamp_twitter_screen_name( $wordcamp_id = 0 ) {582 if ( empty( $wordcamp_id ) )583 $wordcamp_id = wcpt_get_wordcamp_id();584 585 $screen_name = get_post_meta( $wordcamp_id, 'Twitter', true );586 return apply_filters( 'wcpt_get_wordcamp_twitter_screen_name', $screen_name );587 }581 function wcpt_get_wordcamp_twitter_screen_name( $wordcamp_id = 0 ) { 582 if ( empty( $wordcamp_id ) ) 583 $wordcamp_id = wcpt_get_wordcamp_id(); 584 585 $screen_name = get_post_meta( $wordcamp_id, 'Twitter', true ); 586 return apply_filters( 'wcpt_get_wordcamp_twitter_screen_name', $screen_name ); 587 } 588 588 endif; 589 589
Note: See TracChangeset
for help on using the changeset viewer.