' . ($content) . '
';
$output = ''
. ($content)
. ($title == '' ? '' : ('' . ($cite!='' ? '' : '') . ($title) . ($cite!='' ? '' : '') . '
'))
.'
';
return apply_filters('lorem_ipsum_books_media_store_shortcode_output', $output, 'trx_quote', $atts, $content);
}
add_shortcode('trx_quote', 'lorem_ipsum_books_media_store_sc_quote');
}
/* Register shortcode in the internal SC Builder
-------------------------------------------------------------------- */
if ( !function_exists( 'lorem_ipsum_books_media_store_sc_quote_reg_shortcodes' ) ) {
//add_action('lorem_ipsum_books_media_store_action_shortcodes_list', 'lorem_ipsum_books_media_store_sc_quote_reg_shortcodes');
function lorem_ipsum_books_media_store_sc_quote_reg_shortcodes() {
lorem_ipsum_books_media_store_sc_map("trx_quote", array(
"title" => esc_html__("Quote", 'trx_utils'),
"desc" => wp_kses_data( __("Quote text", 'trx_utils') ),
"decorate" => false,
"container" => true,
"params" => array(
"cite" => array(
"title" => esc_html__("Quote cite", 'trx_utils'),
"desc" => wp_kses_data( __("URL for quote cite", 'trx_utils') ),
"value" => "",
"type" => "text"
),
"title" => array(
"title" => esc_html__("Title (author)", 'trx_utils'),
"desc" => wp_kses_data( __("Quote title (author name)", 'trx_utils') ),
"value" => "",
"type" => "text"
),
"_content_" => array(
"title" => esc_html__("Quote content", 'trx_utils'),
"desc" => wp_kses_data( __("Quote content", 'trx_utils') ),
"rows" => 4,
"value" => "",
"type" => "textarea"
),
"width" => lorem_ipsum_books_media_store_shortcodes_width(),
"top" => lorem_ipsum_books_media_store_get_sc_param('top'),
"bottom" => lorem_ipsum_books_media_store_get_sc_param('bottom'),
"left" => lorem_ipsum_books_media_store_get_sc_param('left'),
"right" => lorem_ipsum_books_media_store_get_sc_param('right'),
"id" => lorem_ipsum_books_media_store_get_sc_param('id'),
"class" => lorem_ipsum_books_media_store_get_sc_param('class'),
"animation" => lorem_ipsum_books_media_store_get_sc_param('animation'),
"css" => lorem_ipsum_books_media_store_get_sc_param('css')
)
));
}
}
/* Register shortcode in the VC Builder
-------------------------------------------------------------------- */
if ( !function_exists( 'lorem_ipsum_books_media_store_sc_quote_reg_shortcodes_vc' ) ) {
//add_action('lorem_ipsum_books_media_store_action_shortcodes_list_vc', 'lorem_ipsum_books_media_store_sc_quote_reg_shortcodes_vc');
function lorem_ipsum_books_media_store_sc_quote_reg_shortcodes_vc() {
vc_map( array(
"base" => "trx_quote",
"name" => esc_html__("Quote", 'trx_utils'),
"description" => wp_kses_data( __("Quote text", 'trx_utils') ),
"category" => esc_html__('Content', 'trx_utils'),
'icon' => 'icon_trx_quote',
"class" => "trx_sc_single trx_sc_quote",
"content_element" => true,
"is_container" => false,
"show_settings_on_create" => true,
"params" => array(
array(
"param_name" => "cite",
"heading" => esc_html__("Quote cite", 'trx_utils'),
"description" => wp_kses_data( __("URL for the quote cite link", 'trx_utils') ),
"class" => "",
"value" => "",
"type" => "textfield"
),
array(
"param_name" => "title",
"heading" => esc_html__("Title (author)", 'trx_utils'),
"description" => wp_kses_data( __("Quote title (author name)", 'trx_utils') ),
"admin_label" => true,
"class" => "",
"value" => "",
"type" => "textfield"
),
array(
"param_name" => "content",
"heading" => esc_html__("Quote content", 'trx_utils'),
"description" => wp_kses_data( __("Quote content", 'trx_utils') ),
"class" => "",
"value" => "",
"type" => "textarea_html"
),
lorem_ipsum_books_media_store_get_vc_param('id'),
lorem_ipsum_books_media_store_get_vc_param('class'),
lorem_ipsum_books_media_store_get_vc_param('animation'),
lorem_ipsum_books_media_store_get_vc_param('css'),
lorem_ipsum_books_media_store_vc_width(),
lorem_ipsum_books_media_store_get_vc_param('margin_top'),
lorem_ipsum_books_media_store_get_vc_param('margin_bottom'),
lorem_ipsum_books_media_store_get_vc_param('margin_left'),
lorem_ipsum_books_media_store_get_vc_param('margin_right')
),
'js_view' => 'VcTrxTextView'
) );
class WPBakeryShortCode_Trx_Quote extends Lorem_Ipsum_Books_Media_Store_VC_ShortCodeSingle {}
}
}
?>