_FIELDS ) ) { $value = get_post_meta( $post_id, '_elementor_' . $column_name, true ); if ( Custom_Code_Metabox::FIELD_LOCATION === $column_name ) { $location_labels = $this->meta_box->get_location_labels(); if ( isset( $location_labels[ $value ] ) ) { $value = $location_labels[ $value ]; } } echo esc_html( $value ); } elseif ( self::ADDITIONAL_COLUMN_INSTANCES === $column_name ) { /** @var Conditions_Manager $conditions_manager */ $conditions_manager = Plugin::instance()->modules_manager->get_modules( 'theme-builder' )->get_conditions_manager(); echo esc_html( implode( ', ', $conditions_manager->get_document_instances( $post_id ) ) ); } } private function get_snippets_by_location( $location ) { return get_posts( [ 'numberposts' => -1, 'post_type' => self::CPT, 'meta_query' => [ [ 'key' => '_elementor_' . Custom_Code_Metabox::FIELD_LOCATION, 'value' => $location, ], ], // Order. 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_key' => '_elementor_' . Custom_Code_Metabox::FIELD_PRIORITY, ] ); } private function print_snippets( $location ) { // Do not print snippets on safe mode. if ( isset( $_REQUEST['elementor-mode'] ) && 'safe' === $_REQUEST['elementor-mode'] ) { return; } $snippets = $this->get_snippets_by_location( $location ); /** @var \ElementorPro\Modules\ThemeBuilder\Module $theme_builder */ $theme_builder = Plugin::instance()->modules_manager->get_modules( 'theme-builder' ); $documents_by_conditions = $theme_builder->get_conditions_manager()->get_documents_for_location( $location ); $location_manager = $theme_builder->get_locations_manager(); foreach ( $snippets as $snippet ) { // Add snippet to location. // Also handling situation without conditions, bind current snippet id with current location. if ( isset( $documents_by_conditions[ $snippet->ID ] ) || ! get_post_meta( $snippet->ID, '_elementor_conditions', true ) ) { $location_manager->add_doc_to_location( $location, $snippet->ID ); } } elementor_theme_do_location( $location ); } }
Fatal error: Uncaught Error: Class '\ElementorPro\Modules\CustomCode\Module' not found in /home/sportuga/public_html/wp-content/plugins/pro-elements/core/modules-manager.php:82 Stack trace: #0 /home/sportuga/public_html/wp-content/plugins/pro-elements/plugin.php(356): ElementorPro\Core\Modules_Manager->__construct() #1 /home/sportuga/public_html/wp-includes/class-wp-hook.php(324): ElementorPro\Plugin->on_elementor_init('') #2 /home/sportuga/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/sportuga/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/sportuga/public_html/wp-content/plugins/elementor/includes/plugin.php(658): do_action('elementor/init') #5 /home/sportuga/public_html/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #6 /home/sportuga/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #7 /home/sportuga/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /home/sportuga/public_html/ in /home/sportuga/public_html/wp-content/plugins/pro-elements/core/modules-manager.php on line 82