Skip to content

Instantly share code, notes, and snippets.

@jptksc
Created April 10, 2012 15:54
Show Gist options
  • Save jptksc/2352366 to your computer and use it in GitHub Desktop.
Save jptksc/2352366 to your computer and use it in GitHub Desktop.
Theme Options Check
/*-----------------------------------------------------------------------------------*/
/* Theme Options Check
/*-----------------------------------------------------------------------------------*/
opt_check();
function opt_check()
{
if ( !function_exists('option_tree_category') )
{
add_thickbox(); // Required for the plugin install dialog.
add_action('admin_notices', 'opt_check_notice');
}
}
function opt_check_notice()
{
?>
<div class='updated fade'>
<p>The "Option Tree" plugin must be installed and activated for this theme to function properly. <a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=option-tree&TB_iframe=true&width=640&height=517'); ?>" class="thickbox onclick">Install now</a></p>
</div>
<?php
}
/*function sf_admin_menu()
{
$page = add_theme_page( "On Demand Options", "Theme Options", 8, 'option_tree', 'option_tree');
}
add_action('admin_menu', 'sf_admin_menu');
add_action( 'admin_init', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
remove_menu_page('option_tree');
}*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment