Closed patrickf0 closed 10 years ago
Currently it's not possible. I'll see if I can implement the functionality.
Now the branch includes this feature: https://github.com/michaeluno/admin-page-framework/tree/v3/meta_box_for_pages
To create a meta box in a page added by the framework, define a class extending the AdminPageFramework_MetaBox_Page
class and define the setUp()
method and add fields with the addSettingFields() method in there.
And when instantiating the class, the parameters are:
array( 'my_page', 'my_another_page' )
or 'my_page'
normal
, advanced
, or side
high
, core
, default
, low
new APF_MetaBox_For_Pages_Normal(
'apf_metabox_for_pages_normal', // meta box id
__( 'Sample Meta Box For Admin Pages Inserted in Normal Area' ), // title
'apf_first_page', // page slugs
'normal', // context
'default' // priority
);
The example classes are located in
The example of instantiating the classes are written in admin-page-framework-demo.php
.
I'm going to drop the do_{meta box id}
and the content_{meta box id}
hooks to change them to do_{extended class name}
and content_{extended class name}
to make it consistent with taxonomy fields and the validation hook, validation_{extended class name}
Just in case somebody has started using the branch.
It's been functioning okay.
Is it possible to add Meta Boxes to specific Pages by Slug / ID or Page Templates?