Skip to content

Commit

Permalink
Fix issues raised by the PHP linter
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed May 13, 2020
1 parent 0714520 commit bcfb64f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/global-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function gutenberg_experimental_global_styles_get_user_cpt_id() {
*/
function gutenberg_experimental_global_styles_get_core() {
return gutenberg_experimental_global_styles_get_from_file(
dirname( dirname( __FILE__ ) ) . '/experimental-default-theme.json'
__DIR__ . '/experimental-default-theme.json'
);
}

Expand Down
17 changes: 11 additions & 6 deletions lib/theme.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?php
/**
* Experimental theme config functionality.
*
* @package gutenberg
*/

/**
* Returns a full config or one of the sections containing the
Expand Down Expand Up @@ -38,17 +43,17 @@ function gutenberg_experimental_get_theme_config( $config_path, $section_name =
* @return array Filtered editor settings.
*/
function gutenberg_extend_settings_features( $settings ) {
$theme_features = gutenberg_experimental_get_theme_config(
dirname( dirname( __FILE__ ) ) . '/experimental-default-theme.json',
$theme_features = gutenberg_experimental_get_theme_config(
__DIR__ . '/experimental-default-theme.json',
'features'
);
$settings[ '__experimentalFeaturesConfig' ] = $theme_features;
$settings['__experimentalFeaturesConfig'] = $theme_features;

$theme_blocks = gutenberg_experimental_get_theme_config(
dirname( dirname( __FILE__ ) ) . '/experimental-default-theme.json',
$theme_blocks = gutenberg_experimental_get_theme_config(
__DIR__ . '/experimental-default-theme.json',
'blocks'
);
$settings[ '__experimentalBlocksConfig' ] = $theme_blocks;
$settings['__experimentalBlocksConfig'] = $theme_blocks;

return $settings;
}
Expand Down

0 comments on commit bcfb64f

Please sign in to comment.