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
 1 <?php
 2 /**
 3  * Admin Page Framework
 4  * 
 5  * http://en.michaeluno.jp/admin-page-framework/
 6  * Copyright (c) 2013-2014 Michael Uno; Licensed MIT
 7  * 
 8  */
 9 if ( ! class_exists( 'AdminPageFramework_MetaBox_Page_Controller' ) ) :
10 /**
11  * Provides controller methods for creating meta boxes in pages added by the framework.
12  * 
13  * @abstract
14  * @since 3.0.4
15  * @package AdminPageFramework
16  * @subpackage PageMetaBox
17  */
18 abstract class AdminPageFramework_MetaBox_Page_Controller extends AdminPageFramework_MetaBox_Page_View {
19     
20     /**
21      * Enqueues styles by page slug and tab slug.
22      * 
23      * @since 3.0.0
24      */
25     public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
26         if ( method_exists( $this->oHeadTag, '_enqueueStyles' ) ) {
27             return $this->oHeadTag->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
28         }
29     }
30     /**
31      * Enqueues a style by page slug and tab slug.
32      * 
33      * @since 3.0.0
34      * @see http://codex.wordpress.org/Function_Reference/wp_enqueue_style
35      * @param string The URL of the stylesheet to enqueue, the absolute file path, or the relative path to the root directory of WordPress. Example: '/css/mystyle.css'.
36      * @param string (optional) The page slug that the stylesheet should be added to. If not set, it applies to all the pages created by the framework.
37      * @param string (optional) The tab slug that the stylesheet should be added to. If not set, it applies to all the in-page tabs in the page.
38      * @param             array (optional) The argument array for more advanced parameters.
39      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
40      */    
41     public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
42         if ( method_exists( $this->oHeadTag, '_enqueueStyle' ) ) {
43             return $this->oHeadTag->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );     
44         }
45     }
46     /**
47      * Enqueues scripts by page slug and tab slug.
48      * 
49      * @since 2.1.5
50      */
51     public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
52         if ( method_exists( $this->oHeadTag, '_enqueueScripts' ) ) {
53             return $this->oHeadTag->_enqueueScripts( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
54         }
55     }    
56     /**
57      * Enqueues a script by page slug and tab slug.
58      * 
59      * @since 3.0.0     
60      * @see http://codex.wordpress.org/Function_Reference/wp_enqueue_script
61      * @param string The URL of the stylesheet to enqueue, the absolute file path, or the relative path to the root directory of WordPress. Example: '/js/myscript.js'.
62      * @param string (optional) The page slug that the script should be added to. If not set, it applies to all the pages created by the framework.
63      * @param string (optional) The tab slug that the script should be added to. If not set, it applies to all the in-page tabs in the page.
64      * @param             array (optional) The argument array for more advanced parameters.
65      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
66      */
67     public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
68         if ( method_exists( $this->oHeadTag, '_enqueueScript' ) ) {
69             return $this->oHeadTag->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
70         }
71     }
72     
73 }
74 endif;
Admin Page Framework Documentation API documentation generated by ApiGen 2.8.0