当我的页面在 wordpress 中加载时,我收到以下错误。我怎样才能防止这种情况?
Notice: Undefined index: activated in /home3/answ/public_html/wp-content/themes/tipztheme/functions.php on line 582
Notice: Undefined index: preview in /home3/answ/public_html/wp-content/themes/tipztheme/functions.php on line 582
这是导致错误的第 508 行代码。第 508 行 if ( $_GET['activated'] == 'true' || $_GET['preview'] == 1 )
非常感谢您的帮助!
Plugin Name: DDThemes - Logo Options
Plugin URI: http://www.designdisease.com/
*/
//ADD OPTION PAGE
add_action('admin_menu', 'ddthemes_admin');
//UPON ACTIVATION OR PREVIEWED
if ( $_GET['activated'] == 'true' || $_GET['preview'] == 1 )
{
ddthemes_setup();
}
function ddthemes_admin()
{
/* PROCESS OPTION SAVING HERE */
if ( 'save' == $_REQUEST['action'] )
{
if ( $_REQUEST['savetype'] == 'header' )
{
update_option( 'ddthemes_header', $_REQUEST['ddthemes_header']);
}
}
/* SHOW THEME CUSTOMIZE PAGE HERE */
add_theme_page(__('Logo Options'), __('Logo Options'), 'edit_themes', basename(__FILE__), 'ddthemes_headeropt_page');}