Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Add version to doing it wrong calls (#5134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley authored Nov 19, 2021
1 parent 3b006db commit 70d130b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/BlockTypes/AbstractBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function enqueue_editor_assets() {
*/
protected function initialize() {
if ( empty( $this->block_name ) ) {
_doing_it_wrong( __METHOD__, esc_html( __( 'Block name is required.', 'woo-gutenberg-products-block' ) ), '4.5.0' );
_doing_it_wrong( __METHOD__, esc_html__( 'Block name is required.', 'woo-gutenberg-products-block' ), '4.5.0' );
return false;
}
$this->integration_registry->initialize( $this->block_name . '_block' );
Expand Down
6 changes: 3 additions & 3 deletions src/Integrations/IntegrationRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function initialize( $registry_identifier = '' ) {
}

if ( empty( $this->registry_identifier ) ) {
_doing_it_wrong( __METHOD__, esc_html( __( 'Integration registry requires an identifier.', 'woo-gutenberg-products-block' ) ) );
_doing_it_wrong( __METHOD__, esc_html__( 'Integration registry requires an identifier.', 'woo-gutenberg-products-block' ), '4.6.0' );
return false;
}

Expand Down Expand Up @@ -64,7 +64,7 @@ public function register( IntegrationInterface $integration ) {

if ( $this->is_registered( $name ) ) {
/* translators: %s: Integration name. */
_doing_it_wrong( __METHOD__, esc_html( sprintf( __( '"%s" is already registered.', 'woo-gutenberg-products-block' ), $name ) ) );
_doing_it_wrong( __METHOD__, esc_html( sprintf( __( '"%s" is already registered.', 'woo-gutenberg-products-block' ), $name ) ), '4.6.0' );
return false;
}

Expand Down Expand Up @@ -95,7 +95,7 @@ public function unregister( $name ) {

if ( ! $this->is_registered( $name ) ) {
/* translators: %s: Integration name. */
_doing_it_wrong( __METHOD__, esc_html( sprintf( __( 'Integration "%s" is not registered.', 'woo-gutenberg-products-block' ), $name ) ) );
_doing_it_wrong( __METHOD__, esc_html( sprintf( __( 'Integration "%s" is not registered.', 'woo-gutenberg-products-block' ), $name ) ), '4.6.0' );
return false;
}

Expand Down

0 comments on commit 70d130b

Please sign in to comment.