ISTS', ], ]; if ( 'floating-buttons' === $floating_element_type ) { $meta_query[] = [ 'relation' => 'OR', [ 'key' => Module::FLOATING_ELEMENTS_TYPE_META_KEY, 'compare' => 'NOT EXISTS', ], [ 'key' => Module::FLOATING_ELEMENTS_TYPE_META_KEY, 'value' => 'floating-buttons', ], ]; } else { $meta_query[] = [ 'key' => Module::FLOATING_ELEMENTS_TYPE_META_KEY, 'value' => $floating_element_type, ]; } return $meta_query; } /** * Tries to find the post id of the floating element that is set as entire site. * If found, returns the post id, otherwise returns 0. * * @param string $floating_element_type * * @return int */ public static function get_set_as_entire_site_post_id( string $floating_element_type ): int { static $types = []; if ( isset( $types[ $floating_element_type ] ) ) { return $types[ $floating_element_type ]; } $query = new \WP_Query( [ 'post_type' => Floating_Buttons_Module::CPT_FLOATING_BUTTONS, 'posts_per_page' => -1, 'post_status' => 'publish', 'fields' => 'ids', 'no_found_rows' => true, 'update_post_term_cache' => false, 'meta_query' => static::get_meta_query_for_floating_buttons( $floating_element_type ), ] ); foreach ( $query->get_posts() as $post_id ) { $conditions = get_post_meta( $post_id, '_elementor_conditions', true ); if ( ! $conditions ) { continue; } if ( in_array( 'include/general', $conditions ) ) { $types[ $floating_element_type ] = $post_id; return $post_id; } } return 0; } public function set_as_entire_site( $actions ) { $floating_element_type = static::get_floating_element_type( $this->get_main_id() ); $current_set_as_entire_site_post_id = static::get_set_as_entire_site_post_id( $floating_element_type ); if ( $current_set_as_entire_site_post_id === $this->get_main_id() ) { $actions['set_as_entire_site'] = sprintf( '%s', $this->get_post()->ID, wp_create_nonce( 'remove_from_entire_site_' . $this->get_post()->ID ), esc_html__( 'Remove From Entire Site', 'elementor' ) ); } else { $actions['set_as_entire_site'] = sprintf( '%s', $this->get_post()->ID, wp_create_nonce( 'set_as_entire_site_' . $this->get_post()->ID ), esc_html__( 'Set as Entire Site', 'elementor' ) ); } return $actions; } public static function get_title() { return esc_html__( 'Floating Element', 'elementor' ); } public static function get_plural_title() { return esc_html__( 'Floating Elements', 'elementor' ); } public static function get_create_url() { return parent::get_create_url() . '#library'; } public function save( $data ) { if ( empty( $data['settings']['template'] ) ) { $data['settings']['template'] = Page_Templates_Module::TEMPLATE_CANVAS; } return parent::save( $data ); } public function admin_columns_content( $column_name ) { if ( 'elementor_library_type' === $column_name ) { $admin_filter_url = admin_url( Source_Local::ADMIN_MENU_SLUG . '&elementor_library_type=' . $this->get_name() ); $meta = static::get_floating_element_type( $this->get_main_id() ); printf( '%s', $admin_filter_url, Module::get_floating_elements_types()[ $meta ] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } public function get_edit_url() { return add_query_arg( [ 'post' => $this->get_main_id(), 'action' => 'elementor', 'floating_element' => get_post_meta( $this->get_main_id(), Module::FLOATING_ELEMENTS_TYPE_META_KEY, true ), ], admin_url( 'post.php' ) ); } protected function get_remote_library_config() { $config = [ 'type' => 'floating_button', 'default_route' => 'templates/floating-buttons', 'autoImportSettings' => true, ]; return array_replace_recursive( parent::get_remote_library_config(), $config ); } }
Fatal error: Uncaught Error: Class 'Elementor\Modules\FloatingButtons\Documents\Floating_Buttons' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/modules/floating-buttons/module.php:89 Stack trace: #0 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/core/base/module.php(85): Elementor\Modules\FloatingButtons\Module->__construct() #1 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/core/modules-manager.php(64): Elementor\Core\Base\Module::instance() #2 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php(755): Elementor\Core\Modules_Manager->__construct() #3 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php(673): Elementor\Plugin->init_components() #4 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #5 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /var/www/html/dportilho.com.br/web/wp-inclu in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/modules/floating-buttons/module.php on line 89