Skip to content

Commit 22f3b5f

Browse files
committed
Clean up code block class lints
1 parent 963f54d commit 22f3b5f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

projects/packages/jetpack-mu-wpcom/src/features/wpcom-blocks/code/class-code-block.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public static function setup() {
4242
self::init();
4343
add_filter( 'register_block_type_args', array( __CLASS__, 'register_block_type_args' ), 150, 2 );
4444
add_action( 'enqueue_block_editor_assets', array( __CLASS__, 'enqueue_editor_assets' ) );
45-
4645
add_action(
4746
'wp_enqueue_scripts',
4847
function () {
@@ -67,7 +66,9 @@ function_exists( 'wp_should_load_block_assets_on_demand' )
6766
add_action( 'after_setup_theme', array( __CLASS__, 'after_setup_theme' ), 100 );
6867
}
6968

70-
/** Set up the plugin. */
69+
/**
70+
* Registration of scripts and styles.
71+
*/
7172
private static function init() {
7273
$block_definition_asset_file = include Jetpack_Mu_Wpcom::BASE_DIR . 'build/wpcom-blocks-code-block-definition/wpcom-blocks-code-block-definition.asset.php';
7374
$jetpack_wpcom_modules_asset_file = include Jetpack_Mu_Wpcom::BASE_DIR . 'build-module/assets.php';
@@ -138,6 +139,14 @@ function ( array $data ) use ( $block_worker_url, $block_worker_version ): array
138139
);
139140
}
140141

142+
/**
143+
* Filter for block registration to modify the core/code block.
144+
*
145+
* @param array $args The block type arguments.
146+
* @param string $block_type The block type name.
147+
*
148+
* @return array The modified block type arguments.
149+
*/
141150
public static function register_block_type_args( array $args, string $block_type ): array {
142151
if ( 'core/code' !== $block_type ) {
143152
return $args;

0 commit comments

Comments
 (0)