From 6f3fdf244e55971d7f346e6f29971c5093a5c655 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 3 Jun 2011 22:37:13 +0000 Subject: [PATCH] Check result of add_theme_page(). Return if false. Props greuben. fixes #17677 git-svn-id: http://svn.automattic.com/wordpress/trunk@18135 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyeleven/inc/theme-options.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php index 213841e1a..3b91775bb 100644 --- a/wp-content/themes/twentyeleven/inc/theme-options.php +++ b/wp-content/themes/twentyeleven/inc/theme-options.php @@ -88,6 +88,10 @@ function twentyeleven_theme_options_add_page() { 'theme_options', // Menu slug, used to uniquely identify the page 'theme_options_render_page' // Function that renders the options page ); + + if ( ! $theme_page ) + return; + $help = '

' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:' ) . '

' . '
    ' . '
  1. ' . __( 'Color Scheme: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.' ) . '
  2. ' .