(float) get_bloginfo('version'), 'rest_rootURL' => get_rest_url(), )); wp_register_style( 'toggle-content-editor-css', TOGGLE_CONTENT_ADMIN_URL . '/dist/controls.css', array( "create-block-toggle-content-block-editor" ), $controls_dependencies['version'], 'all' ); if (!WP_Block_Type_Registry::get_instance()->is_registered('essential-blocks/countdown')) { register_block_type( Countdown_Helper::get_block_register_path("toggle-content/toggle-content", TOGGLE_CONTENT_ADMIN_PATH), array( 'editor_script' => 'create-block-toggle-content-block-editor', 'editor_style' => 'toggle-content-editor-css', 'render_callback' => function ($attributes, $content) { if (!is_admin()) { wp_enqueue_script('essential-blocks-toggle-content-frontend'); wp_enqueue_style('create-block-toggle-content-block-editor'); } return $content; } ) ); } } add_action('init', 'create_block_toggle_content_block_init');