WordPress.org

Make WordPress Core

Ticket #46227: 46227.6.diff

File 46227.6.diff, 1.3 KB (added by adhitya03, 12 months ago)

Correcting the indentation, sorry

  • wp-includes/default-filters.php

     
    294294add_action( 'wp_head', 'wp_print_head_scripts', 9 );
    295295add_action( 'wp_head', 'wp_generator' );
    296296add_action( 'wp_head', 'rel_canonical' );
     297add_action( 'wp_head', 'rel_feed_for_posts', 10, 0 );
    297298add_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
    298299add_action( 'wp_head', 'wp_custom_css_cb', 101 );
    299300add_action( 'wp_head', 'wp_site_icon', 99 );
  • wp-includes/general-template.php

     
    45904590
    45914591        return $settings;
    45924592}
     4593
     4594/**
     4595 * Adds a link rel=feed element to the home page when a static front page is set in Settings > Reading.
     4596 *
     4597 * See {@see 'wp_head'}.
     4598 *
     4599 * @since 5.2.3
     4600 */
     4601function rel_feed_for_posts() {
     4602        if ( is_front_page() && ! is_home() ) {
     4603                $page_for_posts = get_option( 'page_for_posts' );
     4604                echo '<link rel="feed" type="text/html" href="' . get_the_permalink( $page_for_posts ) . '" title="' . the_title_attribute( array( 'echo' => false, 'post' => $page_for_posts ) ) . '" />';
     4605        }
     4606}