Skip to content

Commit

Permalink
fix php linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Feb 1, 2022
1 parent 27be7a8 commit f3210b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/compat/wordpress-6.0/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function gutenberg_register_remote_theme_patterns() {
if ( $response->is_error() ) {
return;
}
$patterns = $response->get_data();
$patterns_registry = WP_Block_Patterns_Registry::get_instance();
$patterns = $response->get_data();
$patterns_registry = WP_Block_Patterns_Registry::get_instance();
foreach ( $patterns as $pattern ) {
$pattern_name = sanitize_title( $pattern['title'] );
// Some patterns might be already registered as core patterns with the `core` prefix.
Expand All @@ -40,7 +40,7 @@ function gutenberg_register_remote_theme_patterns() {
'init',
function() {
$should_load_remote = apply_filters( 'should_load_remote_block_patterns', true );
if ( ! get_theme_support( 'core-block-patterns' ) || ! $should_load_remote ) {
if ( ! get_theme_support( 'core-block-patterns' ) || ! $should_load_remote ) {
return;
}
gutenberg_register_remote_theme_patterns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function get_items( $request ) {
require ABSPATH . WPINC . '/version.php';
require_once ABSPATH . 'wp-admin/includes/plugin.php';

$gutenberg_data = get_plugin_data( dirname( __DIR__, 3 ) . '/gutenberg.php', false );
$gutenberg_data = get_plugin_data( dirname( dirname( dirname( __DIR__ ) ) ) . '/gutenberg.php', false );

$query_args = array(
'locale' => get_user_locale(),
Expand Down

0 comments on commit f3210b0

Please sign in to comment.