Elementor\Post_CSS_File::enqueue PHP Method

enqueue() public method

public enqueue ( )
    public function enqueue()
    {
        if (!$this->is_build_with_elementor()) {
            return;
        }
        $meta = $this->get_meta();
        if (self::CSS_STATUS_EMPTY === $meta['status']) {
            return;
        }
        if (version_compare(ELEMENTOR_VERSION, $meta['version'], '>')) {
            $this->update();
            // Refresh new meta
            $meta = $this->get_meta();
        }
        if (self::CSS_STATUS_INLINE === $meta['status']) {
            wp_add_inline_style('elementor-frontend', $meta['css']);
        } else {
            wp_enqueue_style('elementor-post-' . $this->post_id, $this->url, [], $meta['time']);
        }
        // Handle fonts
        if (!empty($meta['fonts'])) {
            foreach ($meta['fonts'] as $font) {
                Plugin::instance()->frontend->add_enqueue_font($font);
            }
        }
    }