From c85a6b4d8b739a2b47c48cd4d917ea85ad431883 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 29 Nov 2018 07:35:20 -0800 Subject: [PATCH] Remove wp_ prefix to match core --- lib/load.php | 5 +---- packages/block-library/src/latest-comments/index.php | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/load.php b/lib/load.php index 05ecc7934d74c..0c55db3a37f6c 100644 --- a/lib/load.php +++ b/lib/load.php @@ -62,10 +62,7 @@ if ( ! function_exists( 'render_block_core_categories' ) ) { require dirname( __FILE__ ) . '/../packages/block-library/src/categories/index.php'; } -// Currently merged in core as `wp_render_block_core_latest_comments`, -// expected to change soon. -if ( ! function_exists( 'render_block_core_latest_comments' ) - && ! function_exists( 'wp_render_block_core_latest_comments' ) ) { +if ( ! function_exists( 'render_block_core_latest_comments' ) ) { require dirname( __FILE__ ) . '/../packages/block-library/src/latest-comments/index.php'; } if ( ! function_exists( 'render_block_core_latest_posts' ) ) { diff --git a/packages/block-library/src/latest-comments/index.php b/packages/block-library/src/latest-comments/index.php index 802b389019f2a..557e3dce1329b 100644 --- a/packages/block-library/src/latest-comments/index.php +++ b/packages/block-library/src/latest-comments/index.php @@ -42,7 +42,7 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) { * * @return string Returns the post content with latest comments added. */ -function wp_render_block_core_latest_comments( $attributes = array() ) { +function render_block_core_latest_comments( $attributes = array() ) { // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php. $comments = get_comments( apply_filters( @@ -179,6 +179,6 @@ function wp_render_block_core_latest_comments( $attributes = array() ) { 'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ), ), ), - 'render_callback' => 'wp_render_block_core_latest_comments', + 'render_callback' => 'render_block_core_latest_comments', ) );