0
當我的頁面加載到wordpress時,出現以下錯誤。我怎樣才能防止這一點?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');}