Class AdminPageFramework_MetaBox_Controller
Provides UI related methods.
Abstract
Package: AdminPageFramework\Factory\MetaBox
Since: 3.3.0
Located at factory/meta_box/AdminPageFramework_MetaBox_Controller.php
Package: AdminPageFramework\Factory\MetaBox
Since: 3.3.0
Located at factory/meta_box/AdminPageFramework_MetaBox_Controller.php
Methods summary
public
|
#
setUp( )
The method for all necessary set-ups. Examplepublic function setUp() { $this->addSettingFields( array( 'field_id' => 'sample_metabox_text_field', 'title' => 'Text Input', 'description' => 'The description for the field.', 'type' => 'text', ), array( 'field_id' => 'sample_metabox_textarea_field', 'title' => 'Textarea', 'description' => 'The description for the field.', 'type' => 'textarea', 'default' => 'This is a default text value.', ) ); } Since
2.0.0
Remark
The user should override this method.
Overrides |
public
string[]
|
#
enqueueStyles( )
Enqueues styles by post type. Returnsstring[] AN array holing the queued item handle IDs. Since
3.0.0
3.8.31 Removed parameters to be compatible with the base class. |
public
string
|
#
enqueueStyle( )
Enqueues a style by post type. Returnsstring The script handle ID. If the passed url is not a valid url string, an empty string will be returned. Since
3.0.0
3.8.31 Removed parameters to be compatible with the base class. See |
public
string[]
|
#
enqueueScripts( )
Enqueues scripts by page slug and tab slug. Returnsstring[] An array holding the queued item handle IDs. Since
3.0.0
3.8.31 Removed parameters to be compatible with the base class. |
public
string
|
#
enqueueScript( )
Enqueues a script by post type. Example$this->enqueueScript( plugins_url( 'asset/js/test.js' , __FILE__ ), // source url or path array( 'my_post_type_slug' ), array( 'handle_id' => 'my_script', // this handle ID also is used as the object name for the translation array below. 'translation' => array( 'a' => 'hello world!', 'style_handle_id' => $sStyleHandle, // check the enqueued style handle ID here. ), ) ); Returnsstring The script handle ID. If the passed url is not a valid url string, an empty string will be returned. Since
2.1.2
3.8.31 Removed parameters to be compatible with the base class. See |