mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
* reviewed;
This commit is contained in:
@@ -17,9 +17,8 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
|
||||
* Blocks constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
// add_action( 'init', array( &$this, 'block_editor_render' ) );
|
||||
add_action( 'init', array( &$this, 'block_editor_render' ), 11 );
|
||||
add_filter( 'block_type_metadata_settings', array( &$this, 'block_type_metadata_settings' ), 9999, 2 );
|
||||
add_action( 'init', array( &$this, 'wp_register_block_metadata_collection' ), 11 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,8 +68,9 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
|
||||
* Register UM Blocks.
|
||||
*
|
||||
* @uses register_block_type_from_metadata()
|
||||
* @uses wp_register_block_metadata_collection()
|
||||
*/
|
||||
public function wp_register_block_metadata_collection() {
|
||||
public function block_editor_render() {
|
||||
/**
|
||||
* Filters the variable to disable adding UM Blocks to Gutenberg editor.
|
||||
*
|
||||
@@ -100,10 +100,9 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_register_block_metadata_collection(
|
||||
UM_PATH . 'build',
|
||||
UM_PATH . 'build/blocks-manifest.php'
|
||||
);
|
||||
if ( function_exists( 'wp_register_block_metadata_collection' ) ) {
|
||||
wp_register_block_metadata_collection( UM_PATH . 'build', UM_PATH . 'build/blocks-manifest.php' );
|
||||
}
|
||||
|
||||
$blocks = array(
|
||||
'um-block/um-member-directories' => array(
|
||||
|
||||
Reference in New Issue
Block a user