Class AdminPageFramework_PostType_Controller
Provides methods of views for the post type factory class.
Those methods are public and provides means for users to set property values.
- AdminPageFramework_Factory_Router
-
AdminPageFramework_Factory_Model
-
AdminPageFramework_Factory_View
-
AdminPageFramework_Factory_Controller
-
AdminPageFramework_Factory
-
AdminPageFramework_PostType_Router
-
AdminPageFramework_PostType_Model
-
AdminPageFramework_PostType_View
-
AdminPageFramework_PostType_Controller
Direct known subclasses
Package: AdminPageFramework\PostType
Since: 3.0.4
Located at factory/AdminPageFramework_PostType/AdminPageFramework_PostType_Controller.php
Methods summary
public
|
#
setUp( )
The method for necessary set-ups. Examplepublic function setUp() { $this->setAutoSave( false ); $this->setAuthorTableFilter( true ); $this->addTaxonomy( 'sample_taxonomy', // taxonomy slug array( // argument - for the argument array keys, refer to : http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments 'labels' => array( 'name' => 'Genre', 'add_new_item' => 'Add New Genre', 'new_item_name' => "New Genre" ), 'show_ui' => true, 'show_tagcloud' => false, 'hierarchical' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_table_filter' => true, // framework specific key 'show_in_sidebar_menus' => false, // framework specific key ) ); } Since
2.0.0
Remark
The user should override this method in their class definition.
A callback for the wp_loaded hook.Overrides |
public
array
|
#
enqueueStyles( array $aSRCs, array $aCustomArgs = array() )
Enqueues styles of the given sources. Parameters
Returnsarray An array holding the handle IDs of queued items. Since
3.0.0
|
public
string
|
#
enqueueStyle( string $sSRC, array $aCustomArgs = array() )
Enqueues a style of the given source. Parameters
Returnsstring The style handle ID. If the passed url is not a valid url string, an empty string will be returned. |
public
array
|
#
enqueueScripts( array $aSRCs, array $aCustomArgs = array() )
Enqueues scripts by the given sources. Example$this->enqueueScripts( array( plugins_url( 'asset/js/test.js' , __FILE__ ), // source url or path plugins_url( 'asset/js/test2.js' , __FILE__ ), ) ); Parameters
Returnsarray An array holding the handle IDs of queued items. |
public
string
|
#
enqueueScript( string $sSRC, array $aCustomArgs = array() )
Enqueues a script by the given source. Example$this->enqueueScript( plugins_url( 'asset/js/test.js' , __FILE__ ), // source url or path 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. ), ) ); Parameters
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
|
protected
|
#
setAutoSave( boolean $bEnableAutoSave = True )
Enables or disables the auto-save feature in the custom post type's post submission page. Example$this->setAutoSave( false ); Parameters
Since
2.0.0
|
protected
|
#
addTaxonomy( string $sTaxonomySlug, array $aArgs, array $aAdditionalObjectTypes = array() )
Adds a custom taxonomy to the class post type.
Example$this->addTaxonomy( 'sample_taxonomy', // taxonomy slug array( // argument 'labels' => array( 'name' => 'Genre', 'add_new_item' => 'Add New Genre', 'new_item_name' => "New Genre" ), 'show_ui' => true, 'show_tagcloud' => false, 'hierarchical' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_table_filter' => true, // framework specific key 'show_in_sidebar_menus' => false, // framework specific key ) ); Parameters
Since
2.0.0
3.1.1 Added the third parameter. See |
protected
|
#
setAuthorTableFilter( boolean $bEnableAuthorTableFileter = false )
Sets whether the author drop-down filter is enabled/disabled in the post type post list table. Example$this->setAuthorTableFilter( true ); Parameters
Since
2.0.0
|
protected
|
#
setArguments( array $aArguments = array() )
Sets the post type arguments. Parameters
Since
3.2.0
SeeRemark
The alias of
setPostTypeArgs() . |
protected
|
#
setFooterInfoLeft( string $sHTML, boolean $bAppend = true )
Sets the given HTML text into the footer on the left hand side. Example$this->setFooterInfoLeft( '<br />Custom Text on the left hand side.' ); Parameters
Since
2.0.0
|
protected
|
#
setFooterInfoRight( string $sHTML, boolean $bAppend = true )
Sets the given HTML text into the footer on the right hand side. Example$this->setFooterInfoRight( '<br />Custom Text on the right hand side.' ); Parameters
Since
2.0.0
|
Methods inherited from AdminPageFramework_PostType_View
_replyToFilterPostTypeContent()
,
content()
Methods inherited from AdminPageFramework_PostType_Model
__construct()
,
_registerTaxonomy()
,
_replyToDisableAutoSave()
,
_replyToRegisterPostType()
,
_replyToRegisterTaxonomies()
,
_replyToRemoveTexonomySubmenuPages()
,
_replyToSetColumnCell()
,
_replyToSetColumnHeader()
,
_replyToSetSortableColumns()
Methods inherited from AdminPageFramework_PostType_Router
__call()
,
_isInThePage()
Methods inherited from AdminPageFramework_Factory_Controller
addHelpText()
,
addSettingField()
,
addSettingFields()
,
addSettingSection()
,
addSettingSections()
,
hasFieldError()
,
hasSettingNotice()
,
setFieldErrors()
,
setSettingNotice()
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
__get()
,
__toString()
,
_getFormInstance()
,
_getHelpPaneInstance()
,
_getLinkInstancce()
,
_getPageLoadInfoInstance()
,
_getResourceInstance()
,
_isInstantiatable()
,
_replyToLoadComponents()
Magic methods summary
Properties summary
Properties inherited from AdminPageFramework_Factory_Router
$oProp