Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
注意:未定义索引:type//Wordpress主题_Wordpress_Undefined - Fatal编程技术网

注意:未定义索引:type//Wordpress主题

注意:未定义索引:type//Wordpress主题,wordpress,undefined,Wordpress,Undefined,我花了几个小时研究我的wordpress主题。它与WP版本3.4/3.51不兼容。当调试设置为TRUE/available时: 出现许多通知。到目前为止,我已经完成了所有通知,只剩下一个。我找不到任何解决办法。我希望有人能帮助我。 我只有PHP的基本知识 注意:未定义索引:键入 <?php foreach ($options as $value) { switch ( $value['type'] ){ case "section": $i++; ?> 这就是通知的作

我花了几个小时研究我的wordpress主题。它与WP版本3.4/3.51不兼容。当调试设置为TRUE/available时: 出现许多通知。到目前为止,我已经完成了所有通知,只剩下一个。我找不到任何解决办法。我希望有人能帮助我。 我只有PHP的基本知识

注意:未定义索引:键入

<?php foreach ($options as $value) { 
switch ( $value['type'] ){
case "section": $i++;  ?>   

这就是通知的作用:开关($value['type']){


这是页面的一部分。它是我的主题的主题选项页面。

    <form method="post" enctype="multipart/form-data" >         
    <div class="info top-info"> 
     <div class="settingsaved">
        <?php
// Form results if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated2 fade"><p><strong>Settings Saved</strong></p></div>';
if ( isset( $_REQUEST['reset'] ) ) echo '<div id="message" class="updated2 fade"><p><strong>Settings Reset</strong></p></div>';
?></div>        
<div style="float: right;"><input type="submit" name="save" class="button-primary  save-options" value="Save Changes"></div><div style="clear: both;"></div></div><div id="content" class="clearfix"><div id="options_tabs" class="ui-tabs">
<ul class="options_tabs ui-tabs-nav">
<?php foreach ($options as $value) { 
switch ( $value['type'] ){case "section": $i++;                 
?><li class="ui-state-default ui-corner-top">
<a href="#option_<?php echo $value['id']; ?>">
<?php if ($value['icon']){ ?>
<img src="<?php echo $theme_directory ?>mm/files/images/icons/<?php echo $value['icon'] ?>"/>   
<?php } ?>
div style=" display: inline-block; margin-left: 6px; margin-top: -1px;position: absolute;"><?php echo $value['name']; ?></div><span></span></a></li>
<?php break;
}}?>
</ul><?php foreach ($options as $value) {
switch ( $value['type'] ) {
// --> open the option section
case "open": ?><?php break;// --> create a subheadline
case "subhead": ?>
<div class="mmtheme-sub-header"> <h2> <?php echo $value['name']; ?>  
<div style="float: right;"><a href="#" class="info-icon">Description</a><div class="description"><div class="inner"><?php echo htmlspecialchars_decode( $value['desc'] ); ?></div></div></div> </h2></div>
<?php break;    
// --> close the option section
case "subhead2": ?>


(mm-includes.php)

期待获得解决方案,提前感谢!


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

多亏了tJerry!你解决了我的问题!

我还有一个通知,现在就出现了——下面是通知和suorce。如果我把它从我的眼睛里拿开,有人会很高兴吗

这是主题选项中的通知。

    <form method="post" enctype="multipart/form-data" >         
    <div class="info top-info"> 
     <div class="settingsaved">
        <?php
// Form results if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated2 fade"><p><strong>Settings Saved</strong></p></div>';
if ( isset( $_REQUEST['reset'] ) ) echo '<div id="message" class="updated2 fade"><p><strong>Settings Reset</strong></p></div>';
?></div>        
<div style="float: right;"><input type="submit" name="save" class="button-primary  save-options" value="Save Changes"></div><div style="clear: both;"></div></div><div id="content" class="clearfix"><div id="options_tabs" class="ui-tabs">
<ul class="options_tabs ui-tabs-nav">
<?php foreach ($options as $value) { 
switch ( $value['type'] ){case "section": $i++;                 
?><li class="ui-state-default ui-corner-top">
<a href="#option_<?php echo $value['id']; ?>">
<?php if ($value['icon']){ ?>
<img src="<?php echo $theme_directory ?>mm/files/images/icons/<?php echo $value['icon'] ?>"/>   
<?php } ?>
div style=" display: inline-block; margin-left: 6px; margin-top: -1px;position: absolute;"><?php echo $value['name']; ?></div><span></span></a></li>
<?php break;
}}?>
</ul><?php foreach ($options as $value) {
switch ( $value['type'] ) {
// --> open the option section
case "open": ?><?php break;// --> create a subheadline
case "subhead": ?>
<div class="mmtheme-sub-header"> <h2> <?php echo $value['name']; ?>  
<div style="float: right;"><a href="#" class="info-icon">Description</a><div class="description"><div class="inner"><?php echo htmlspecialchars_decode( $value['desc'] ); ?></div></div></div> </h2></div>
<?php break;    
// --> close the option section
case "subhead2": ?>
注意:在第17行的\wp content\themes\bardot\includes\update\u notifier.php中使用未定义的常量update\u notifier-假定为“update\u notifier”

*第17行*

    add_dashboard_page( $theme_data['Name'] . 'Theme Updates ', '&nbsp;<span class="update-plugins 

count-2"><span class="update-count">New Theme Update</span></span>', 'administrator','m3-

updates', update_notifier);
add_dashboard_页面($theme_data['Name']。'theme Updates','New theme Update','administrator','m3-
更新',更新通知程序);

如果在
switch
语句之前插入此项,则通知将消失,因为如果未设置该值,将跳过开关块

if(!isset($value['type']))
    continue;

print\r($options)
的输出是什么?我讨厌开发人员在没有启用
WP\u DEBUG
的情况下编写代码…1000ś谢谢!这非常有效。我又弹出了一个通知,我在另一个“评论”中发布了它这是主题选项中的通知。注意:在第17行**第17行**添加仪表板页面($Theme_data['Name'].'主题更新','New Theme update','administrator','m3-Updates',update_notifier')中使用未定义的常量update_notifier-假设在\wp content\themes\bardot\includes\update_notifier.php中使用'update_notifier';我相信你可以在
update\u notifier