Make WordPress Core

Ticket #35400: get_post_type_archive_link_update.patch

File get_post_type_archive_link_update.patch, 948 bytes (added by sebastian.pisula, 10 years ago)

update function get_post_type_archive_link

  • wp-includes/link-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    11251125                return false;
    11261126
    11271127        if ( 'post' === $post_type ) {
    1128                 $show_on_front = get_option( 'show_on_front' );
    1129                 $page_for_posts  = get_option( 'page_for_posts' );
    1130 
    1131                 if ( 'page' == $show_on_front && $page_for_posts ) {
    1132                         $link = get_permalink( $page_for_posts );
    1133                 } else {
    1134                         $link = get_home_url();
    1135                 }
    11361128                /** This filter is documented in wp-includes/link-template.php */
    1137                 return apply_filters( 'post_type_archive_link', $link, $post_type );
     1129                return apply_filters( 'post_type_archive_link', get_blog_link(), $post_type );
    11381130        }
    11391131
    11401132        if ( ! $post_type_obj->has_archive )