Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ghost shortcode #141

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Ghost shortcode #141

wants to merge 2 commits into from

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.

None yet

1 participant