0, ), $atts, self::TAG ); return self::render_template( (int) $atts['id'] ); } /** * Rendered HTML of an embeddable template. * * @param int $template_id Template ID. * @return string */ public static function render_template( $template_id ) { $template_id = Helpers::translate_id( (int) $template_id, Post_Type::POST_TYPE ); if ( ! $template_id || Post_Type::POST_TYPE !== get_post_type( $template_id ) ) { return ''; } $type = Template_Types::of( $template_id ); if ( 'popup' === $type ) { Popups::queue( $template_id ); return ''; } /** * Filters the template types that can be embedded with the shortcode, widget and block. * * @param string[] $types Template types. */ $embeddable = (array) apply_filters( 'buildify_embeddable_types', array( 'section', 'header', 'footer' ) ); if ( ! in_array( $type, $embeddable, true ) ) { return ''; } wp_enqueue_style( 'buildify-frontend' ); // The template CSS is loaded as a stylesheet, so the markup has no