Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.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

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
Database Wordpress的相关链接混合器插件_Database_Wordpress_Post - Fatal编程技术网

Database Wordpress的相关链接混合器插件

Database Wordpress的相关链接混合器插件,database,wordpress,post,Database,Wordpress,Post,我有一个与插件相关的链接搅拌机问题。它是所有相关链接插件中最好的,真的-它只是简单的编辑和一切,但是如果你添加一些相关链接到帖子,你就不能再更改它了 我的意思是: 在管理中(位于post editor下方),它被删除、更改,所有内容都是您想要的和您单击的内容。但在帖子中,它仍然只是你的第一选择 以下是关于删除的部分的代码: function deleting_a_link() { $link_info = json_decode(stripslashes($_POST['link

我有一个与插件相关的链接搅拌机问题。它是所有相关链接插件中最好的,真的-它只是简单的编辑和一切,但是如果你添加一些相关链接到帖子,你就不能再更改它了

我的意思是: 在管理中(位于post editor下方),它被删除、更改,所有内容都是您想要的和您单击的内容。但在帖子中,它仍然只是你的第一选择

以下是关于删除的部分的代码:

    function deleting_a_link() {
    $link_info = json_decode(stripslashes($_POST['link_info']), true);
    $nonce_check=check_ajax_referer('my_nonce','nonce',false);

    if ( ! current_user_can('edit_post',$link_info['post_id']) )  {
        echo json_encode(array('success'=>false,'response'=>'You don\'t have permission to make this change.'));
    } else if (!$nonce_check) {
        echo json_encode(array('success'=>false,'response'=>'Illegal connection.'));
    } else {
        $current_links=get_post_meta(intval($link_info['post_id']),'related_links_blender_links',true);

        if (is_array($current_links)) { //$current_links is false if empty
            unset($current_links[$link_info['link_no']]);
            update_post_meta(intval($link_info['post_id']),'related_links_blender_links',$current_links);
            $this->smush_the_links($link_info['post_id'],$current_links);
            echo json_encode(array('success'=>true,'link_no'=>$link_info['link_no']));
        } else {
            echo json_encode(array('success'=>false));
        }
    }
    die();
}

我看不出有什么错误。你知道有谁出了什么问题吗?

一旦停用你的插件,然后重新激活你的插件,问题就迎刃而解了

不,问题还在这里。我试过了,现在又试了一次,什么都没有改变。在数据库中仍然是我不想要的。这对我来说真的很糟糕。以下是所有代码: