芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-content/plugins/elementor/modules/atomic-widgets/module.php
register_experiment(); if ( Plugin::$instance->experiments->is_feature_active( self::EXPERIMENT_NAME ) ) { add_filter( 'elementor/editor/v2/packages', fn( $packages ) => $this->add_packages( $packages ) ); add_filter( 'elementor/widgets/register', fn( Widgets_Manager $widgets_manager ) => $this->register_widgets( $widgets_manager ) ); add_action( 'elementor/editor/after_enqueue_scripts', fn() => $this->enqueue_scripts() ); } } private function register_experiment() { Plugin::$instance->experiments->add_feature( [ 'name' => self::EXPERIMENT_NAME, 'title' => esc_html__( 'Atomic Widgets', 'elementor' ), 'description' => esc_html__( 'Enable atomic widgets.', 'elementor' ), 'hidden' => true, 'default' => Experiments_Manager::STATE_INACTIVE, 'release_status' => Experiments_Manager::RELEASE_STATUS_ALPHA, ] ); } private function add_packages( $packages ) { return array_merge( $packages, self::PACKAGES ); } private function register_widgets( Widgets_Manager $widgets_manager ) { $widgets_manager->register( new Atomic_Heading() ); $widgets_manager->register( new Atomic_Image() ); } /** * Enqueue the module scripts. * * @return void */ private function enqueue_scripts() { wp_enqueue_script( 'elementor-atomic-widgets-editor', $this->get_js_assets_url( 'atomic-widgets-editor' ), [ 'elementor-editor' ], ELEMENTOR_VERSION, true ); } }