Admin Page Framework Documentation

Packages

  • AdminPageFramework
    • Common
      • Factory
      • Form
        • FieldType
      • Utility
    • Factory
      • AdminPage
      • MetaBox
      • NetworkAdmin
      • PageMetaBox
      • PostType
      • TaxonomyField
      • TermMeta
      • UserMeta
      • Widget
    • Utility

Classes

  • AdminPageFramework_MetaBox
  • AdminPageFramework_MetaBox_Controller
  • AdminPageFramework_MetaBox_View

Resources

  • Tutorials
  • Support
  • Reporting Issues

Class AdminPageFramework_MetaBox

Provides methods for creating meta boxes for post types.

Abstract
Package: AdminPageFramework\Factory\MetaBox
Since: 2.0.0
Located at factory/meta_box/AdminPageFramework_MetaBox.php

Methods summary

public
# __construct( string $sMetaBoxID, string $sTitle, string|array $asPostTypeOrScreenID = array( 'post' ), string $sContext = 'normal', string $sPriority = 'default', string $sCapability = 'edit_posts', string $sTextDomain = 'admin-page-framework' )

Constructs the class object instance of AdminPageFramework_MetaBox.

Sets up properties and hooks.

Example

new APF_MetaBox_BuiltinFieldTypes(
    'sample_custom_meta_box', // meta box ID
    __( 'Demo Meta Box with Built-in Field Types', 'admin-page-framework-demo' ), // title
    array( 'apf_posts' ), // post type slugs: post, page, etc.
    'normal', // context (what kind of metabox this is)
    'default' // priority
);

Parameters

$sMetaBoxID
string
$sMetaBoxID The meta box ID. [3.3.0+] If an empty value is passed, the ID will be automatically generated and the lower-cased class name will be used.
$sTitle
string
$sTitle The meta box title.
$asPostTypeOrScreenID
string|array
$asPostTypeOrScreenID (optional) The post type(s) or screen ID that the meta box is associated with.
$sContext
string
$sContext (optional) The part of the page where the edit screen section should be shown ('normal', 'advanced', or 'side') Default: normal.
$sPriority
string
$sPriority (optional) The priority within the context where the boxes should show ('high', 'core', 'default' or 'low') Default: default.
$sCapability
string
$sCapability (optional) The access level to the meta box. Default: edit_posts.
$sTextDomain
string
$sTextDomain (optional) The text domain applied to the displayed text messages. Default: admin-page-framework.

Since

2.0.0

See

http://codex.wordpress.org/Function_Reference/add_meta_box#Parameters

Overrides

AdminPageFramework_MetaBox_Model::__construct

Magic methods summary

Properties summary

Related

If you find undocumented functionality, please report it here.

Admin Page Framework