Astra_Ext_Advanced_Hooks_Markup::shortcode_output( array $atts )
Render shortcode.
Description
Parameters
- $atts
-
(array) (Required) the shortcode args.
Return
(string)
Source
File: addons/advanced-hooks/classes/class-astra-ext-advanced-hooks-markup.php
public function shortcode_output( $atts ) {
$atts = shortcode_atts(
array(
'id' => 0,
),
$atts,
'astra_custom_layout'
);
if ( empty( $atts['id'] ) ) {
return;
}
$post_content = get_post( $atts['id'] );
if ( empty( $post_content ) ) {
return;
}
ob_start();
self::get_instance()->get_action_content( $atts['id'] );
return ob_get_clean();
}
Expand full source code Collapse full source code View on Trac