mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 07:07:04 +00:00
Editor: update Wordpress npm packages.
Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files. Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell. Fixes #58623. git-svn-id: https://develop.svn.wordpress.org/trunk@56065 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -29,13 +29,8 @@ function render_block_core_comments( $attributes, $content, $block ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_args = array(
|
||||
'post_id' => $post_id,
|
||||
'count' => true,
|
||||
'status' => 'approve',
|
||||
);
|
||||
// Return early if there are no comments and comments are closed.
|
||||
if ( ! comments_open( $post_id ) && get_comments( $comment_args ) === 0 ) {
|
||||
if ( ! comments_open( $post_id ) && (int) get_comments_number( $post_id ) === 0 ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -212,6 +207,7 @@ function register_legacy_post_comments_block() {
|
||||
* like `_wp_multiple_block_styles`, which is required in this case because
|
||||
* the block has multiple styles.
|
||||
*/
|
||||
/** This filter is documented in wp-includes/blocks.php */
|
||||
$metadata = apply_filters( 'block_type_metadata', $metadata );
|
||||
|
||||
register_block_type( 'core/post-comments', $metadata );
|
||||
|
||||
Reference in New Issue
Block a user