Advertisement
websupporter

Check for theme support

May 14th, 2015
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. <?php
  2. add_action( 'admin_print_styles', 'plugin_theme_support' );
  3. function plugin_theme_support(){
  4.     $theme_support = get_option( 'plugin_theme_support', 0 );
  5.     if( 0 == $theme_support && ! current_theme_supports( 'plugin_theme_support' ) ){
  6.         add_action( 'admin_notices', 'theme_does_not_support_plugin' );
  7.     }
  8. }
  9. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement