我有oneplugin文件testplugin.php..It包含变量$ ABC;
//主plugin.php
if(!is_admin()){
new Funtion_Button();
}
class Function_Button
{
if(is_single() || is_page() || is_home() ){
global $post;
global $wpdb;
$query_images_args = array(
'post_type' => 'attachment' , 'post_mime_type' =>'image','post_status' => 'published', 'posts_per_page' => -1,'numberposts' => 1
$query_images = new WP_Query( $query_images_args );
$images = array();
foreach ( $query_images->posts as $image) {
$images[]= wp_get_attachment_url( $image->ID );
}
$abc[]=0;
$abc= $abc.http_build_query($images);
$_SESSION['arrayImg']=$abc;
);
}
/// recieving文件
include ('testplugin.php');
session_start();
$array1[]=$abc;
现在这个$ ABC是主要的插件页面
但我得到这个错误
致命错误:调用未定义的函数is_admin()在C:\瓦帕\ WWW \ WordPress的\可湿性粉剂内容\插件\上线98 testplugin.php
在98行,我有if(!is_admin()){