', '>'),
html_entity_decode($content, ENT_COMPAT, 'UTF-8'));
$output = ''
. do_shortcode($content)
. '
';
return apply_filters('lorem_ipsum_books_media_store_shortcode_output', $output, 'trx_table', $atts, $content);
}
add_shortcode('trx_table', 'lorem_ipsum_books_media_store_sc_table');
}
/* Register shortcode in the internal SC Builder
-------------------------------------------------------------------- */
if ( !function_exists( 'lorem_ipsum_books_media_store_sc_table_reg_shortcodes' ) ) {
//add_action('lorem_ipsum_books_media_store_action_shortcodes_list', 'lorem_ipsum_books_media_store_sc_table_reg_shortcodes');
function lorem_ipsum_books_media_store_sc_table_reg_shortcodes() {
lorem_ipsum_books_media_store_sc_map("trx_table", array(
"title" => esc_html__("Table", 'trx_utils'),
"desc" => wp_kses_data( __("Insert a table into post (page). ", 'trx_utils') ),
"decorate" => true,
"container" => true,
"params" => array(
"align" => array(
"title" => esc_html__("Content alignment", 'trx_utils'),
"desc" => wp_kses_data( __("Select alignment for each table cell", 'trx_utils') ),
"value" => "none",
"type" => "checklist",
"dir" => "horizontal",
"options" => lorem_ipsum_books_media_store_get_sc_param('align')
),
"_content_" => array(
"title" => esc_html__("Table content", 'trx_utils'),
"desc" => wp_kses_data( __("Content, created with any table-generator", 'trx_utils') ),
"divider" => true,
"rows" => 8,
"value" => "Paste here table content, generated on one of many public internet resources, for example: http://www.impressivewebs.com/html-table-code-generator/ or http://html-tables.com/",
"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_table_reg_shortcodes_vc' ) ) {
//add_action('lorem_ipsum_books_media_store_action_shortcodes_list_vc', 'lorem_ipsum_books_media_store_sc_table_reg_shortcodes_vc');
function lorem_ipsum_books_media_store_sc_table_reg_shortcodes_vc() {
vc_map( array(
"base" => "trx_table",
"name" => esc_html__("Table", 'trx_utils'),
"description" => wp_kses_data( __("Insert a table", 'trx_utils') ),
"category" => esc_html__('Content', 'trx_utils'),
'icon' => 'icon_trx_table',
"class" => "trx_sc_container trx_sc_table",
"content_element" => true,
"is_container" => false,
"show_settings_on_create" => true,
"params" => array(
array(
"param_name" => "align",
"heading" => esc_html__("Cells content alignment", 'trx_utils'),
"description" => wp_kses_data( __("Select alignment for each table cell", 'trx_utils') ),
"admin_label" => true,
"class" => "",
"value" => array_flip(lorem_ipsum_books_media_store_get_sc_param('align')),
"type" => "dropdown"
),
array(
"param_name" => "content",
"heading" => esc_html__("Table content", 'trx_utils'),
"description" => wp_kses_data( __("Content, created with any table-generator", 'trx_utils') ),
"class" => "",
"value" => esc_html__("Paste here table content, generated on one of many public internet resources, for example: http://www.impressivewebs.com/html-table-code-generator/ or http://html-tables.com/", 'trx_utils'),
"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_vc_height(),
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' => 'VcTrxTextContainerView'
) );
class WPBakeryShortCode_Trx_Table extends Lorem_Ipsum_Books_Media_Store_VC_ShortCodeContainer {}
}
}
?>