我在个人插件中创建,从个人表中恢复数据。Con add\\u action(“the\\u content”,“my\\u plugin\\u content”);乌纳帕吉纳的《远观世界》(posso far vedere il contenuto)。我想用add\\u filter(\'save\\u post\',\'my\\u plugin\\u content\')保存wp\\u posts中的内容,但内容为空。
function my_plugin_content($content){
$current_page = $wp->request;
include_once(plugin_dir_path( __FILE__ ).\'views/view.php\');
$obj = new Loader;
$content.=$obj->controller($current_page);
$my_post = array();
$my_post[\'ID\'] = $post->ID;
$my_post[\'post_content\']=$cont;
}
在另一个文件中,我运行了数据恢复查询,我引用了加载视图的文件加载器文件加载器
public function view($view, array $dati){
require(DIR_PLUGIN.\'views/\'.$view.\'_v.php\');
}
文件视图 <?php foreach($dati as $p){ echo \'<p><strong>\'.$p->NAME.\'</strong></p>; }?>