2

我想将表单挂接到外部函数上。钩子按名称加载我的表单:

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);

我怎样才能正确连接?

4

1 回答 1

2

采用

return wp_iframe(array('YourClassName', 'media_upload_potato_form'), $errors);
于 2012-05-29T14:15:16.067 回答