Make WordPress Core

Ticket #45558: 45558.diff

File 45558.diff, 1.5 KB (added by swissspidy, 6 years ago)
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index 983e3dc06a..cb98620be4 100644
    function the_post_password() { 
    17241724                echo esc_attr( $post->post_password );
    17251725}
    17261726
    1727 /**
    1728  * Get the post title.
    1729  *
    1730  * The post title is fetched and if it is blank then a default string is
    1731  * returned.
    1732  *
    1733  * @since 2.7.0
    1734  *
    1735  * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
    1736  * @return string The post title if set.
    1737  */
    1738 function _draft_or_post_title( $post = 0 ) {
    1739         $title = get_the_title( $post );
    1740         if ( empty( $title ) )
    1741                 $title = __( '(no title)' );
    1742         return esc_html( $title );
    1743 }
    1744 
    17451727/**
    17461728 * Displays the search query.
    17471729 *
  • src/wp-includes/template.php

    diff --git src/wp-includes/template.php src/wp-includes/template.php
    index 4205ce9fcd..1a8c622c70 100644
    function load_template( $_template_file, $require_once = true ) { 
    690690                require( $_template_file );
    691691        }
    692692}
     693
     694/**
     695 * Get the post title.
     696 *
     697 * The post title is fetched and if it is blank then a default string is
     698 * returned.
     699 *
     700 * @since 2.7.0
     701 *
     702 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
     703 * @return string The post title if set.
     704 */
     705function _draft_or_post_title( $post = 0 ) {
     706        $title = get_the_title( $post );
     707        if ( empty( $title ) )
     708                $title = __( '(no title)' );
     709        return esc_html( $title );
     710}