Currently, we have to register the shortcode when registering element but if we register the element within a theme then it's a fault based on theme check plugin because using add_shortcode function is plugin territory.
This change makes it easier to create a custom element directly from a theme without having to register the shortcode just what Visual Composer plugin does.
To render the shortcode just simply add filter to tailor_render_element_shortcode_{TAG}, example:
function render_custom_shortcode($default, $atts, $content = '') {
// do stuff here
}
add_filter('tailor_render_element_shortcode_custom', 'render_custom_shortcode', 10, 3);
Currently, we have to register the shortcode when registering element but if we register the element within a theme then it's a fault based on theme check plugin because using
add_shortcode
function is plugin territory.This change makes it easier to create a custom element directly from a theme without having to register the shortcode just what Visual Composer plugin does.
To render the shortcode just simply add filter to
tailor_render_element_shortcode_{TAG}
, example: