PUM_Admin_BlockEditor::init()
Initialize
Description Description
Source Source
File: classes/Admin/BlockEditor.php
public static function init() { // Bail early if the Block Playground is active and ahead of core. if ( defined( 'PUM_BLOCK_PLAYGROUND' ) && version_compare( PUM_BLOCK_PLAYGROUND, self::$version, '>' ) ) { return; } // TODO Test if this is needed in core or not. add_action( 'enqueue_block_editor_assets', [ 'PUM_Site_Assets', 'register_styles' ] ); add_action( 'enqueue_block_editor_assets', [ __CLASS__, 'register_editor_assets' ] ); add_action( 'wp_loaded', [ __CLASS__, 'add_attributes_to_registered_blocks' ], 999 ); // Here for future use. // add_action( 'enqueue_block_assets', [ __CLASS__, 'register_block_assets' ] ); }
Expand full source code Collapse full source code View on Trac