Skip to content

Commit

Permalink
lint PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 22, 2024
1 parent 32032cc commit 4ff0e79
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions lib/experimental/stylebook/classic-screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
* @package gutenberg
*/

/**
* Add a Styles submenu link for Classic themes.
*/
/**
* Add a Styles submenu link for Classic themes.

Check failure on line 9 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
*/
function gutenberg_add_styles_link() {
if ( ! wp_is_block_theme() ) {
add_theme_page(
__( 'Styles', 'gutenberg' ),
__( 'Styles', 'gutenberg' ),
'edit_theme_options',
'gutenberg-stylebook-static',
'gutenberg_stylebook_render',
3
);
}
if ( ! wp_is_block_theme() ) {
add_theme_page(

Check warning on line 13 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Found precision alignment of 1 spaces.

Check failure on line 13 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Opening statement of multi-line function call not indented correctly; expected 8 spaces but found 9
__( 'Styles', 'gutenberg' ),

Check failure on line 14 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
__( 'Styles', 'gutenberg' ),

Check failure on line 15 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
'edit_theme_options',

Check failure on line 16 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
'gutenberg-stylebook-static',

Check failure on line 17 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
'gutenberg_stylebook_render',

Check failure on line 18 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
3

Check failure on line 19 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 13 spaces but found 12
);

Check failure on line 20 in lib/experimental/stylebook/classic-screen.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Multi-line function call not indented correctly; expected 9 spaces but found 8
}
}
add_action( 'admin_menu', 'gutenberg_add_styles_link' );

Expand All @@ -37,8 +37,8 @@ static function ( $classes ) {
*/

function gutenberg_stylebook_render() {
$block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) );
$custom_settings = array(
$block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) );
$custom_settings = array(
'siteUrl' => site_url(),
'styles' => get_block_editor_theme_styles(),
'supportsLayout' => wp_theme_has_theme_json(),
Expand All @@ -57,7 +57,7 @@ function gutenberg_stylebook_render() {
);
block_editor_rest_api_preload( $preload_paths, $block_editor_context );

// Preload server-registered block schemas.
// Preload server-registered block schemas.
wp_add_inline_script(
'wp-blocks',
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
Expand All @@ -83,5 +83,5 @@ function gutenberg_stylebook_render() {
wp_enqueue_script( 'wp-edit-site' );
wp_enqueue_media();

echo '<div id="gutenberg-stylebook" class="edit-site"></div>';
echo '<div id="gutenberg-stylebook" class="edit-site"></div>';
}

0 comments on commit 4ff0e79

Please sign in to comment.