shortcode_name = 'adminz_post_meta'; $xxx->shortcode_title = 'Uxbuilder post meta'; $xxx->shortcode_icon = 'text'; $xxx->shortcode_type = 'container'; $xxx->shortcode_compile = false; $options = [ 'meta_key' => [ 'type' => 'textfield', 'heading' => 'Meta key', 'default' => '_thumbnail_id', ] ]; $options = array_merge( $options, require ADMINZ_DIR . "includes/shortcodes/inc/flatsome-element-advanced.php", ); $xxx->options = $options; $xxx->shortcode_callback = function ($atts, $content) { $atts = shortcode_atts( array( "meta_key" => "_thumbnail_id", 'css' => '', 'class' => '', 'visibility' => '', ), $atts, ); $classes = array(); if (! empty($atts['class'])) $classes[] = $atts['class']; if (! empty($atts['visibility'])) $classes[] = $atts['visibility']; if ($atts['visibility'] == 'hidden') { return; } ob_start(); ?>
general_element();