tring $content The content of the builder. * * @return string HTML wrapper for the builder. */ public function builder_wrapper( $content ) { if ( get_the_ID() === $this->post_id ) { $document = Plugin::$instance->documents->get( $this->post_id ); $attributes = $document->get_container_attributes(); $content = '
'; } return $content; } /** * Enqueue preview styles. * * Registers all the preview styles and enqueues them. * * Fired by `wp_enqueue_scripts` action. * * @since 1.0.0 * @access private */ private function enqueue_styles() { // Hold-on all jQuery plugins after all HTML markup render. wp_add_inline_script( 'jquery-migrate', 'jQuery.holdReady( true );' ); Plugin::$instance->frontend->enqueue_styles(); Plugin::$instance->widgets_manager->enqueue_widgets_styles(); $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; $direction_suffix = is_rtl() ? '-rtl' : ''; wp_register_style( 'elementor-select2', ELEMENTOR_ASSETS_URL . 'lib/e-select2/css/e-select2' . $suffix . '.css', [], '4.0.6-rc.1' ); wp_register_style( 'editor-preview', ELEMENTOR_ASSETS_URL . 'css/editor-preview' . $direction_suffix . $suffix . '.css', [ 'elementor-select2', ], ELEMENTOR_VERSION ); wp_enqueue_style( 'editor-preview' ); if ( ! Plugin::$instance->experiments->is_feature_active( 'e_dom_optimization' ) ) { wp_register_style( 'editor-preview-legacy', ELEMENTOR_ASSETS_URL . 'css/editor-preview-legacy' . $direction_suffix . $suffix . '.css', [], ELEMENTOR_VERSION ); wp_enqueue_style( 'editor-preview-legacy' ); } // Handle the 'wp audio' in editor preview. wp_enqueue_style( 'wp-mediaelement' ); /** * Preview enqueue styles. * * Fires after Elementor preview styles are enqueued. * * @since 1.0.0 */ do_action( 'elementor/preview/enqueue_styles' ); } /** * Enqueue preview scripts. * * Registers all the preview scripts and enqueues them. * * Fired by `wp_enqueue_scripts` action. * * @since 1.5.4 * @access private */ private function enqueue_scripts() { Plugin::$instance->frontend->register_scripts(); Plugin::$instance->widgets_manager->enqueue_widgets_scripts(); $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; wp_enqueue_script( 'elementor-inline-editor', ELEMENTOR_ASSETS_URL . 'lib/inline-editor/js/inline-editor' . $suffix . '.js', [], ELEMENTOR_VERSION, true ); // Handle the 'wp audio' in editor preview. wp_enqueue_script( 'wp-mediaelement' ); /** * Preview enqueue scripts. * * Fires after Elementor preview scripts are enqueued. * * @since 1.5.4 */ do_action( 'elementor/preview/enqueue_scripts' ); } public function rocket_loader_filter( $tag, $handle, $src ) { return str_replace( 'frontend; if ( $frontend->has_elementor_in_page() ) { // Has header/footer/widget-template - enqueue all style/scripts/fonts. $frontend->wp_footer(); } else { // Enqueue only scripts. $frontend->enqueue_scripts(); } } /** * Preview constructor. * * Initializing Elementor preview. * * @since 1.0.0 * @access public */ public function __construct() { add_action( 'template_redirect', [ $this, 'init' ], 0 ); } }
Fatal error: Uncaught Error: Class 'Elementor\Preview' not found in /home/arasetne/public_html/wp-content/plugins/elementor/includes/plugin.php:720 Stack trace: #0 /home/arasetne/public_html/wp-content/plugins/elementor/includes/plugin.php(641): Elementor\Plugin->init_components() #1 /home/arasetne/public_html/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #2 /home/arasetne/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/arasetne/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/arasetne/public_html/wp-settings.php(695): do_action('init') #5 /home/arasetne/public_html/wp-config.php(188): require_once('/home/arasetne/...') #6 /home/arasetne/public_html/wp-load.php(50): require_once('/home/arasetne/...') #7 /home/arasetne/public_html/wp-blog-header.php(13): require_once('/home/arasetne/...') #8 /home/arasetne/public_html/index.php(17): require('/home/arasetne/...') #9 {main} thrown in /home/arasetne/public_html/wp-content/plugins/elementor/includes/plugin.php on line 720