Skip to content

Conversation

@reefki
Copy link
Contributor

@reefki reefki commented Aug 16, 2017

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant