Elementor\Preview::init PHP Méthode

init() public méthode

Initialize the preview mode. Fired by init action.
Since: 1.0.0
public init ( ) : void
Résultat void
    public function init()
    {
        if (is_admin() || !$this->is_preview_mode()) {
            return;
        }
        // Disable the WP admin bar in preview mode.
        add_filter('show_admin_bar', '__return_false');
        add_action('wp_enqueue_scripts', [$this, 'enqueue_styles']);
        add_action('wp_head', [$this, 'print_custom_css']);
        add_filter('body_class', [$this, 'body_class']);
        add_filter('the_content', [$this, 'builder_wrapper'], 999999);
        // Tell to WP Cache plugins do not cache this request.
        Utils::do_not_cache();
    }