Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/wp-includes/class-wp-block-type-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function register( $name, $args = array() ) {
if ( ! is_string( $name ) ) {
_doing_it_wrong(
__METHOD__,
__( 'Block type names must be strings.' ),
/* translators: %s: The received block type name type. */
sprintf( __( 'Block type names must be strings, received %s.' ), gettype( $name ) ),
'5.0.0'
);
return false;
Expand All @@ -64,7 +65,8 @@ public function register( $name, $args = array() ) {
if ( preg_match( '/[A-Z]+/', $name ) ) {
_doing_it_wrong(
__METHOD__,
__( 'Block type names must not contain uppercase characters.' ),
/* translators: %s: Block name. */
sprintf( __( 'Block type names must not contain uppercase characters. "%s" was given.' ), $name ),
Comment thread
manishdhorepatil-art marked this conversation as resolved.
Outdated
'5.0.0'
);
return false;
Expand All @@ -74,7 +76,8 @@ public function register( $name, $args = array() ) {
if ( ! preg_match( $name_matcher, $name ) ) {
_doing_it_wrong(
__METHOD__,
__( 'Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type' ),
/* translators: %s: Block name. */
sprintf( __( 'Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type. "%s" was given.' ), $name ),
Comment thread
manishdhorepatil-art marked this conversation as resolved.
Outdated
'5.0.0'
);
return false;
Expand Down
Loading