diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
index 983e3dc06a..cb98620be4 100644
|
|
function the_post_password() { |
1724 | 1724 | echo esc_attr( $post->post_password ); |
1725 | 1725 | } |
1726 | 1726 | |
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 | | |
1745 | 1727 | /** |
1746 | 1728 | * Displays the search query. |
1747 | 1729 | * |
diff --git src/wp-includes/template.php src/wp-includes/template.php
index 4205ce9fcd..1a8c622c70 100644
|
|
function load_template( $_template_file, $require_once = true ) { |
690 | 690 | require( $_template_file ); |
691 | 691 | } |
692 | 692 | } |
| 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 | */ |
| 705 | function _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 | } |