diff --git a/src/wp-includes/feed.php b/src/wp-includes/feed.php index 74a4b5009a..4532697ea5 100644 --- a/src/wp-includes/feed.php +++ b/src/wp-includes/feed.php @@ -150,11 +150,13 @@ function wp_title_rss( $deprecated = '–' ) { * Retrieves the current post title for the feed. * * @since 2.0.0 + * @since 6.6.0 Added the `$post` parameter. * + * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. * @return string Current post title. */ -function get_the_title_rss() { - $title = get_the_title(); +function get_the_title_rss( $post = 0 ) { + $title = get_the_title( $post ); /** * Filters the post title for use in a feed.