Make WordPress Core

Ticket #35400: 35400.patch

File 35400.patch, 1.0 KB (added by sebastian.pisula, 9 years ago)
  • wp-includes/link-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    11101110}
    11111111
    11121112/**
     1113 * Retrieve the permalink for a blog archive.
     1114 *
     1115 * @since 4.5.0
     1116 *
     1117 * @return string|false The post type archive permalink.
     1118 */
     1119function get_blog_link() {
     1120
     1121        $page_for_posts = get_option( 'page_for_posts' );
     1122
     1123        if ( 'page' == get_option( 'show_on_front' ) && $page_for_posts ) {
     1124                $link = get_permalink( $page_for_posts );
     1125        } else {
     1126                $link = get_home_url();
     1127        }
     1128
     1129        /**
     1130         * Filter the blog archive permalink.
     1131         *
     1132         * @since 4.5.0
     1133         *
     1134         * @param string $link The blog archive permalink.
     1135         */
     1136        return apply_filters( 'blog_link', $link );
     1137}
     1138
     1139/**
    11131140 * Retrieve the permalink for a post type archive.
    11141141 *
    11151142 * @since 3.1.0