*/ class Reuna_Blocos_Admin { /** * The ID of this plugin. * * @since 1.0.0 * @access private * @var string $plugin_name The ID of this plugin. */ private $plugin_name; /** * The version of this plugin. * * @since 1.0.0 * @access private * @var string $version The current version of this plugin. */ private $version; /** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $plugin_name The name of this plugin. * @param string $version The version of this plugin. */ public function __construct( $plugin_name, $version ) { $this->plugin_name = $plugin_name; $this->version = $version; } /** * Register the stylesheets for the admin area. * * @since 1.0.0 */ public function enqueue_styles() { } /** * Register the JavaScript for the admin area. * * @since 1.0.0 */ public function enqueue_scripts() { } public function register_material_block() { acf_register_block([ 'name' => 'material', 'title' => __('Material', 'reuna-blocos'), 'description' => __('Material para download', 'reuna-blocos'), 'category' => 'common', 'icon' => 'media-default', 'keywords' => ['material', 'reuna'], 'render_template' => plugin_dir_path( __FILE__ ) . '../assets/partials/material.php', 'enqueue_style' => plugin_dir_url( __FILE__ ) . '../dist/css/blocos.css' ]); } public function register_material_fields() { register_extended_field_group([ 'title' => 'Material', 'fields' => [ Image::make('Capa')->returnFormat('id'), File::make('Arquivo (online)'), File::make('Arquivo (impressão)'), ], 'location' => [ Location::if('block', 'acf/material'), ], ]); } }