Admin Page Framework Documentation
  • Package
  • Class
  • Tree

Packages

  • AdminPageFramework
    • AdminPage
    • Factory
    • FieldType
    • MetaBox
    • NetworkAdmin
    • PageMetaBox
    • PostType
    • TaxonomyField
    • Widget

Classes

  • AdminPageFramework_MetaBox_Page
  • AdminPageFramework_MetaBox_Page_Controller

Class AdminPageFramework_MetaBox_Page

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

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_Router
Extended by AdminPageFramework_MetaBox_Model
Extended by AdminPageFramework_MetaBox_View
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
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.

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

_registerFormElements(), _replyToAddMetaBox(), _replyToFilterPageOptions(), _replyToFilterPageOptionsWODynamicElements(), _replyToModifyOptionsUpdateStatus(), _replyToValidateOptions(), _setOptionArray(), _setUpValidationHooks(), getFieldOutput()

Methods inherited from AdminPageFramework_MetaBox_Page_Router

_isInThePage(), _isInstantiatable()

Methods inherited from AdminPageFramework_MetaBox_View

content()

Methods inherited from AdminPageFramework_MetaBox_Model

_replyToFilterSavingData(), _replyToModifyRedirectPostLocation()

Methods inherited from AdminPageFramework_Factory_Controller

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

Methods inherited from AdminPageFramework_Factory_View

_replyToGetFieldOutput(), _replyToPrintSettingNotice()

Methods inherited from AdminPageFramework_Factory_Model

_getFieldErrors(), _isValidationErrors(), _loadDefaultFieldTypeDefinitions(), _registerFields(), _replyToDeleteFieldErrors(), _replyToSaveFieldErrors(), _replyToSaveNotices(), _setLastInput(), _setUp(), getFieldErrors(), getSavedOptions(), validate()

Methods inherited from AdminPageFramework_Factory_Router

__call(), __get(), __toString(), _getFormInstance(), _getHelpPaneInstance(), _getLinkInstancce(), _getPageLoadInfoInstance(), _getResourceInstance(), _replyToLoadComponents()

Magic methods summary

Properties summary

Properties inherited from AdminPageFramework_MetaBox_Page_Model

$_sFieldsType

Properties inherited from AdminPageFramework_Factory_Router

$oProp

Admin Page Framework Documentation generated by ApiGen 2.8.0