Make WordPress Core

Ticket #46227: 46227.diff

File 46227.diff, 1.3 KB (added by cameronamcintyre, 6 years ago)
  • src/wp-includes/default-filters.php

    diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
    index 056e8ffb43..febb5f6040 100644
    a b add_action( 'wp_head', 'wp_print_styles', 8 ); 
    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 );
  • src/wp-includes/general-template.php

    diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php
    index 50323da6b9..a03325b0ab 100644
    a b function wp_heartbeat_settings( $settings ) { 
    45834583
    45844584        return $settings;
    45854585}
     4586
     4587/**
     4588 * Adds a link rel=feed element to the home page when a static front page is set in Settings > Reading
     4589 */
     4590function rel_feed_for_posts() {
     4591        $page_for_posts = get_option( 'page_for_posts' );
     4592
     4593        if ( is_front_page() && ! is_home() ) {
     4594                echo '<link rel="feed" type="text/html" href="' . get_the_permalink( $page_for_posts ) . '" title="' . get_the_title( $page_for_posts ) . '" />';
     4595        }
     4596       
     4597}