Changeset 32292 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 04/24/2015 02:56:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r32026 r32292 533 533 } else { 534 534 if ( ! empty( $show_option_all ) ) { 535 $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' ); 535 536 $posts_page = ''; 537 538 // For taxonomies that belong only to custom post types, point to a valid archive. 539 $taxonomy_object = get_taxonomy( $r['taxonomy'] ); 540 if ( ! in_array( 'post', $taxonomy_object->object_type ) && ! in_array( 'page', $taxonomy_object->object_type ) ) { 541 foreach ( $taxonomy_object->object_type as $object_type ) { 542 $_object_type = get_post_type_object( $object_type ); 543 544 // Grab the first one. 545 if ( ! empty( $_object_type->has_archive ) ) { 546 $posts_page = get_post_type_archive_link( $object_type ); 547 break; 548 } 549 } 550 } 551 552 // Fallback for the 'All' link is the front page. 553 if ( ! $posts_page ) { 554 $posts_page = 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' ); 555 } 556 536 557 $posts_page = esc_url( $posts_page ); 537 558 if ( 'list' == $r['style'] ) {
Note: See TracChangeset
for help on using the changeset viewer.