Admin Page Framework Documentation
  • Package
  • Class
  • Tree

Packages

  • AdminPageFramework
    • FieldType
    • MetaBox
    • NetworkAdmin
      • Page
    • Page
    • PageMetaBox
    • PostType
    • TaxonomyField
  • None

Classes

  • AdminPageFramework_MetaBox_Page
  • AdminPageFramework_MetaBox_Page_Controller
  • AdminPageFramework_MetaBox_Page_Model
  • AdminPageFramework_MetaBox_Page_Router
  • AdminPageFramework_MetaBox_Page_View

Class AdminPageFramework_MetaBox_Page

Provides methods for creating meta boxes in pages added by the framework.

Hooks

The class automatically creates WordPress action and filter hooks associated with the class methods. The class methods corresponding to the name of the below actions and filters can be extended to modify the page output. Those methods are the callbacks of the filters and actions.

Methods and Action Hooks

  • start_{instantiated class name} – triggered at the end of the class constructor. This receives the class object in the first parameter.
  • set_up{instantiated class name} – triggered afther the setUp() method is called. This receives the class object in the first parameter.
  • do_{instantiated class name} – triggered when the meta box gets rendered. The first parameter: the class object [3.1.3+].

Methods and Filter Hooks

  • field_types_{instantiated class name} – receives the field type definition array. The first parameter: the field type definition array.
  • field_{instantiated class name}_{field ID} – receives the form input field output of the given input field ID. The first parameter: output string. The second parameter: the array of option.
  • content_{instantiated class name} – receives the entire output of the meta box. The first parameter: the output HTML string.
  • style_common_{instantiated class name} – receives the output of the base CSS rules applied to the pages of the associated post types with the meta box.
  • style_ie_common_{instantiated class name} – receives the output of the base CSS rules for Internet Explorer applied to the pages of the associated post types with the meta box.
  • style_{instantiated class name} – receives the output of the CSS rules applied to the pages of the associated post types with the meta box.
  • style_ie_{instantiated class name} – receives the output of the CSS rules for Internet Explorer applied to the pages of the associated post types with the meta box.
  • script_common_{instantiated class name} – receives the output of the base JavaScript scripts applied to the pages of the associated post types with the meta box.
  • script_{instantiated class name} – receives the output of the JavaScript scripts applied to the pages of the associated post types with the meta box.
  • validation_{instantiated class name} – receives the form submission values as array. The first parameter: submitted input array. The second parameter: the original array stored in the database.
AdminPageFramework_Factory_Router
Extended by AdminPageFramework_Factory_Model
Extended by AdminPageFramework_Factory_View
Extended by AdminPageFramework_Factory_Controller
Extended by AdminPageFramework_Factory
Extended by AdminPageFramework_MetaBox_Base
Extended by AdminPageFramework_MetaBox_Page_Router
Extended by AdminPageFramework_MetaBox_Page_Model
Extended by AdminPageFramework_MetaBox_Page_View
Extended by AdminPageFramework_MetaBox_Page_Controller
Extended by AdminPageFramework_MetaBox_Page
Abstract
Package: AdminPageFramework\PageMetaBox
Since: 3.0.0
Use: AdminPageFramework_Utility
Use: AdminPageFramework_Message
Use: AdminPageFramework_Debug
Use: AdminPageFramework_Property_Page
Located at factory/AdminPageFramework_MetaBox_Page/AdminPageFramework_MetaBox_Page.php

Methods summary

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

Registers necessary hooks and internal properties.

Registers necessary hooks and internal properties.

Examples

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
);
include( APFDEMO_DIRNAME . '/example/APF_MetaBox_For_Pages_Advanced.php' );
new APF_MetaBox_For_Pages_Advanced(
    'apf_metabox_for_pages_advanced', // meta box id
    __( 'Sample Meta Box For Admin Pages Inserted in Advanced Area' ), // title
    'apf_first_page', // page slugs
    'advanced', // context
    'default' // priority
);
include( APFDEMO_DIRNAME . '/example/APF_MetaBox_For_Pages_Side.php' );
new APF_MetaBox_For_Pages_Side(
    'apf_metabox_for_pages_side', // meta box id
    __( 'Sample Meta Box For Admin Pages Inserted in Advanced Area' ), // title
    array( 'apf_first_page', 'apf_second_page' ), // page slugs - setting multiple slugs is possible
    'side', // context
    'default' // priority
);

Parameters

$sMetaBoxID
string
$sMetaBoxID The meta box ID to be created.
$sTitle
string
$sTitle The meta box title.
$asPageSlugs
array|string
$asPageSlugs the page slug(s) that the meta box belongs to. If the element is an array, it will be considered as a tab array. $asPageSlugs = array( 'settings' => array( // if the key is not numeric and the value is an array, it will be considered as a tab array. 'help', // enabled in the tab whose slug is 'help' which belongs to the page whose slug is 'settings' 'about', // enabled in the tab whose slug is 'about' which belongs to the page whose slug is 'settings' 'general', // enabled in the tab whose slug is 'general' which belongs to the page whose slug is 'settings' ), 'manage', // if the numeric key with a string value is given, the condition applies to the page slug of this string value. );
$sContext
string
$sContext The context, either 'normal', 'advanced', or 'side'.
$sPriority
string
$sPriority The priority, either 'high', 'core', 'default' or 'low'.
$sCapability
string
$sCapability The capability. See Roles and Capabilities.
$sTextDomain
string
$sTextDomain ( optional ) The text domain applied to the displayed text messages. Default: admin-page-framework.

Since

3.0.0

Overrides

AdminPageFramework_MetaBox_Page_Model::__construct

Methods inherited from AdminPageFramework_MetaBox_Page_Controller

enqueueScript(), enqueueScripts(), enqueueStyle(), enqueueStyles()

Methods inherited from AdminPageFramework_MetaBox_Page_Model

_replyToFilterPageOptions()

Methods inherited from AdminPageFramework_MetaBox_Page_Router

_isInstantiatable()

Methods inherited from AdminPageFramework_MetaBox_Base

_getInputArray(), _getSavedMetaArray(), _replyToAddMetaBox(), _replyToDetermineToLoad(), _replyToGetSectionHeaderOutput(), _replyToPrintMetaBoxContents(), _replyToRegisterFormElements(), _replyToSaveMetaBoxFields(), _setOptionArray()

Methods inherited from AdminPageFramework_Factory_Controller

addHelpText(), addSettingField(), addSettingFields(), addSettingSection(), addSettingSections(), hasSettingNotice(), setFieldErrors(), setSettingNotice(), setUp(), start()

Methods inherited from AdminPageFramework_Factory_View

_replyToGetFieldOutput(), _replyToPrintSettingNotice()

Methods inherited from AdminPageFramework_Factory_Model

_getFieldErrors(), _isValidationErrors(), _loadDefaultFieldTypeDefinitions(), _registerFields(), _replyToDeleteFieldErrors(), _replyToSaveFieldErrors(), _replyToSaveNotices(), _setUp()

Methods inherited from AdminPageFramework_Factory_Router

__call(), __get(), _getFormInstance(), _getHeadTagInstance(), _getHelpPaneInstance(), _getLinkInstancce(), _getPageLoadInfoInstance(), _isInThePage(), _replyToLoadComponents()

Magic methods summary

Properties summary

Properties inherited from AdminPageFramework_MetaBox_Base

$_sFieldsType, $_sTargetSectionTabSlug

Properties inherited from AdminPageFramework_Factory_Router

$oProp

Admin Page Framework Documentation API documentation generated by ApiGen 2.8.0