Completed
Branch master (bf4987)
by Michael
03:55
created
development/factory/meta_box/AdminPageFramework_MetaBox_View.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @return      void
28 28
      * @internal    
29 29
      */ 
30
-    public function _replyToPrintMetaBoxContents( $oPost, $vArgs ) {    
30
+    public function _replyToPrintMetaBoxContents( $oPost, $vArgs ) {
31 31
 
32 32
         // Use nonce for verification
33 33
         $_aOutput   = array();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         // Use nonce for verification
33 33
         $_aOutput   = array();
34
-        $_aOutput[] = wp_nonce_field(
34
+        $_aOutput[ ] = wp_nonce_field(
35 35
             $this->oProp->sMetaBoxID, 
36 36
             $this->oProp->sMetaBoxID, 
37 37
             true, 
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
                                  
41 41
         // Get the fields output. If no field is added, the form object is not instantiated.
42 42
         if ( isset( $this->oForm ) ) {
43
-            $_aOutput[] = $this->oForm->get();
43
+            $_aOutput[ ] = $this->oForm->get();
44 44
         }
45 45
 
46 46
         // Do actions
47
-        $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this );
47
+        $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this );
48 48
         
49 49
         // Render the filtered output.
50 50
         echo $this->oUtil->addAndApplyFilters(
Please login to merge, or discard this patch.
factory/meta_box/form/_view/AdminPageFramework_Form_View___CSS_meta_box.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      * @since       DEVVER
22 22
      * @return      string
23 23
      */
24
-    protected function _get() {        
24
+    protected function _get() {
25 25
         return $this->_getRules();
26 26
     }
27 27
         /**
Please login to merge, or discard this patch.
development/factory/network_admin_page/AdminPageFramework_NetworkAdmin.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      * @param       string      $sTextDomain        (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`.
56 56
      * @return      void        returns nothing.
57 57
      */
58
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){
58
+    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ) {
59 59
             
60 60
         if ( ! $this->_isInstantiatable() ) {
61 61
             return;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
     protected $_aBuiltInRootMenuSlugs = array(
41 41
         // All keys must be lower case to support case insensitive look-ups.
42 42
         'dashboard'     => 'index.php',
43
-        'sites'         => 'sites.php',         // not work
44
-        'themes'        => 'themes.php',        // not work
43
+        'sites'         => 'sites.php', // not work
44
+        'themes'        => 'themes.php', // not work
45 45
         'plugins'       => 'plugins.php',
46 46
         'users'         => 'users.php',
47 47
         'settings'      => 'settings.php',
48
-        'updates'       => 'update-core.php',   // does not work
48
+        'updates'       => 'update-core.php', // does not work
49 49
     );     
50 50
         
51 51
     /**
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
      * @param       string      $sTextDomain        (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`.
67 67
      * @return      void        returns nothing.
68 68
      */
69
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){
69
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_network', $sTextDomain = 'admin-page-framework' ) {
70 70
             
71
-        if ( ! $this->_isInstantiatable() ) {
71
+        if ( !$this->_isInstantiatable() ) {
72 72
             return;
73 73
         }
74 74
                     
75 75
         $sCallerPath = $sCallerPath 
76 76
             ? $sCallerPath 
77
-            : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ );     // this is important to attempt to find the caller script path here when separating the library into multiple files.
77
+            : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files.
78 78
              
79 79
         parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain );
80 80
         
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      * @param       mixed       $vDefault     the default value that will be returned if nothing is stored.
159 159
      * @return      mixed       If the field ID is not specified.
160 160
      */
161
-    static public function getOption( $sOptionKey, $asKey=null , $vDefault=null ) {
161
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) {
162 162
         return AdminPageFramework_WPUtility::getSiteOption( $sOptionKey, $asKey, $vDefault );
163 163
     }
164 164
     
Please login to merge, or discard this patch.
development/factory/page_meta_box/AdminPageFramework_PageMetaBox.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@
 block discarded – undo
67 67
      */
68 68
     function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
69 69
         
70
-        if ( empty( $asPageSlugs ) ) { 
70
+        if ( empty( $asPageSlugs ) ) {
71 71
             return; 
72 72
         }
73 73
         
74
-        if ( ! $this->_isInstantiatable() ) { 
74
+        if ( ! $this->_isInstantiatable() ) {
75 75
             return; 
76 76
         }
77 77
                 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,21 +77,21 @@
 block discarded – undo
77 77
      * @param       string          $sPriority      The priority, either `high`, `core`, `default` or `low`.
78 78
      * @param       string          $sCapability    The capability. See <a href="https://codex.wordpress.org/Roles_and_Capabilities" target="_blank">Roles and Capabilities</a>.
79 79
      */
80
-    public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
80
+    public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
81 81
         
82 82
         if ( empty( $asPageSlugs ) ) { 
83 83
             return; 
84 84
         }
85 85
         
86
-        if ( ! $this->_isInstantiatable() ) { 
86
+        if ( !$this->_isInstantiatable() ) { 
87 87
             return; 
88 88
         }
89 89
                 
90 90
         // The property object needs to be done first before the parent constructor.
91 91
         $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
92 92
             ? $this->aSubClassNames[ 'oProp' ]
93
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;        
94
-        $this->oProp             = new $_sProprtyClassName( 
93
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;        
94
+        $this->oProp = new $_sProprtyClassName( 
95 95
             $this, 
96 96
             get_class( $this ), 
97 97
             $sCapability, 
Please login to merge, or discard this patch.
factory/page_meta_box/AdminPageFramework_PageMetaBox_Controller.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * 
23 23
      * @since 3.0.0
24 24
      */
25
-    public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
25
+    public function enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
26 26
         if ( method_exists( $this->oResource, '_enqueueStyles' ) ) {
27 27
             return $this->oResource->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
28 28
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param array (optional) The argument array for more advanced parameters.
39 39
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
40 40
      */    
41
-    public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
41
+    public function enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
42 42
         if ( method_exists( $this->oResource, '_enqueueStyle' ) ) {
43 43
             return $this->oResource->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );     
44 44
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * 
49 49
      * @since 2.1.5
50 50
      */
51
-    public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
51
+    public function enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
52 52
         if ( method_exists( $this->oResource, '_enqueueScripts' ) ) {
53 53
             return $this->oResource->_enqueueScripts( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
54 54
         }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param             array (optional) The argument array for more advanced parameters.
65 65
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
66 66
      */
67
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
67
+    public function enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {    
68 68
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
69 69
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
70 70
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * @param             array (optional) The argument array for more advanced parameters.
65 65
      * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
66 66
      */
67
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
67
+    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
68 68
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
69 69
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
70 70
         }
Please login to merge, or discard this patch.
development/factory/page_meta_box/AdminPageFramework_PageMetaBox_Model.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
         );        
278 278
     }    
279 279
     
280
-       /**
280
+        /**
281 281
          * Extracts meta box form fields options array from the given options array of an admin page.
282 282
          * 
283 283
          * @since       3.5.6
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
     public function _replyToSetUpValidationHooks( $oScreen ) {
47 47
 
48 48
         // Validation hooks
49
-        foreach( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) {
49
+        foreach ( $this->oProp->aPageSlugs as $_sIndexOrPageSlug => $_asTabArrayOrPageSlug ) {
50 50
             
51 51
             if ( is_scalar( $_asTabArrayOrPageSlug ) ) {
52 52
                 $_sPageSlug = $_asTabArrayOrPageSlug;
53
-                add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 );  // 3.4.1+
53
+                add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+
54 54
                 add_filter( "validation_{$_sPageSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 );
55 55
                 add_filter( "options_update_status_{$_sPageSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) );
56 56
                 continue;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             // At this point, the array key is the page slug. It means the user specified the tab(s).
60 60
             $_sPageSlug = $_sIndexOrPageSlug;
61 61
             $_aTabs     = $_asTabArrayOrPageSlug;
62
-            foreach( $_aTabs as $_sTabSlug ) {
62
+            foreach ( $_aTabs as $_sTabSlug ) {
63 63
                 add_filter( "validation_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToValidateOptions' ), 10, 4 );
64 64
                 add_filter( "validation_saved_options_without_dynamic_elements_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToFilterPageOptionsWODynamicElements' ), 10, 2 ); // 3.4.1+
65 65
                 add_filter( "options_update_status_{$_sPageSlug}_{$_sTabSlug}", array( $this, '_replyToModifyOptionsUpdateStatus' ) );
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
      * @return      void
80 80
      * @callback    action      add_meta_boxes
81 81
      */ 
82
-    public function _replyToRegisterMetaBoxes( $sPageHook='' ) {
83
-        foreach( $this->oProp->aPageSlugs as $_sKey => $_asPage ) {
84
-            if ( is_string( $_asPage ) )  {
82
+    public function _replyToRegisterMetaBoxes( $sPageHook = '' ) {
83
+        foreach ( $this->oProp->aPageSlugs as $_sKey => $_asPage ) {
84
+            if ( is_string( $_asPage ) ) {
85 85
                 $this->_registerMetaBox( $_asPage );
86 86
                 continue;
87 87
             }            
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
          * @return      void
98 98
          */
99 99
         private function _registerMetaBoxes( $sPageSlug, $asPage ) {
100
-            foreach( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) {
101
-                if ( ! $this->oProp->isCurrentTab( $_sTabSlug ) ) { 
100
+            foreach ( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) {
101
+                if ( !$this->oProp->isCurrentTab( $_sTabSlug ) ) { 
102 102
                     continue; 
103 103
                 }
104 104
                 $this->_registerMetaBox( $sPageSlug );
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
          */
116 116
         private function _registerMetaBox( $sPageSlug ) {
117 117
             add_meta_box( 
118
-                $this->oProp->sMetaBoxID,                       // id
119
-                $this->oProp->sTitle,                           // title
118
+                $this->oProp->sMetaBoxID, // id
119
+                $this->oProp->sTitle, // title
120 120
                 array( $this, '_replyToPrintMetaBoxContents' ), // callback
121 121
                 $this->oProp->_getScreenIDOfPage( $sPageSlug ), // screen ID
122
-                $this->oProp->sContext,                         // context
123
-                $this->oProp->sPriority,                        // priority
122
+                $this->oProp->sContext, // context
123
+                $this->oProp->sPriority, // priority
124 124
                 null                                            // argument (deprecated)
125 125
             );
126 126
         }
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
         
169 169
         $_aNewMetaBoxInputs      = $this->oForm->getSubmittedData( $_POST );
170 170
         $_aOldMetaBoxInputs      = $this->oUtil->castArrayContents( 
171
-            $this->oForm->getDataStructureFromAddedFieldsets(),   // model
171
+            $this->oForm->getDataStructureFromAddedFieldsets(), // model
172 172
             $aOldPageOptions        // data source
173 173
         );
174 174
 
175 175
         // Apply filters - third party scripts will have access to the input.
176 176
         $_aNewMetaBoxInputsRaw   = $_aNewMetaBoxInputs; // copy one for validation errors.
177 177
         $_aNewMetaBoxInputs      = call_user_func_array( 
178
-            array( $this, 'validate' ),     // triggers __call()
178
+            array( $this, 'validate' ), // triggers __call()
179 179
             array( $_aNewMetaBoxInputs, $_aOldMetaBoxInputs, $this, $aSubmitInfo ) 
180 180
         ); // 3.5.3+
181
-        $_aNewMetaBoxInputs      = $this->oUtil->addAndApplyFilters( 
181
+        $_aNewMetaBoxInputs = $this->oUtil->addAndApplyFilters( 
182 182
             $this, 
183 183
             "validation_{$this->oProp->sClassName}", 
184 184
             $_aNewMetaBoxInputs, 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     public function _replyToModifyOptionsUpdateStatus( $aStatus ) {
215 215
         
216
-        if ( ! $this->hasFieldError() ) {
216
+        if ( !$this->hasFieldError() ) {
217 217
             return $aStatus;
218 218
         }
219 219
         return array( 
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
     public function _replyToGetSavedFormData() {
237 237
         $_aPageOptions = $this->oUtil->addAndApplyFilter(
238 238
             $this, // the caller factory object
239
-            'options_' . $this->oProp->sClassName,
239
+            'options_'.$this->oProp->sClassName,
240 240
             $this->oProp->oAdminPage->oProp->aOptions  
241 241
         );
242 242
         return $this->oUtil->castArrayContents( 
243
-            $this->oForm->getDataStructureFromAddedFieldsets(),   // model
243
+            $this->oForm->getDataStructureFromAddedFieldsets(), // model
244 244
             $_aPageOptions        // data source
245 245
         );        
246 246
     }    
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
         private function _getPageMetaBoxOptionsFromPageOptions( array $aPageOptions, array $aFieldsets ) {
257 257
      
258 258
             $_aOptions = array();
259
-            foreach( $aFieldsets as $_sSectionID => $_aFieldsets ) {
260
-                if ( '_default' === $_sSectionID  ) {
261
-                    foreach( $_aFieldsets as $_aField ) {
259
+            foreach ( $aFieldsets as $_sSectionID => $_aFieldsets ) {
260
+                if ( '_default' === $_sSectionID ) {
261
+                    foreach ( $_aFieldsets as $_aField ) {
262 262
                         if ( array_key_exists( $_aField[ 'field_id' ], $aPageOptions ) ) {
263 263
                             $_aOptions[ $_aField[ 'field_id' ] ] = $aPageOptions[ $_aField[ 'field_id' ] ];
264 264
                         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */ 
82 82
     public function _replyToRegisterMetaBoxes( $sPageHook='' ) {
83 83
         foreach( $this->oProp->aPageSlugs as $_sKey => $_asPage ) {
84
-            if ( is_string( $_asPage ) )  {
84
+            if ( is_string( $_asPage ) ) {
85 85
                 $this->_registerMetaBox( $_asPage );
86 86
                 continue;
87 87
             }            
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
          */
99 99
         private function _registerMetaBoxes( $sPageSlug, $asPage ) {
100 100
             foreach( $this->oUtil->getAsArray( $asPage ) as $_sTabSlug ) {
101
-                if ( ! $this->oProp->isCurrentTab( $_sTabSlug ) ) { 
101
+                if ( ! $this->oProp->isCurrentTab( $_sTabSlug ) ) {
102 102
                     continue; 
103 103
                 }
104 104
                 $this->_registerMetaBox( $sPageSlug );
Please login to merge, or discard this patch.
factory/page_meta_box/form/AdminPageFramework_Form_page_meta_box.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function construct() {
31 31
         
32 32
         add_filter(
33
-            'options_' . $this->aArguments[ 'caller_id' ],
33
+            'options_'.$this->aArguments[ 'caller_id' ],
34 34
             array( $this, '_replyToSanitizeSavedFormData' ),
35 35
             5   //  high priority as it must be done eariler
36 36
         );
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         
55 55
         // Extract the meta box field form data (options) from the page form data (options).
56 56
         return $this->castArrayContents( 
57
-            $this->getDataStructureFromAddedFieldsets(),    // form data structure generate from fieldsets
57
+            $this->getDataStructureFromAddedFieldsets(), // form data structure generate from fieldsets
58 58
             $aSavedFormData
59 59
         );
60 60
         
Please login to merge, or discard this patch.
development/factory/post_type/AdminPageFramework_PostType.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @package         AdminPageFramework
16 16
  * @subpackage      PostType
17 17
  */
18
-abstract class AdminPageFramework_PostType extends AdminPageFramework_PostType_Controller {    
18
+abstract class AdminPageFramework_PostType extends AdminPageFramework_PostType_Controller {
19 19
         
20 20
     /**
21 21
     * The constructor of the class object.
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     */
92 92
     public function __construct( $sPostType, $aArguments=array(), $sCallerPath=null, $sTextDomain='admin-page-framework' ) {
93 93
         
94
-        if ( empty( $sPostType ) ) { 
94
+        if ( empty( $sPostType ) ) {
95 95
             return; 
96 96
         }
97 97
 
Please login to merge, or discard this patch.
Indentation   +77 added lines, -78 removed lines patch added patch discarded remove patch
@@ -26,84 +26,83 @@
 block discarded – undo
26 26
     protected $_sStructureType = 'post_type';
27 27
     
28 28
     /**
29
-    * The constructor of the class object.
30
-    * 
31
-    * Registers necessary hooks and sets up internal properties.
32
-    * 
33
-    * <h4>Example</h4>
34
-    * <code>new APF_PostType( 
35
-    *     'apf_posts',     // post type slug
36
-    *       array( 
37
-    *           'labels' => array(
38
-    *               'name'               => 'Demo',
39
-    *               'all_items'          => __( 'Sample Posts', 'admin-page-framework-demo' ),
40
-    *               'singular_name'      => 'Demo',
41
-    *               'add_new'            => __( 'Add New', 'admin-page-framework-demo' ),
42
-    *               'add_new_item'       => __( 'Add New APF Post', 'admin-page-framework-demo' ),
43
-    *               'edit'               => __( 'Edit', 'admin-page-framework-demo' ),
44
-    *               'edit_item'          => __( 'Edit APF Post', 'admin-page-framework-demo' ),
45
-    *               'new_item'           => __( 'New APF Post', 'admin-page-framework-demo' ),
46
-    *               'view'               => __( 'View', 'admin-page-framework-demo' ),
47
-    *               'view_item'          => __( 'View APF Post', 'admin-page-framework-demo' ),
48
-    *               'search_items'       => __( 'Search APF Post', 'admin-page-framework-demo' ),
49
-    *               'not_found'          => __( 'No APF Post found', 'admin-page-framework-demo' ),
50
-    *               'not_found_in_trash' => __( 'No APF Post found in Trash', 'admin-page-framework-demo' ),
51
-    *               'parent'             => __( 'Parent APF Post', 'admin-page-framework-demo' ),
52
-    *               
53
-    *               // (framework specific)
54
-    *               'plugin_action_link' => __( 'APF Posts', 'admin-page-framework-demo' ), // framework specific key. [3.7.3+]
55
-    *           ),
56
-    *           'public'            => true,
57
-    *           'menu_position'     => 110,
58
-    *           'supports'          => array( 'title' ), // e.g. array( 'title', 'editor', 'comments', 'thumbnail', 'excerpt' ),    
59
-    *           'taxonomies'        => array( '' ),
60
-    *           'has_archive'       => true,
61
-    *           'show_admin_column' => true, // [3.5+ core] this is for custom taxonomies to automatically add the column in the listing table.
62
-    *           'menu_icon'         => $this->oProp->bIsAdmin 
63
-    *               ? ( 
64
-    *                   version_compare( $GLOBALS['wp_version'], '3.8', '>=' ) 
65
-    *                       ? 'dashicons-wordpress' 
66
-    *                       : plugins_url( 'asset/image/wp-logo_16x16.png', APFDEMO_FILE ) 
67
-    *               )
68
-    *               : null, // do not call the function in the front-end.
69
-    *               
70
-    *           // (framework specific) this sets the screen icon for the post type for WordPress v3.7.1 or below.
71
-    *           // a file path can be passed instead of a url, plugins_url( 'asset/image/wp-logo_32x32.png', APFDEMO_FILE )
72
-    *           'screen_icon' => dirname( APFDEMO_FILE  ) . '/asset/image/wp-logo_32x32.png', 
73
-    *           
74
-    *           // [3.5.10+] (framework specific) default: true
75
-    *           'show_submenu_add_new'  => true, 
76
-    *           
77
-    *           // [3.7.4+] (framework specific) default: 10
78
-    *           'submenu_order_manage'  => 20,
79
-    *           'submenu_order_addnew'  => 21,
80
-    * 
81
-    *       )     
82
-    * );</code>
83
-    * 
84
-    * <h4>Framework Specific Post Type Arguments</h4>
85
-    * In addition to the post type argument structure defined by the WordPress core, there are arguments defined by the framework.
86
-    * 
87
-    * - screen_icon - For WordPress 3.7.x or below, set an icon url or path for the 32x32 screen icon displayed in the post listing page.
88
-    * - show_submenu_add_new - [3.5.10+]    (boolean) Whether the sub-menu item of `Add New` should be displayed.
89
-    * - submenu_order_manage - [3.7.4+]     (numeric) The menu position of the `Manage` sub-menu item which gets automatically crated by the system when the admin ui is enabled. Default: `5`
90
-    * - submenu_order_addnew - [3.7.4+]     (numeric) The menu position of the `Manage` sub-menu item which gets automatically crated by the system when the admin ui is enabled. Default: `10`
91
-    *
92
-    * <h4>Framework Specific Post Type Label Arguments</h4>
93
-    * - plugin_listing_table_title_cell_link' - [3.0.6+] Deprecated [3.7.3] use the `plugin_action_link` argument instead.
94
-    * - plugin_action_link' - [3.7.3+] If the caller script is a plugin, this determines the label of the action link embedded in the plugin listing page (plugins.php).
95
-    * To disable the action link, set an empty string `''`. 
96
-
97
-    * 
98
-    * @since        2.0.0
99
-    * @since        2.1.6       Added the $sTextDomain parameter.
100
-    * @see          http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
101
-    * @param        string      The post type slug.
102
-    * @param        array       The <a href="http://codex.wordpress.org/Function_Reference/register_post_type#Arguments">argument array</a> passed to register_post_type().
103
-    * @param        string      The path of the caller script. This is used to retrieve the script information to insert it into the footer. If not set, the framework tries to detect it.
104
-    * @param        string      The text domain of the caller script.
105
-    * @return       void
106
-    */
29
+     * The constructor of the class object.
30
+     * 
31
+     * Registers necessary hooks and sets up internal properties.
32
+     * 
33
+     * <h4>Example</h4>
34
+     * <code>new APF_PostType( 
35
+     *     'apf_posts',     // post type slug
36
+     *       array( 
37
+     *           'labels' => array(
38
+     *               'name'               => 'Demo',
39
+     *               'all_items'          => __( 'Sample Posts', 'admin-page-framework-demo' ),
40
+     *               'singular_name'      => 'Demo',
41
+     *               'add_new'            => __( 'Add New', 'admin-page-framework-demo' ),
42
+     *               'add_new_item'       => __( 'Add New APF Post', 'admin-page-framework-demo' ),
43
+     *               'edit'               => __( 'Edit', 'admin-page-framework-demo' ),
44
+     *               'edit_item'          => __( 'Edit APF Post', 'admin-page-framework-demo' ),
45
+     *               'new_item'           => __( 'New APF Post', 'admin-page-framework-demo' ),
46
+     *               'view'               => __( 'View', 'admin-page-framework-demo' ),
47
+     *               'view_item'          => __( 'View APF Post', 'admin-page-framework-demo' ),
48
+     *               'search_items'       => __( 'Search APF Post', 'admin-page-framework-demo' ),
49
+     *               'not_found'          => __( 'No APF Post found', 'admin-page-framework-demo' ),
50
+     *               'not_found_in_trash' => __( 'No APF Post found in Trash', 'admin-page-framework-demo' ),
51
+     *               'parent'             => __( 'Parent APF Post', 'admin-page-framework-demo' ),
52
+     *               
53
+     *               // (framework specific)
54
+     *               'plugin_action_link' => __( 'APF Posts', 'admin-page-framework-demo' ), // framework specific key. [3.7.3+]
55
+     *           ),
56
+     *           'public'            => true,
57
+     *           'menu_position'     => 110,
58
+     *           'supports'          => array( 'title' ), // e.g. array( 'title', 'editor', 'comments', 'thumbnail', 'excerpt' ),    
59
+     *           'taxonomies'        => array( '' ),
60
+     *           'has_archive'       => true,
61
+     *           'show_admin_column' => true, // [3.5+ core] this is for custom taxonomies to automatically add the column in the listing table.
62
+     *           'menu_icon'         => $this->oProp->bIsAdmin 
63
+     *               ? ( 
64
+     *                   version_compare( $GLOBALS['wp_version'], '3.8', '>=' ) 
65
+     *                       ? 'dashicons-wordpress' 
66
+     *                       : plugins_url( 'asset/image/wp-logo_16x16.png', APFDEMO_FILE ) 
67
+     *               )
68
+     *               : null, // do not call the function in the front-end.
69
+     *               
70
+     *           // (framework specific) this sets the screen icon for the post type for WordPress v3.7.1 or below.
71
+     *           // a file path can be passed instead of a url, plugins_url( 'asset/image/wp-logo_32x32.png', APFDEMO_FILE )
72
+     *           'screen_icon' => dirname( APFDEMO_FILE  ) . '/asset/image/wp-logo_32x32.png', 
73
+     *           
74
+     *           // [3.5.10+] (framework specific) default: true
75
+     *           'show_submenu_add_new'  => true, 
76
+     *           
77
+     *           // [3.7.4+] (framework specific) default: 10
78
+     *           'submenu_order_manage'  => 20,
79
+     *           'submenu_order_addnew'  => 21,
80
+     * 
81
+     *       )     
82
+     * );</code>
83
+     * 
84
+     * <h4>Framework Specific Post Type Arguments</h4>
85
+     * In addition to the post type argument structure defined by the WordPress core, there are arguments defined by the framework.
86
+     * 
87
+     * - screen_icon - For WordPress 3.7.x or below, set an icon url or path for the 32x32 screen icon displayed in the post listing page.
88
+     * - show_submenu_add_new - [3.5.10+]    (boolean) Whether the sub-menu item of `Add New` should be displayed.
89
+     * - submenu_order_manage - [3.7.4+]     (numeric) The menu position of the `Manage` sub-menu item which gets automatically crated by the system when the admin ui is enabled. Default: `5`
90
+     * - submenu_order_addnew - [3.7.4+]     (numeric) The menu position of the `Manage` sub-menu item which gets automatically crated by the system when the admin ui is enabled. Default: `10`
91
+     *
92
+     * <h4>Framework Specific Post Type Label Arguments</h4>
93
+     * - plugin_listing_table_title_cell_link' - [3.0.6+] Deprecated [3.7.3] use the `plugin_action_link` argument instead.
94
+     * - plugin_action_link' - [3.7.3+] If the caller script is a plugin, this determines the label of the action link embedded in the plugin listing page (plugins.php).
95
+     * To disable the action link, set an empty string `''`. 
96
+     * 
97
+     * @since        2.0.0
98
+     * @since        2.1.6       Added the $sTextDomain parameter.
99
+     * @see          http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
100
+     * @param        string      The post type slug.
101
+     * @param        array       The <a href="http://codex.wordpress.org/Function_Reference/register_post_type#Arguments">argument array</a> passed to register_post_type().
102
+     * @param        string      The path of the caller script. This is used to retrieve the script information to insert it into the footer. If not set, the framework tries to detect it.
103
+     * @param        string      The text domain of the caller script.
104
+     * @return       void
105
+     */
107 106
     public function __construct( $sPostType, $aArguments=array(), $sCallerPath=null, $sTextDomain='admin-page-framework' ) {
108 107
         
109 108
         if ( empty( $sPostType ) ) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     * @param        string      The text domain of the caller script.
105 105
     * @return       void
106 106
     */
107
-    public function __construct( $sPostType, $aArguments=array(), $sCallerPath=null, $sTextDomain='admin-page-framework' ) {
107
+    public function __construct( $sPostType, $aArguments = array(), $sCallerPath = null, $sTextDomain = 'admin-page-framework' ) {
108 108
         
109 109
         if ( empty( $sPostType ) ) { 
110 110
             return; 
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
 
113 113
         $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] )
114 114
             ? $this->aSubClassNames[ 'oProp' ]
115
-            : 'AdminPageFramework_Property_' . $this->_sStructureType;           
115
+            : 'AdminPageFramework_Property_'.$this->_sStructureType;           
116 116
         $this->oProp = new $_sProprtyClassName( 
117 117
             $this, 
118 118
             $this->_getCallerScriptPath( $sCallerPath ),
119
-            get_class( $this ),     // class name
120
-            'publish_posts',        // capability
121
-            $sTextDomain,           // text domain
119
+            get_class( $this ), // class name
120
+            'publish_posts', // capability
121
+            $sTextDomain, // text domain
122 122
             $this->_sStructureType  // structure type
123 123
         );
124
-        $this->oProp->sPostType     = AdminPageFramework_WPUtility::sanitizeSlug( $sPostType );
124
+        $this->oProp->sPostType = AdminPageFramework_WPUtility::sanitizeSlug( $sPostType );
125 125
         
126 126
         // Post type argument array structure
127 127
         // @see http://codex.wordpress.org/Function_Reference/register_post_type#Arguments
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 return $sCallerPath;
145 145
             }
146 146
             
147
-            if ( ! is_admin() ) {
147
+            if ( !is_admin() ) {
148 148
                 return null;
149 149
             }
150 150
             $_sPageNow = AdminPageFramework_Utility::getElement( $GLOBALS, 'pagenow' );
Please login to merge, or discard this patch.
development/factory/post_type/AdminPageFramework_PostType_Controller.php 3 patches
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @package     AdminPageFramework
18 18
  * @subpackage  PostType
19 19
  */
20
-abstract class AdminPageFramework_PostType_Controller extends AdminPageFramework_PostType_View {    
20
+abstract class AdminPageFramework_PostType_Controller extends AdminPageFramework_PostType_View {
21 21
 
22 22
     /**
23 23
      * Sets up hooks and properties.
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      * @since       3.0.0
80 80
      * @return      array       An array holding the handle IDs of queued items.
81 81
      */
82
-    public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) {     
82
+    public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) {
83 83
         if ( method_exists( $this->oResource, '_enqueueStyles' ) ) {
84 84
             return $this->oResource->_enqueueStyles( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs );
85 85
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *  
115 115
      * @since       3.0.0
116 116
      */
117
-    public function enqueueScript( $sSRC, $aCustomArgs=array() ) {    
117
+    public function enqueueScript( $sSRC, $aCustomArgs=array() ) {
118 118
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
119 119
             return $this->oResource->_enqueueScript( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs );
120 120
         }
Please login to merge, or discard this patch.
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -20,37 +20,37 @@  discard block
 block discarded – undo
20 20
 abstract class AdminPageFramework_PostType_Controller extends AdminPageFramework_PostType_View {    
21 21
 
22 22
     /**
23
-    * The method for necessary set-ups.
24
-    * 
25
-    * <h4>Example</h4>
26
-    * <code>public function setUp() {
27
-    *         $this->setAutoSave( false );
28
-    *         $this->setAuthorTableFilter( true );
29
-    *         $this->addTaxonomy( 
30
-    *             'sample_taxonomy', // taxonomy slug
31
-    *             array( // argument - for the argument array keys, refer to : http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments
32
-    *                 'labels'              => array(
33
-    *                     'name'            => 'Genre',
34
-    *                     'add_new_item'    => 'Add New Genre',
35
-    *                     'new_item_name'   => "New Genre"
36
-    *                 ),
37
-    *                 'show_ui'                 => true,
38
-    *                 'show_tagcloud'           => false,
39
-    *                 'hierarchical'            => true,
40
-    *                 'show_admin_column'       => true,
41
-    *                 'show_in_nav_menus'       => true,
42
-    *                 'show_table_filter'       => true, // framework specific key
43
-    *                 'show_in_sidebar_menus'   => false, // framework specific key
44
-    *             )
45
-    *         );
46
-    *     }</code>
47
-    * 
48
-    * @abstract
49
-    * @since        2.0.0
50
-    * @remark       The user should override this method in their class definition.
51
-    * @remark       A callback for the `wp_loaded` hook.
52
-    * @callback     action      init
53
-    */
23
+     * The method for necessary set-ups.
24
+     * 
25
+     * <h4>Example</h4>
26
+     * <code>public function setUp() {
27
+     *         $this->setAutoSave( false );
28
+     *         $this->setAuthorTableFilter( true );
29
+     *         $this->addTaxonomy( 
30
+     *             'sample_taxonomy', // taxonomy slug
31
+     *             array( // argument - for the argument array keys, refer to : http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments
32
+     *                 'labels'              => array(
33
+     *                     'name'            => 'Genre',
34
+     *                     'add_new_item'    => 'Add New Genre',
35
+     *                     'new_item_name'   => "New Genre"
36
+     *                 ),
37
+     *                 'show_ui'                 => true,
38
+     *                 'show_tagcloud'           => false,
39
+     *                 'hierarchical'            => true,
40
+     *                 'show_admin_column'       => true,
41
+     *                 'show_in_nav_menus'       => true,
42
+     *                 'show_table_filter'       => true, // framework specific key
43
+     *                 'show_in_sidebar_menus'   => false, // framework specific key
44
+     *             )
45
+     *         );
46
+     *     }</code>
47
+     * 
48
+     * @abstract
49
+     * @since        2.0.0
50
+     * @remark       The user should override this method in their class definition.
51
+     * @remark       A callback for the `wp_loaded` hook.
52
+     * @callback     action      init
53
+     */
54 54
     public function setUp() {}
55 55
     
56 56
     /**
@@ -116,49 +116,49 @@  discard block
 block discarded – undo
116 116
      * Front-end methods
117 117
      */
118 118
     /**
119
-    * Enables or disables the auto-save feature in the custom post type's post submission page.
120
-    * 
121
-    * <h4>Example</h4>
122
-    * <code>$this->setAutoSave( false );
123
-    * </code>
124
-    * 
125
-    * @since        2.0.0
126
-    * @param        boolean         If true, it enables the auto-save; otherwise, it disables it.
127
-    * return        void
128
-    */ 
119
+     * Enables or disables the auto-save feature in the custom post type's post submission page.
120
+     * 
121
+     * <h4>Example</h4>
122
+     * <code>$this->setAutoSave( false );
123
+     * </code>
124
+     * 
125
+     * @since        2.0.0
126
+     * @param        boolean         If true, it enables the auto-save; otherwise, it disables it.
127
+     * return        void
128
+     */ 
129 129
     protected function setAutoSave( $bEnableAutoSave=True ) {
130 130
         $this->oProp->bEnableAutoSave = $bEnableAutoSave;     
131 131
     }
132 132
     
133 133
     /**
134
-    * Adds a custom taxonomy to the class post type.
135
-    * <h4>Example</h4>
136
-    * <code>$this->addTaxonomy( 
137
-    *   'sample_taxonomy', // taxonomy slug
138
-    *   array( // argument
139
-    *       'labels'        => array(
140
-    *       'name'          => 'Genre',
141
-    *       'add_new_item'  => 'Add New Genre',
142
-    *       'new_item_name' => "New Genre"
143
-    *   ),
144
-    *   'show_ui'               => true,
145
-    *   'show_tagcloud'         => false,
146
-    *   'hierarchical'          => true,
147
-    *   'show_admin_column'     => true,
148
-    *   'show_in_nav_menus'     => true,
149
-    *   'show_table_filter'     => true,  // framework specific key
150
-    *   'show_in_sidebar_menus' => false, // framework specific key
151
-    *   )
152
-    * );</code>
153
-    * 
154
-    * @see      http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments
155
-    * @since    2.0.0
156
-    * @since    3.1.1       Added the third parameter.
157
-    * @param    string      $sTaxonomySlug              The taxonomy slug.
158
-    * @param    array       $aArguments                      The taxonomy argument array passed to the second parameter of the <a href="http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments">register_taxonomy()</a> function.
159
-    * @param    array       $aAdditionalObjectTypes     Additional object types (post types) besides the caller post type.
160
-    * @return   void
161
-    */ 
134
+     * Adds a custom taxonomy to the class post type.
135
+     * <h4>Example</h4>
136
+     * <code>$this->addTaxonomy( 
137
+     *   'sample_taxonomy', // taxonomy slug
138
+     *   array( // argument
139
+     *       'labels'        => array(
140
+     *       'name'          => 'Genre',
141
+     *       'add_new_item'  => 'Add New Genre',
142
+     *       'new_item_name' => "New Genre"
143
+     *   ),
144
+     *   'show_ui'               => true,
145
+     *   'show_tagcloud'         => false,
146
+     *   'hierarchical'          => true,
147
+     *   'show_admin_column'     => true,
148
+     *   'show_in_nav_menus'     => true,
149
+     *   'show_table_filter'     => true,  // framework specific key
150
+     *   'show_in_sidebar_menus' => false, // framework specific key
151
+     *   )
152
+     * );</code>
153
+     * 
154
+     * @see      http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments
155
+     * @since    2.0.0
156
+     * @since    3.1.1       Added the third parameter.
157
+     * @param    string      $sTaxonomySlug              The taxonomy slug.
158
+     * @param    array       $aArguments                      The taxonomy argument array passed to the second parameter of the <a href="http://codex.wordpress.org/Function_Reference/register_taxonomy#Arguments">register_taxonomy()</a> function.
159
+     * @param    array       $aAdditionalObjectTypes     Additional object types (post types) besides the caller post type.
160
+     * @return   void
161
+     */ 
162 162
     protected function addTaxonomy( $sTaxonomySlug, array $aArguments, array $aAdditionalObjectTypes=array() ) {
163 163
 
164 164
         $sTaxonomySlug  = $this->oUtil->sanitizeSlug( $sTaxonomySlug );
@@ -220,16 +220,16 @@  discard block
 block discarded – undo
220 220
         }
221 221
 
222 222
     /**
223
-    * Sets whether the author drop-down filter is enabled/disabled in the post type post list table.
224
-    * 
225
-    * <h4>Example</h4>
226
-    * <code>$this->setAuthorTableFilter( true );
227
-    * </code>
228
-    * 
229
-    * @since        2.0.0
230
-    * @param        boolean     $bEnableAuthorTableFileter      If true, it enables the author filter; otherwise, it disables it.
231
-    * @return       void
232
-    */ 
223
+     * Sets whether the author drop-down filter is enabled/disabled in the post type post list table.
224
+     * 
225
+     * <h4>Example</h4>
226
+     * <code>$this->setAuthorTableFilter( true );
227
+     * </code>
228
+     * 
229
+     * @since        2.0.0
230
+     * @param        boolean     $bEnableAuthorTableFileter      If true, it enables the author filter; otherwise, it disables it.
231
+     * @return       void
232
+     */ 
233 233
     protected function setAuthorTableFilter( $bEnableAuthorTableFileter=false ) {
234 234
         $this->oProp->bEnableAuthorTableFileter = $bEnableAuthorTableFileter;
235 235
     }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * @since       3.0.0
72 72
      * @return      array       An array holding the handle IDs of queued items.
73 73
      */
74
-    public function enqueueStyles( $aSRCs, $aCustomArgs=array() ) {     
74
+    public function enqueueStyles( $aSRCs, $aCustomArgs = array() ) {     
75 75
         if ( method_exists( $this->oResource, '_enqueueStyles' ) ) {
76 76
             return $this->oResource->_enqueueStyles( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs );
77 77
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * {@inheritdoc}
83 83
      * 
84 84
      */    
85
-    public function enqueueStyle( $sSRC, $aCustomArgs=array() ) {
85
+    public function enqueueStyle( $sSRC, $aCustomArgs = array() ) {
86 86
         if ( method_exists( $this->oResource, '_enqueueStyle' ) ) {
87 87
             return $this->oResource->_enqueueStyle( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs );     
88 88
         }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * 
95 95
      * @return      array       An array holding the handle IDs of queued items.
96 96
      */
97
-    public function enqueueScripts( $aSRCs, $aCustomArgs=array() ) {
97
+    public function enqueueScripts( $aSRCs, $aCustomArgs = array() ) {
98 98
         if ( method_exists( $this->oResource, '_enqueueScripts' ) ) {
99 99
             return $this->oResource->_enqueueScripts( $aSRCs, array( $this->oProp->sPostType ), $aCustomArgs );
100 100
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *  
107 107
      * @since       3.0.0
108 108
      */
109
-    public function enqueueScript( $sSRC, $aCustomArgs=array() ) {    
109
+    public function enqueueScript( $sSRC, $aCustomArgs = array() ) {    
110 110
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
111 111
             return $this->oResource->_enqueueScript( $sSRC, array( $this->oProp->sPostType ), $aCustomArgs );
112 112
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     * @param        boolean         If true, it enables the auto-save; otherwise, it disables it.
127 127
     * return        void
128 128
     */ 
129
-    protected function setAutoSave( $bEnableAutoSave=True ) {
129
+    protected function setAutoSave( $bEnableAutoSave = True ) {
130 130
         $this->oProp->bEnableAutoSave = $bEnableAutoSave;     
131 131
     }
132 132
     
@@ -159,20 +159,20 @@  discard block
 block discarded – undo
159 159
     * @param    array       $aAdditionalObjectTypes     Additional object types (post types) besides the caller post type.
160 160
     * @return   void
161 161
     */ 
162
-    protected function addTaxonomy( $sTaxonomySlug, array $aArguments, array $aAdditionalObjectTypes=array() ) {
162
+    protected function addTaxonomy( $sTaxonomySlug, array $aArguments, array $aAdditionalObjectTypes = array() ) {
163 163
 
164 164
         $sTaxonomySlug  = $this->oUtil->sanitizeSlug( $sTaxonomySlug );
165 165
         $aArguments     = $aArguments + array(
166 166
             'show_table_filter'     => null,
167 167
             'show_in_sidebar_menus' => null,
168
-            'submenu_order'         => 15,  // 3.7.4
169
-        ) ;
168
+            'submenu_order'         => 15, // 3.7.4
169
+        );
170 170
         $this->oProp->aTaxonomies[ $sTaxonomySlug ] = $aArguments;
171 171
         
172 172
         if ( $aArguments[ 'show_table_filter' ] ) {
173
-            $this->oProp->aTaxonomyTableFilters[] = $sTaxonomySlug;
173
+            $this->oProp->aTaxonomyTableFilters[ ] = $sTaxonomySlug;
174 174
         }
175
-        if ( ! $aArguments[ 'show_in_sidebar_menus' ] ) {
175
+        if ( !$aArguments[ 'show_in_sidebar_menus' ] ) {
176 176
             // @todo investigate the best handling method of taxonomy sub-menu items of a custom post type added to another custom post type menu with the `show_in_menu` arugment.
177 177
             $this->oProp->aTaxonomyRemoveSubmenuPages[ "edit-tags.php?taxonomy={$sTaxonomySlug}&amp;post_type={$this->oProp->sPostType}" ] = "edit.php?post_type={$this->oProp->sPostType}";
178 178
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     * @param        boolean     $bEnableAuthorTableFileter      If true, it enables the author filter; otherwise, it disables it.
231 231
     * @return       void
232 232
     */ 
233
-    protected function setAuthorTableFilter( $bEnableAuthorTableFileter=false ) {
233
+    protected function setAuthorTableFilter( $bEnableAuthorTableFileter = false ) {
234 234
         $this->oProp->bEnableAuthorTableFileter = $bEnableAuthorTableFileter;
235 235
     }
236 236
     
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @param       array       $aArguments     The <a href="http://codex.wordpress.org/Function_Reference/register_post_type#Arguments">array of arguments</a> to be passed to the second parameter of the `register_post_type()` function.
256 256
      * @since       3.2.0
257 257
      */
258
-    protected function setArguments( array $aArguments=array() ) {
258
+    protected function setArguments( array $aArguments = array() ) {
259 259
         $this->oProp->aPostTypeArgs = $aArguments;
260 260
     }
261 261
 
Please login to merge, or discard this patch.