我想将表单挂接到外部函数上。钩子按名称加载我的表单:
add_action(media_uploader, 'the_hook');
function the hook(){
//.....
return wp_iframe( 'media_upload_potato_form', $errors );
}
function media_upload_potato_form(){ }// my form
如果我在如下所示的类中使用上述函数,则会出现错误:
return wp_iframe($this->media_upload_potato_form, $errors);
我怎样才能正确连接?