Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
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
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-block-bindings-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ public function get_registered( string $source_name ) {
*
* @since 6.5.0
*
* @param string $source_name The name of the source.
* @param string|null $source_name The name of the source.
* @return bool `true` if the block bindings source is registered, `false` otherwise.
*/
public function is_registered( $source_name ) {
return isset( $this->sources[ $source_name ] );
return isset( $source_name, $this->sources[ $source_name ] );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public function get_all_registered( $outside_init_only = false ) {
*
* @since 5.5.0
*
* @param string $category_name Pattern category name including namespace.
* @param string|null $category_name Pattern category name including namespace.
* @return bool True if the pattern category is registered, false otherwise.
*/
public function is_registered( $category_name ) {
return isset( $this->registered_categories[ $category_name ] );
return isset( $category_name, $this->registered_categories[ $category_name ] );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-block-patterns-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ public function get_all_registered( $outside_init_only = false ) {
*
* @since 5.5.0
*
* @param string $pattern_name Block pattern name including namespace.
* @param string|null $pattern_name Block pattern name including namespace.
* @return bool True if the pattern is registered, false otherwise.
*/
public function is_registered( $pattern_name ) {
return isset( $this->registered_patterns[ $pattern_name ] );
return isset( $pattern_name, $this->registered_patterns[ $pattern_name ] );
}

public function __wakeup() {
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/class-wp-block-styles-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ public function get_registered_styles_for_block( $block_name ) {
*
* @since 5.3.0
*
* @param string $block_name Block type name including namespace.
* @param string $block_style_name Block style name.
* @param string|null $block_name Block type name including namespace.
* @param string|null $block_style_name Block style name.
* @return bool True if the block style is registered, false otherwise.
*/
public function is_registered( $block_name, $block_style_name ) {
return isset( $this->registered_block_styles[ $block_name ][ $block_style_name ] );
return isset( $block_name, $block_style_name, $this->registered_block_styles[ $block_name ][ $block_style_name ] );
Comment thread
mukeshpanchal27 marked this conversation as resolved.
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-block-templates-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ public function get_by_query( $query = array() ) {
*
* @since 6.7.0
*
* @param string $template_name Template name.
* @param string|null $template_name Template name.
* @return bool True if the template is registered, false otherwise.
*/
public function is_registered( $template_name ) {
return isset( $this->registered_templates[ $template_name ] );
return isset( $template_name, $this->registered_templates[ $template_name ] );
}

/**
Expand Down
Loading