Changeset 2898 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-template.php
- Timestamp:
- 04/05/2016 04:05:02 PM (8 years ago)
- Location:
- sites/trunk/wordcamp.org
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org
-
Property
svn:mergeinfo
set to
/sites/branches/application-tracking/wordcamp.org merged eligible
-
Property
svn:mergeinfo
set to
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-template.php
r1652 r2898 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 … … 648 648 */ 649 649 function add_wordcamp_feed_link_to_head() { 650 if ( ! is_post_type_archive( 'wordcamp') ) {650 if ( ! is_post_type_archive( WCPT_POST_TYPE_ID ) ) { 651 651 ?> 652 652 653 <link rel="alternate" type="<?php echo esc_attr( feed_content_type() ); ?>" title="New WordCamp Announcements" href="<?php echo esc_url( get_post_type_archive_feed_link( 'wordcamp') ); ?>" />653 <link rel="alternate" type="<?php echo esc_attr( feed_content_type() ); ?>" title="New WordCamp Announcements" href="<?php echo esc_url( get_post_type_archive_feed_link( WCPT_POST_TYPE_ID ) ); ?>" /> 654 654 655 655 <?php
Note: See TracChangeset
for help on using the changeset viewer.