Skip to content

Instantly share code, notes, and snippets.

@ivandotv
Created July 8, 2013 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandotv/5952231 to your computer and use it in GitHub Desktop.
Save ivandotv/5952231 to your computer and use it in GitHub Desktop.
Aktivacija plugina samo ako ga tema explicitno podrzava.
add_action('after_setup_theme','theme_setup');
function theme_setup()
{
add_theme_support('prefix-someCPT');
}
add_action('init','plugin_init');
function plugin_init()
{
if( current_theme_supports('prefix-someCPTq') )
{
// plugin code
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment