芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cepali.edu.mx/wp-content/plugins/elementor/modules/favorites/types/widgets.php
get_available() ); } /** * Get all available widgets. * * @return string[] */ public function get_available() { return array_merge( array_keys( Plugin::instance()->widgets_manager->get_widget_types() ), array_keys( Plugin::instance()->elements_manager->get_element_types() ) ); } /** * Update the categories of a widget inside a filter. * * @param $document */ public function update_widget_categories( $document ) { foreach ( $this->values() as $favorite ) { $widget = Plugin::$instance->widgets_manager->get_widget_types( $favorite ); // If it's not a widget, maybe it's an element. if ( ! $widget ) { $widget = Plugin::$instance->elements_manager->get_element_types( $favorite ); } if ( $widget ) { $widget->set_config( 'categories', [ static::CATEGORY_SLUG ] ); } } } }