Completed
Branch dev (43e9e0)
by
unknown
06:03
created
development/factory/admin_page/AdminPageFramework.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      * @since       2.0.0
35 35
      * @see         http://codex.wordpress.org/Roles_and_Capabilities
36 36
      * @see         http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains
37
-     * @param       array|integer|string    $aisOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
37
+     * @param       array|integer|string    $isOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
38 38
      * [3.5.9+] If an integer is given, a transient will be used. If an array of option key arguments is given, the argument values will be set to the framework properties.
39 39
      * - type - either `options_table` or `transient`.
40 40
      * - key - the option key or the transient key
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
57 57
      * @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.
58 58
      */
59
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
59
+    public function __construct( $isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
60 60
                         
61
-        if ( ! $this->_isInstantiatable() ) {
61
+        if ( !$this->_isInstantiatable() ) {
62 62
             return;
63 63
         }
64 64
                         
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
             $isOptionKey, 
67 67
             $sCallerPath 
68 68
                 ? trim( $sCallerPath )
69
-                : $sCallerPath = ( is_admin() && ( isset( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'plugins.php', ) ) || isset( $_GET['page'] ) ) 
69
+                : $sCallerPath = ( is_admin() && ( isset( $GLOBALS[ 'pagenow' ] ) && in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php',) ) || isset( $_GET[ 'page' ] ) ) 
70 70
                     ? AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ) 
71 71
                     : null 
72
-                ),     // this is important to attempt to find the caller script path here when separating the library into multiple files.    
72
+                ), // this is important to attempt to find the caller script path here when separating the library into multiple files.    
73 73
             $sCapability, 
74 74
             $sTextDomain 
75 75
         );
76 76
         
77
-        $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this );
77
+        $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this );
78 78
 
79 79
     }    
80 80
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
57 57
      * @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.
58 58
      */
59
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
59
+    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
60 60
                         
61 61
         if ( ! $this->_isInstantiatable() ) {
62 62
             return;
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller.php 4 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -142,6 +142,7 @@  discard block
 block discarded – undo
142 142
      *     <li>**media** - (optional, string) the description of the field which is inserted into the after the input field tag.</li>
143 143
      *     <li>**attributes** - (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )`</li>
144 144
      * </ul>
145
+     * @param string $sSRC
145 146
      * @return      string      The style handle ID. If the passed url is not a valid url string, an empty string will be returned.
146 147
      */    
147 148
     public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
@@ -234,6 +235,7 @@  discard block
 block discarded – undo
234 235
     * @param        string      the tagged HTML link text.
235 236
     * @param        string      (optional) another tagged HTML link text.
236 237
     * @param        string      (optional) add more as many as want by adding items to the next parameters.
238
+    * @param string $sTaggedLinkHTML1
237 239
     * @access       public
238 240
     * @return       void
239 241
     */     
@@ -258,6 +260,9 @@  discard block
 block discarded – undo
258 260
     * @param        string      the tagged HTML link text.
259 261
     * @param        string      (optional) another tagged HTML link text.
260 262
     * @param        string      (optional) add more as many as want by adding items to the next parameters.
263
+    * @param null|string $sTaggedLinkHTML1
264
+    * @param string $sTaggedLinkHTML2
265
+    * @param string $_and_more
261 266
     * @access       public
262 267
     * @return       void
263 268
     */    
@@ -274,6 +279,7 @@  discard block
 block discarded – undo
274 279
      * 
275 280
      * @since       3.1.0
276 281
      * @since       3.3.1       Moved from `AdminPageFramework`.
282
+     * @param string $sLabel
277 283
      */  
278 284
     public function setPluginSettingsLinkLabel( $sLabel ) {
279 285
         $this->oProp->sLabelPluginSettingsLink = $sLabel;
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -219,24 +219,24 @@  discard block
 block discarded – undo
219 219
     }
220 220
     
221 221
     /**
222
-    * Adds the given link(s) into the description cell of the plugin listing table.
223
-    * 
224
-    * <h4>Example</h4>
225
-    * <code>$this->addLinkToPluginDescription( 
226
-    *       "<a href='http://www.google.com'>Google</a>",
227
-    *       "<a href='http://www.yahoo.com'>Yahoo!</a>"
228
-    * );</code>
229
-    * 
230
-    * @since        2.0.0
231
-    * @since        3.0.0       Changed the scope to public from protected.
232
-    * @since        3.3.1       Moved from `AdminPageFramework`.
233
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
234
-    * @param        string      the tagged HTML link text.
235
-    * @param        string      (optional) another tagged HTML link text.
236
-    * @param        string      (optional) add more as many as want by adding items to the next parameters.
237
-    * @access       public
238
-    * @return       void
239
-    */     
222
+     * Adds the given link(s) into the description cell of the plugin listing table.
223
+     * 
224
+     * <h4>Example</h4>
225
+     * <code>$this->addLinkToPluginDescription( 
226
+     *       "<a href='http://www.google.com'>Google</a>",
227
+     *       "<a href='http://www.yahoo.com'>Yahoo!</a>"
228
+     * );</code>
229
+     * 
230
+     * @since        2.0.0
231
+     * @since        3.0.0       Changed the scope to public from protected.
232
+     * @since        3.3.1       Moved from `AdminPageFramework`.
233
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
234
+     * @param        string      the tagged HTML link text.
235
+     * @param        string      (optional) another tagged HTML link text.
236
+     * @param        string      (optional) add more as many as want by adding items to the next parameters.
237
+     * @access       public
238
+     * @return       void
239
+     */     
240 240
     public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
241 241
         if ( method_exists( $this->oLink, '_addLinkToPluginDescription' ) ) {
242 242
             $this->oLink->_addLinkToPluginDescription( func_get_args() );     
@@ -244,23 +244,23 @@  discard block
 block discarded – undo
244 244
     }
245 245
 
246 246
     /**
247
-    * Adds the given link(s) into the title cell of the plugin listing table.
248
-    * 
249
-    * <h4>Example</h4>
250
-    * <code>$this->addLinkToPluginTitle( 
251
-    *       "<a href='http://www.wordpress.org'>WordPress</a>"
252
-    * );</code>
253
-    * 
254
-    * @since        2.0.0
255
-    * @since        3.0.0       Changed the scope to public from protected.
256
-    * @since        3.3.1       Moved from `AdminPageFramework`.
257
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
258
-    * @param        string      the tagged HTML link text.
259
-    * @param        string      (optional) another tagged HTML link text.
260
-    * @param        string      (optional) add more as many as want by adding items to the next parameters.
261
-    * @access       public
262
-    * @return       void
263
-    */    
247
+     * Adds the given link(s) into the title cell of the plugin listing table.
248
+     * 
249
+     * <h4>Example</h4>
250
+     * <code>$this->addLinkToPluginTitle( 
251
+     *       "<a href='http://www.wordpress.org'>WordPress</a>"
252
+     * );</code>
253
+     * 
254
+     * @since        2.0.0
255
+     * @since        3.0.0       Changed the scope to public from protected.
256
+     * @since        3.3.1       Moved from `AdminPageFramework`.
257
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
258
+     * @param        string      the tagged HTML link text.
259
+     * @param        string      (optional) another tagged HTML link text.
260
+     * @param        string      (optional) add more as many as want by adding items to the next parameters.
261
+     * @access       public
262
+     * @return       void
263
+     */    
264 264
     public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param       array       $aCustomArgs    (optional) The argument array for more advanced parameters.
108 108
      * @return      array       The array holing the queued items.
109 109
      */
110
-    public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
110
+    public function enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
111 111
         if ( method_exists( $this->oResource, '_enqueueStyles' ) ) {
112 112
             return $this->oResource->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
113 113
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * </ul>
145 145
      * @return      string      The style handle ID. If the passed url is not a valid url string, an empty string will be returned.
146 146
      */    
147
-    public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
147
+    public function enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
148 148
         if ( method_exists( $this->oResource, '_enqueueStyle' ) ) {
149 149
             return $this->oResource->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );     
150 150
         }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @param       array       (optional) The argument array for more advanced parameters.
172 172
      * @return      array        The array holding the queued items.
173 173
      */
174
-    public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
174
+    public function enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {
175 175
         if ( method_exists( $this->oResource, '_enqueueScripts' ) ) {
176 176
             return $this->oResource->_enqueueScripts( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs );
177 177
         }
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      * </ul>
213 213
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
214 214
      */
215
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
215
+    public function enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) {    
216 216
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
217 217
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
218 218
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     * @access       public
238 238
     * @return       void
239 239
     */     
240
-    public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
240
+    public function addLinkToPluginDescription( $sTaggedLinkHTML1, $sTaggedLinkHTML2 = null, $_and_more = null ) {
241 241
         if ( method_exists( $this->oLink, '_addLinkToPluginDescription' ) ) {
242 242
             $this->oLink->_addLinkToPluginDescription( func_get_args() );     
243 243
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     * @access       public
262 262
     * @return       void
263 263
     */    
264
-    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
264
+    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2 = null, $_and_more = null ) {    
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
267 267
         }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
      * @param       string      (optional) The class selector used in the message HTML element. 'error' and 'updated' are prepared by WordPress but it's not limited to them and can pass a custom name. Default: 'error'.
318 318
      * @param       string      (optional) The ID of the message. If not set, the hash of the message will be used.
319 319
      */
320
-    public function setAdminNotice( $sMessage, $sClassSelector='error', $sID='' ) {
320
+    public function setAdminNotice( $sMessage, $sClassSelector = 'error', $sID = '' ) {
321 321
             
322 322
         $sID = $sID ? $sID : md5( $sMessage );
323 323
         
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
      * @param       boolean         If true, the passed key(s) will be appended to the property; otherwise, it will override the property.
355 355
      * @return      void
356 356
      */
357
-    public function setDisallowedQueryKeys( $asQueryKeys, $bAppend=true ) {
357
+    public function setDisallowedQueryKeys( $asQueryKeys, $bAppend = true ) {
358 358
         
359
-        if ( ! $bAppend ) {
359
+        if ( !$bAppend ) {
360 360
             $this->oProp->aDisallowedQueryKeys = ( array ) $asQueryKeys;
361 361
             return;
362 362
         }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      * @param       mixed       $vDefault       the default value that will be returned if nothing is stored.
400 400
      * @return      mixed       If the field ID is not specified
401 401
      */
402
-    static public function getOption( $sOptionKey, $asKey=null, $vDefault=null ) {
402
+    static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) {
403 403
         return AdminPageFramework_WPUtility::getOption( $sOptionKey, $asKey, $vDefault );
404 404
     }    
405 405
     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      * </ul>
213 213
      * @return      string      The script handle ID. If the passed url is not a valid url string, an empty string will be returned.
214 214
      */
215
-    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {    
215
+    public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) {
216 216
         if ( method_exists( $this->oResource, '_enqueueScript' ) ) {
217 217
             return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs );
218 218
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     * @access       public
262 262
     * @return       void
263 263
     */    
264
-    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {    
264
+    public function addLinkToPluginTitle( $sTaggedLinkHTML1, $sTaggedLinkHTML2=null, $_and_more=null ) {
265 265
         if ( method_exists( $this->oLink, '_addLinkToPluginTitle' ) ) {
266 266
             $this->oLink->_addLinkToPluginTitle( func_get_args() );     
267 267
         }
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Form.php 4 patches
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -153,9 +153,6 @@
 block discarded – undo
153 153
     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
154 154
     * @access       public
155 155
     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
156
-    * @param        string      $sSectionID1        the section ID to remove.
157
-    * @param        string      $sSectionID2        (optional) another section ID to remove.
158
-    * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
159 156
     * @return       void
160 157
     */    
161 158
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -140,24 +140,24 @@  discard block
 block discarded – undo
140 140
     }
141 141
     
142 142
     /**
143
-    * Removes the given section(s) by section ID.
144
-    * 
145
-    * This accesses the property storing the added section arrays and removes the specified ones.
146
-    * 
147
-    * <h4>Example</h4>
148
-    * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
149
-    * </code>
150
-    * 
151
-    * @since        2.0.0
152
-    * @since        3.0.0       Changed the scope to public from protected.
153
-    * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
154
-    * @access       public
155
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
156
-    * @param        string      $sSectionID1        the section ID to remove.
157
-    * @param        string      $sSectionID2        (optional) another section ID to remove.
158
-    * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
159
-    * @return       void
160
-    */    
143
+     * Removes the given section(s) by section ID.
144
+     * 
145
+     * This accesses the property storing the added section arrays and removes the specified ones.
146
+     * 
147
+     * <h4>Example</h4>
148
+     * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
149
+     * </code>
150
+     * 
151
+     * @since        2.0.0
152
+     * @since        3.0.0       Changed the scope to public from protected.
153
+     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
154
+     * @access       public
155
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
156
+     * @param        string      $sSectionID1        the section ID to remove.
157
+     * @param        string      $sSectionID2        (optional) another section ID to remove.
158
+     * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
159
+     * @return       void
160
+     */    
161 161
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
162 162
         
163 163
         foreach( func_get_args() as $_sSectionID ) {
@@ -224,38 +224,38 @@  discard block
 block discarded – undo
224 224
         }
225 225
     }
226 226
     /**
227
-    * Adds the given field array items into the field array property.
228
-    * 
229
-    * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
230
-    * 
231
-    * @since        2.1.2
232
-    * @since        3.0.0           Changed the scope to public from protected.
233
-    * @access       public
234
-    * @param        array|string    $asField        the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array.
235
-    * @return       void
236
-    */    
227
+     * Adds the given field array items into the field array property.
228
+     * 
229
+     * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
230
+     * 
231
+     * @since        2.1.2
232
+     * @since        3.0.0           Changed the scope to public from protected.
233
+     * @access       public
234
+     * @param        array|string    $asField        the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array.
235
+     * @return       void
236
+     */    
237 237
     public function addSettingField( $asField ) {
238 238
         $this->oForm->addField( $asField );    
239 239
     }    
240 240
     
241 241
     /**
242
-    * Removes the given field(s) by field ID.
243
-    * 
244
-    * This accesses the property storing the added field arrays and removes the specified ones.
245
-    * 
246
-    * <h4>Example</h4>
247
-    * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
248
-    * </code>
249
-    * 
250
-    * @since        2.0.0
251
-    * @since        3.0.0       Changed the scope to public from protected.
252
-    * @access       public
253
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
254
-    * @param        string      $sFieldID1      the field ID to remove.
255
-    * @param        string      $sFieldID2      (optional) another field ID to remove.
256
-    * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
257
-    * @return void
258
-    */    
242
+     * Removes the given field(s) by field ID.
243
+     * 
244
+     * This accesses the property storing the added field arrays and removes the specified ones.
245
+     * 
246
+     * <h4>Example</h4>
247
+     * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
248
+     * </code>
249
+     * 
250
+     * @since        2.0.0
251
+     * @since        3.0.0       Changed the scope to public from protected.
252
+     * @access       public
253
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
254
+     * @param        string      $sFieldID1      the field ID to remove.
255
+     * @param        string      $sFieldID2      (optional) another field ID to remove.
256
+     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
257
+     * @return void
258
+     */    
259 259
     public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
260 260
         foreach( func_get_args() as $_sFieldID ) { 
261 261
             $this->oForm->removeField( $_sFieldID ); 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */     
73 73
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
74 74
         
75
-        foreach( func_get_args() as $asSection ) { 
75
+        foreach ( func_get_args() as $asSection ) { 
76 76
             $this->addSettingSection( $asSection ); 
77 77
         }
78 78
         
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function addSettingSection( $asSection ) {
97 97
                 
98
-        if ( ! is_array( $asSection ) ) {
98
+        if ( !is_array( $asSection ) ) {
99 99
             $this->_sTargetPageSlug = is_string( $asSection )
100 100
                 ? $asSection 
101 101
                 : $this->_sTargetPageSlug;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             )
123 123
         ); // avoid undefined index warnings.
124 124
         
125
-        $aSection[ 'page_slug' ]          = $aSection[ 'page_slug' ] 
125
+        $aSection[ 'page_slug' ] = $aSection[ 'page_slug' ] 
126 126
             ? $this->oUtil->sanitizeSlug( $aSection[ 'page_slug' ] ) 
127 127
             : ( $this->oProp->sDefaultPageSlug 
128 128
                 ? $this->oProp->sDefaultPageSlug 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $aSection[ 'section_tab_slug' ]   = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
133 133
         
134 134
         // A page slug is required.
135
-        if ( ! $aSection[ 'page_slug' ] ) {
135
+        if ( !$aSection[ 'page_slug' ] ) {
136 136
             return; 
137 137
         }
138 138
         $this->oForm->addSection( $aSection );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     */    
161 161
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
162 162
         
163
-        foreach( func_get_args() as $_sSectionID ) {
163
+        foreach ( func_get_args() as $_sSectionID ) {
164 164
             $this->oForm->removeSection( $_sSectionID );
165 165
         }
166 166
         
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
220 220
      */     
221 221
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {    
222
-        foreach( func_get_args() as $aField ) { 
222
+        foreach ( func_get_args() as $aField ) { 
223 223
             $this->addSettingField( $aField ); 
224 224
         }
225 225
     }
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
257 257
     * @return void
258 258
     */    
259
-    public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
260
-        foreach( func_get_args() as $_sFieldID ) { 
259
+    public function removeSettingFields( $sFieldID1, $sFieldID2 = null, $_and_more ) {
260
+        foreach ( func_get_args() as $_sFieldID ) { 
261 261
             $this->oForm->removeField( $_sFieldID ); 
262 262
         }
263 263
     }    
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             $this->oProp->sOptionKey, 
305 305
             empty( $_aParams ) 
306 306
                 ? null                  // will return the entire options array
307
-                : $_aDimensionalKeys,   // dimensional keys
307
+                : $_aDimensionalKeys, // dimensional keys
308 308
             $_mDefault, // default
309 309
             $this->getSavedOptions() + $this->oForm->getDefaultFormValues()
310 310
         );
@@ -323,18 +323,18 @@  discard block
 block discarded – undo
323 323
      * If the user has not submitted the form, the framework will try to return the default value set in the field definition array.
324 324
      * @deprecated  3.3.0
325 325
      */
326
-    public function getFieldValue( $sFieldID, $sSectionID='' ) {
326
+    public function getFieldValue( $sFieldID, $sSectionID = '' ) {
327 327
                                
328
-        trigger_error( 'Admin Page Framework: ' . ' : ' . sprintf( __( 'The method is deprecated: %1$s. Use %2$s instead.', $this->oProp->sTextDomain ), __METHOD__, 'getValue()' ), E_USER_WARNING );
328
+        trigger_error( 'Admin Page Framework: '.' : '.sprintf( __( 'The method is deprecated: %1$s. Use %2$s instead.', $this->oProp->sTextDomain ), __METHOD__, 'getValue()' ), E_USER_WARNING );
329 329
     
330 330
         $_aOptions = $this->oUtil->uniteArrays( $this->oProp->aOptions, $this->oForm->getDefaultFormValues() );
331 331
         /* If it's saved, return it */
332
-        if ( ! $sSectionID ) {
332
+        if ( !$sSectionID ) {
333 333
             if ( array_key_exists( $sFieldID, $_aOptions ) ) {
334 334
                 return $_aOptions[ $sFieldID ];
335 335
             }    
336 336
             // loop through section elements
337
-            foreach( $_aOptions as $aOptions ) {
337
+            foreach ( $_aOptions as $aOptions ) {
338 338
                 if ( array_key_exists( $sFieldID, $aOptions ) ) {
339 339
                     return $aOptions[ $sFieldID ];
340 340
                 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */     
73 73
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
74 74
         
75
-        foreach( func_get_args() as $asSection ) { 
75
+        foreach( func_get_args() as $asSection ) {
76 76
             $this->addSettingSection( $asSection ); 
77 77
         }
78 78
         
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
159 159
     * @return       void
160 160
     */    
161
-    public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
161
+    public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {
162 162
         
163 163
         foreach( func_get_args() as $_sSectionID ) {
164 164
             $this->oForm->removeSection( $_sSectionID );
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
      * @remark      Accepts variadic parameters; the number of accepted parameters are not limited to three.
219 219
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
220 220
      */     
221
-    public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {    
222
-        foreach( func_get_args() as $aField ) { 
221
+    public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
222
+        foreach( func_get_args() as $aField ) {
223 223
             $this->addSettingField( $aField ); 
224 224
         }
225 225
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
     * @return void
258 258
     */    
259 259
     public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
260
-        foreach( func_get_args() as $_sFieldID ) { 
260
+        foreach( func_get_args() as $_sFieldID ) {
261 261
             $this->oForm->removeField( $_sFieldID ); 
262 262
         }
263 263
     }    
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Menu.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -48,6 +48,8 @@  discard block
 block discarded – undo
48 48
      *  <li>a base64-encoded SVG using a data URI, which will be colored to match the color scheme. This should begin with 'data:image/svg+xml;base64,'.</li>
49 49
      * </ul>
50 50
      * @param       string      (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function.
51
+     * @param string $sIcon16x16
52
+     * @param integer $iMenuPosition
51 53
      * @return      void
52 54
      */
53 55
     public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) {
@@ -70,6 +72,7 @@  discard block
 block discarded – undo
70 72
          * 
71 73
          * @since       2.0.0
72 74
          * @internal
75
+         * @param string $sMenuLabel
73 76
          * @return      void|string Returns the associated slug string, if true.
74 77
          */ 
75 78
         private function _isBuiltInMenuItem( $sMenuLabel ) {
Please login to merge, or discard this patch.
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -104,39 +104,39 @@  discard block
 block discarded – undo
104 104
     }
105 105
     
106 106
     /**
107
-    * Adds sub-menu items on the left sidebar menu of the administration panel. 
108
-    * 
109
-    * It supports pages and links. Each of them has the specific array structure.
110
-    * 
111
-    * <h4>Example</h4>
112
-    * <code>$this->addSubMenuItems(
113
-    *       array(
114
-    *           'title'         => 'Various Form Fields',
115
-    *           'page_slug'     => 'first_page',
116
-    *           'screen_icon'   => 'options-general',
117
-    *       ),
118
-    *       array(
119
-    *           'title'         => 'Manage Options',
120
-    *           'page_slug'     => 'second_page',
121
-    *           'screen_icon'   => 'link-manager',
122
-    *       ),
123
-    *       array(
124
-    *           'title'         => 'Google',
125
-    *           'href'          => 'http://www.google.com',    
126
-    *           'show_page_heading_tab' => false, // this removes the title from the page heading tabs.
127
-    *       )
128
-    * );</code>
129
-    * 
130
-    * @since        2.0.0
131
-    * @since        3.0.0       Changed the scope to public.
132
-    * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
133
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
134
-    * @param        array       $aSubMenuItem1      a first sub-menu array. A sub-menu array can be a link or a page. For the specifications of the array structures and its arguments, refer to the parameter section of the `addSubMenuItem()` method.
135
-    * @param        array       $aSubMenuItem2      (optional) a second sub-menu array.
136
-    * @param        array       $_and_more          (optional) a third and add items as many as necessary with next parameters.
137
-    * @access       public
138
-    * @return       void
139
-    */     
107
+     * Adds sub-menu items on the left sidebar menu of the administration panel. 
108
+     * 
109
+     * It supports pages and links. Each of them has the specific array structure.
110
+     * 
111
+     * <h4>Example</h4>
112
+     * <code>$this->addSubMenuItems(
113
+     *       array(
114
+     *           'title'         => 'Various Form Fields',
115
+     *           'page_slug'     => 'first_page',
116
+     *           'screen_icon'   => 'options-general',
117
+     *       ),
118
+     *       array(
119
+     *           'title'         => 'Manage Options',
120
+     *           'page_slug'     => 'second_page',
121
+     *           'screen_icon'   => 'link-manager',
122
+     *       ),
123
+     *       array(
124
+     *           'title'         => 'Google',
125
+     *           'href'          => 'http://www.google.com',    
126
+     *           'show_page_heading_tab' => false, // this removes the title from the page heading tabs.
127
+     *       )
128
+     * );</code>
129
+     * 
130
+     * @since        2.0.0
131
+     * @since        3.0.0       Changed the scope to public.
132
+     * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
133
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
134
+     * @param        array       $aSubMenuItem1      a first sub-menu array. A sub-menu array can be a link or a page. For the specifications of the array structures and its arguments, refer to the parameter section of the `addSubMenuItem()` method.
135
+     * @param        array       $aSubMenuItem2      (optional) a second sub-menu array.
136
+     * @param        array       $_and_more          (optional) a third and add items as many as necessary with next parameters.
137
+     * @access       public
138
+     * @return       void
139
+     */     
140 140
     public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2=null, $_and_more=null ) {
141 141
         foreach ( func_get_args() as $_aSubMenuItem ) {
142 142
             $this->addSubMenuItem( $_aSubMenuItem );     
@@ -144,50 +144,50 @@  discard block
 block discarded – undo
144 144
     }
145 145
     
146 146
     /**
147
-    * Adds the given sub-menu item on the left sidebar menu of the administration panel.
148
-    * 
149
-    * It supports pages and links. Each of them has the specific array structure.
150
-    * 
151
-    * <h4>Example</h4>
152
-    * <code>$this->addSubMenuItem(
153
-    *       array(
154
-    *           'title'         => 'Read Me',
155
-    *           'menu_title'    => 'About'
156
-    *           'page_slug'     => 'my_plugin_readme',
157
-    *       )
158
-    * );</code>
159
-    * 
160
-    * @since        2.0.0
161
-    * @since        3.0.0       Changed the scope to public.
162
-    * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
163
-    * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
164
-    * <h4>Sub-menu Page Array</h4>
165
-    * <ul>
166
-    *   <li>**title** - (string) the page title of the page.</li>
167
-    *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
168
-    *   <li>**screen_icon** - (optional, string) either the ID selector name from the following list or the icon URL. The size of the icon should be 32 by 32 in pixel. This is for WordPress 3.7.x or below.
169
-    *       <pre>edit, post, index, media, upload, link-manager, link, link-category, edit-pages, page, edit-comments, themes, plugins, users, profile, user-edit, tools, admin, options-general, ms-admin, generic</pre>
170
-    *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
171
-    *   </li>
172
-    *   <li>**capability** - (optional, string) the access level to the created admin pages defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
173
-    *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
174
-    *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
175
-    *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
176
-    *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
177
-    *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
178
-    * </ul>
179
-    * <h4>Sub-menu Link Array</h4>
180
-    * <ul>
181
-    *   <li>**title** - (string) the link title.</li>
182
-    *   <li>**href** - (string) the URL of the target link.</li>
183
-    *   <li>**capability** - (optional, string) the access level to show the item, defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
184
-    *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
185
-    *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
186
-    *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
187
-    * </ul>
188
-    * @access       public
189
-    * @return       void
190
-    */    
147
+     * Adds the given sub-menu item on the left sidebar menu of the administration panel.
148
+     * 
149
+     * It supports pages and links. Each of them has the specific array structure.
150
+     * 
151
+     * <h4>Example</h4>
152
+     * <code>$this->addSubMenuItem(
153
+     *       array(
154
+     *           'title'         => 'Read Me',
155
+     *           'menu_title'    => 'About'
156
+     *           'page_slug'     => 'my_plugin_readme',
157
+     *       )
158
+     * );</code>
159
+     * 
160
+     * @since        2.0.0
161
+     * @since        3.0.0       Changed the scope to public.
162
+     * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
163
+     * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
164
+     * <h4>Sub-menu Page Array</h4>
165
+     * <ul>
166
+     *   <li>**title** - (string) the page title of the page.</li>
167
+     *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
168
+     *   <li>**screen_icon** - (optional, string) either the ID selector name from the following list or the icon URL. The size of the icon should be 32 by 32 in pixel. This is for WordPress 3.7.x or below.
169
+     *       <pre>edit, post, index, media, upload, link-manager, link, link-category, edit-pages, page, edit-comments, themes, plugins, users, profile, user-edit, tools, admin, options-general, ms-admin, generic</pre>
170
+     *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
171
+     *   </li>
172
+     *   <li>**capability** - (optional, string) the access level to the created admin pages defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
173
+     *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
174
+     *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
175
+     *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
176
+     *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
177
+     *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
178
+     * </ul>
179
+     * <h4>Sub-menu Link Array</h4>
180
+     * <ul>
181
+     *   <li>**title** - (string) the link title.</li>
182
+     *   <li>**href** - (string) the URL of the target link.</li>
183
+     *   <li>**capability** - (optional, string) the access level to show the item, defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
184
+     *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
185
+     *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
186
+     *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
187
+     * </ul>
188
+     * @access       public
189
+     * @return       void
190
+     */    
191 191
     public function addSubMenuItem( array $aSubMenuItem ) {
192 192
         if ( isset( $aSubMenuItem[ 'href' ] ) ) {
193 193
             $this->addSubMenuLink( $aSubMenuItem );
@@ -197,20 +197,20 @@  discard block
 block discarded – undo
197 197
     }
198 198
 
199 199
     /**
200
-    * Adds the given link into the menu on the left sidebar of the administration panel.
201
-    * 
202
-    * @since        2.0.0
203
-    * @since        3.0.0       Changed the scope to public from protected.
204
-    * @since        3.5.0       Changed the scope to public as it was still protected.
205
-    * @param        string      the menu title.
206
-    * @param        string      the URL linked to the menu.
207
-    * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
208
-    * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
209
-    * @param        string      (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page.
210
-    * @access       public
211
-    * @return       void
212
-    * @internal
213
-    */    
200
+     * Adds the given link into the menu on the left sidebar of the administration panel.
201
+     * 
202
+     * @since        2.0.0
203
+     * @since        3.0.0       Changed the scope to public from protected.
204
+     * @since        3.5.0       Changed the scope to public as it was still protected.
205
+     * @param        string      the menu title.
206
+     * @param        string      the URL linked to the menu.
207
+     * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
208
+     * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
209
+     * @param        string      (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page.
210
+     * @access       public
211
+     * @return       void
212
+     * @internal
213
+     */    
214 214
     public function addSubMenuLink( array $aSubMenuLink ) {
215 215
         
216 216
         // If required keys are not set, return.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param       string      (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function.
51 51
      * @return      void
52 52
      */
53
-    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) {
53
+    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16 = null, $iMenuPosition = null ) {
54 54
 
55 55
         $sRootMenuLabel = trim( $sRootMenuLabel );
56 56
         $_sSlug         = $this->_isBuiltInMenuItem( $sRootMenuLabel ); // if true, this method returns the slug
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
      */ 
99 99
     public function setRootMenuPageBySlug( $sRootMenuSlug ) {
100 100
         
101
-        $this->oProp->aRootMenu['sPageSlug']    = $sRootMenuSlug; // do not sanitize the slug here because post types includes a question mark.
102
-        $this->oProp->aRootMenu['fCreateRoot']  = false; // indicates to use an existing menu item. 
101
+        $this->oProp->aRootMenu[ 'sPageSlug' ]    = $sRootMenuSlug; // do not sanitize the slug here because post types includes a question mark.
102
+        $this->oProp->aRootMenu[ 'fCreateRoot' ]  = false; // indicates to use an existing menu item. 
103 103
         
104 104
     }
105 105
     
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     * @access       public
138 138
     * @return       void
139 139
     */     
140
-    public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2=null, $_and_more=null ) {
140
+    public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2 = null, $_and_more = null ) {
141 141
         foreach ( func_get_args() as $_aSubMenuItem ) {
142 142
             $this->addSubMenuItem( $_aSubMenuItem );     
143 143
         }
@@ -214,16 +214,16 @@  discard block
 block discarded – undo
214 214
     public function addSubMenuLink( array $aSubMenuLink ) {
215 215
         
216 216
         // If required keys are not set, return.
217
-        if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) { 
217
+        if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { 
218 218
             return; 
219 219
         }
220 220
         
221 221
         // If the set URL is not valid, return.
222
-        if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) { 
222
+        if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { 
223 223
             return; 
224 224
         }
225 225
 
226
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuLink( 
226
+        $_oFormatter = new AdminPageFramework_Format_SubMenuLink( 
227 227
             $aSubMenuLink, 
228 228
             $this 
229 229
         );
@@ -312,11 +312,11 @@  discard block
 block discarded – undo
312 312
      */ 
313 313
     public function addSubMenuPage( array $aSubMenuPage ) {
314 314
 
315
-        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
315
+        if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
316 316
             return; 
317 317
         }
318 318
             
319
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuPage( 
319
+        $_oFormatter = new AdminPageFramework_Format_SubMenuPage( 
320 320
             $aSubMenuPage,
321 321
             $this 
322 322
         );
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,8 +75,9 @@  discard block
 block discarded – undo
75 75
         private function _isBuiltInMenuItem( $sMenuLabel ) {
76 76
             
77 77
             $_sMenuLabelLower = strtolower( $sMenuLabel );
78
-            if ( array_key_exists( $_sMenuLabelLower, $this->_aBuiltInRootMenuSlugs ) )
79
-                return $this->_aBuiltInRootMenuSlugs[ $_sMenuLabelLower ];
78
+            if ( array_key_exists( $_sMenuLabelLower, $this->_aBuiltInRootMenuSlugs ) ) {
79
+                            return $this->_aBuiltInRootMenuSlugs[ $_sMenuLabelLower ];
80
+            }
80 81
             
81 82
         }    
82 83
 
@@ -214,12 +215,12 @@  discard block
 block discarded – undo
214 215
     public function addSubMenuLink( array $aSubMenuLink ) {
215 216
         
216 217
         // If required keys are not set, return.
217
-        if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) { 
218
+        if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) {
218 219
             return; 
219 220
         }
220 221
         
221 222
         // If the set URL is not valid, return.
222
-        if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) { 
223
+        if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) {
223 224
             return; 
224 225
         }
225 226
 
@@ -312,7 +313,7 @@  discard block
 block discarded – undo
312 313
      */ 
313 314
     public function addSubMenuPage( array $aSubMenuPage ) {
314 315
 
315
-        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
316
+        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) {
316 317
             return; 
317 318
         }
318 319
             
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Page.php 3 patches
Doc Comments   +4 added lines, -36 removed lines patch added patch discarded remove patch
@@ -52,42 +52,6 @@  discard block
 block discarded – undo
52 52
      * @since       2.0.0
53 53
      * @since       3.0.0     Changed the scope to public. Added page slug target support. 
54 54
      * @since       3.3.1       Moved from `AdminPageFramework_Page`.
55
-     * @param       array     $aTab1 The in-page tab array.
56
-     * <h4>In-Page Tab Array</h4>
57
-     * <ul>
58
-     *     <li>**page_slug** - (string) the page slug that the tab belongs to.</li>
59
-     *     <li>**tab_slug** -  (string) the tab slug. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
60
-     *     <li>**title** - (string) the title of the tab.</li>
61
-     *     <li>**order** - (optional, integer) the order number of the tab. The lager the number is, the lower the position it is placed in the menu.</li>
62
-     *     <li>**show_in_page_tab** - (optional, boolean) default: `true`. If this is set to `false`, the tab title will not be displayed in the tab navigation menu; however, it is still accessible from the direct URL.</li>
63
-     *     <li>**parent_tab_slug** - (optional, string) this needs to be set if the above `show_in_page_tab` argument is `false` so that the parent tab will be emphasized as active when the hidden page is accessed.</li>
64
-     *     <li>**url** - [3.5.0+] (optional, string) If this is set, the link url of the navigation tab will be this url. Use this to create link only tab.</li>
65
-     *     <li>**capability** - [3.6.0+] (optional, string) The capability level.</li>
66
-     *     <li>**if** - [3.6.0+] (optional, boolean) Whether the tab should be displayed or not.</li>
67
-     *     <li>style - [3.6.3+] (optional) (string|array) The path or url of a stylesheet which gets loaded in the head tag. Or inline CSS rules.
68
-     * When custom arguments need to be set such as whether it should be inserted in the footer, set an array holding the following arguments.
69
-     *          <ul>
70
-     *              <li>src - (required, string) the source url or path.</li>    
71
-     *              <li>handle_id - (optional, string) The handle ID of the stylesheet.</li>    
72
-     *              <li>dependencies - (optional, array) The dependency array.</li>    
73
-     *              <li>version - (optional, string) The stylesheet version number.</li>    
74
-     *              <li>media - (optional, string) the description of the field which is inserted into the after the input field tag.</li>    
75
-     *          </ul>
76
-     *     </li>
77
-     *     <li>script - [3.6.3+] (optional) (string|array) The path or url of a JavaScript script which gets loaded in the head tag. Or an inline JavaScript script.
78
-     * When custom arguments need to be set such as whether it should be inserted in the footer, set an array holding the following arguments.
79
-     *          <ul>
80
-     *              <li>src - (required, string) the source url or path.</li>    
81
-     *              <li>handle_id - (optional, string) The handle ID of the stylesheet.</li>    
82
-     *              <li>dependencies - (optional, array) The dependency array.</li>    
83
-     *              <li>version - (optional, string) The stylesheet version number.</li>    
84
-     *              <li>translation - (optional, array) an array holding translation key-value pairs.</li>    
85
-     *          </ul>
86
-     *     </li>
87
-     * </ul>
88
-     * @param       array       $aTab2      Another in-page tab array.
89
-     * @param       array       $_and_more  (optional) Add in-page tab arrays as many as necessary to the next parameters.
90
-     * @param       string      $sPageSlug  (optional) If the passed parameter item is a string, it will be stored as the target page slug so that it will be applied to the next passed tab arrays as the page_slug element.
91 55
      * @remark      Accepts variadic parameters; the number of accepted parameters are not limited to three.
92 56
      * @remark      In-page tabs are different from page-heading tabs which is automatically added with page titles.  
93 57
      * @return      void
@@ -277,6 +241,10 @@  discard block
 block discarded – undo
277 241
         /**
278 242
          * Sets a page property.
279 243
          * @since       3.6.0
244
+         * @param string $sPropertyName
245
+         * @param string $sPropertyKey
246
+         * @param boolean|string $mValue
247
+         * @param string $sPageSlug
280 248
          * @return      void
281 249
          */
282 250
         private function _setPageProperty( $sPropertyName, $sPropertyKey, $mValue, $sPageSlug ) {
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return      void
94 94
      */             
95 95
     public function addInPageTabs( /* $aTab1, $aTab2=null, $_and_more=null */ ) {
96
-        foreach( func_get_args() as $asTab ) { 
96
+        foreach ( func_get_args() as $asTab ) { 
97 97
             $this->addInPageTab( $asTab ); 
98 98
         }
99 99
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         
116 116
         // Target page slug - will be applied when no page slug is specified.
117 117
         static $__sTargetPageSlug; 
118
-        if ( ! is_array( $asInPageTab ) ) {
118
+        if ( !is_array( $asInPageTab ) ) {
119 119
             $__sTargetPageSlug = is_string( $asInPageTab ) 
120 120
                 ? $asInPageTab 
121 121
                 : $__sTargetPageSlug; // set the target page slug
@@ -130,23 +130,23 @@  discard block
 block discarded – undo
130 130
         );
131 131
         
132 132
         // Set the target page slug for next calls
133
-        $__sTargetPageSlug  = $aInPageTab[ 'page_slug' ]; 
133
+        $__sTargetPageSlug = $aInPageTab[ 'page_slug' ]; 
134 134
 
135 135
         // Required keys
136
-        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
136
+        if ( !isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
137 137
             return; 
138 138
         }
139 139
         
140 140
         // Count - the number of added in-page tabs.
141
-        $_aElements         = $this->oUtil->getElement(
141
+        $_aElements = $this->oUtil->getElement(
142 142
             $this->oProp->aInPageTabs,
143 143
             $aInPageTab[ 'page_slug' ],
144 144
             array()
145 145
         );
146
-        $_iCountElement      = count( $_aElements );
146
+        $_iCountElement = count( $_aElements );
147 147
 
148 148
         // Pre-format
149
-        $aInPageTab         = array( 
149
+        $aInPageTab = array( 
150 150
             'page_slug' => $this->oUtil->sanitizeSlug( $aInPageTab[ 'page_slug' ] ),
151 151
             'tab_slug'  => $this->oUtil->sanitizeSlug( $aInPageTab[ 'tab_slug' ] ),
152 152
             'order'     => $this->oUtil->getAOrB(
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      * @param       boolean     $bShow If false, the page title will not be displayed.
175 175
      * @return      void
176 176
      */ 
177
-    public function setPageTitleVisibility( $bShow=true, $sPageSlug='' ) {
177
+    public function setPageTitleVisibility( $bShow = true, $sPageSlug = '' ) {
178 178
         $this->_setPageProperty( 
179 179
             'bShowPageTitle', 
180 180
             'show_page_title', 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @remark      Page-heading tabs and in-page tabs are different. The former displays page titles and the latter displays tab titles.
199 199
      * @remark      If the second parameter is omitted, it sets the default value.
200 200
      */ 
201
-    public function setPageHeadingTabsVisibility( $bShow=true, $sPageSlug='' ) {
201
+    public function setPageHeadingTabsVisibility( $bShow = true, $sPageSlug = '' ) {
202 202
         $this->_setPageProperty( 
203 203
             'bShowPageHeadingTabs', 
204 204
             'show_page_heading_tabs', 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param       string      $sPageSlug  The page to apply the visibility setting. If not set, it applies to all the pages.
220 220
      * @remark      If the second parameter is omitted, it sets the default value.
221 221
      */
222
-    public function setInPageTabsVisibility( $bShow=true, $sPageSlug='' ) {
222
+    public function setInPageTabsVisibility( $bShow = true, $sPageSlug = '' ) {
223 223
         $this->_setPageProperty( 
224 224
             'bShowInPageTabs', 
225 225
             'show_in_page_tabs', 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param       string      $sPageSlug      The page slug that applies the setting.    
243 243
      * @remark      If the second parameter is omitted, it sets the default value.
244 244
      */     
245
-    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {      
245
+    public function setInPageTabTag( $sTag = 'h3', $sPageSlug = '' ) {      
246 246
         $this->_setPageProperty( 
247 247
             'sInPageTabTag', 
248 248
             'in_page_tab_tag', 
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
      * @param       string      $sPageSlug  The page slug that applies the setting.    
266 266
      * @remark      If the second parameter is omitted, it sets the default value.
267 267
      */
268
-    public function setPageHeadingTabTag( $sTag='h2', $sPageSlug='' ) {
268
+    public function setPageHeadingTabTag( $sTag = 'h2', $sPageSlug = '' ) {
269 269
         $this->_setPageProperty( 
270
-            'sPageHeadingTabTag',   // property name
270
+            'sPageHeadingTabTag', // property name
271 271
             'page_heading_tab_tag', // property key
272 272
             $sTag, // value
273 273
             $sPageSlug  // page slug
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             
290 290
             $this->oProp->{$sPropertyName} = $mValue;
291 291
        
292
-            foreach( $this->oProp->aPages as &$_aPage ) {
292
+            foreach ( $this->oProp->aPages as &$_aPage ) {
293 293
                 $_aPage[ $sPropertyKey ] = $mValue;
294 294
 
295 295
             }                        
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return      void
94 94
      */             
95 95
     public function addInPageTabs( /* $aTab1, $aTab2=null, $_and_more=null */ ) {
96
-        foreach( func_get_args() as $asTab ) { 
96
+        foreach( func_get_args() as $asTab ) {
97 97
             $this->addInPageTab( $asTab ); 
98 98
         }
99 99
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @remark      In-page tabs are different from page-heading tabs which are automatically added with page titles.
112 112
      * @return      void
113 113
      */         
114
-    public function addInPageTab( $asInPageTab ) {    
114
+    public function addInPageTab( $asInPageTab ) {
115 115
         
116 116
         // Target page slug - will be applied when no page slug is specified.
117 117
         static $__sTargetPageSlug; 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $__sTargetPageSlug  = $aInPageTab[ 'page_slug' ]; 
134 134
 
135 135
         // Required keys
136
-        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
136
+        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) {
137 137
             return; 
138 138
         }
139 139
         
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param       string      $sPageSlug      The page slug that applies the setting.    
243 243
      * @remark      If the second parameter is omitted, it sets the default value.
244 244
      */     
245
-    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {      
245
+    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {
246 246
         $this->_setPageProperty( 
247 247
             'sInPageTabTag', 
248 248
             'in_page_tab_tag', 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Model_Menu.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -24,6 +24,7 @@
 block discarded – undo
24 24
      * Registers necessary callbacks and sets up properties.
25 25
      * 
26 26
      * @internal
27
+     * @param string $sCallerPath
27 28
      */
28 29
     public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
29 30
         
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * 
26 26
      * @internal
27 27
      */
28
-    public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
28
+    public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
29 29
         
30 30
         parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain );
31 31
         
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
             foreach ( $this->oProp->aPages as $_aPage ) {
128 128
                 
129
-                if ( ! isset( $_aPage[ 'page_slug' ] ) ) { 
129
+                if ( !isset( $_aPage[ 'page_slug' ] ) ) { 
130 130
                     continue; 
131 131
                 }
132 132
                 $this->oProp->sDefaultPageSlug = $_aPage[ 'page_slug' ];
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
          */ 
145 145
         private function _registerRootMenuPage() {
146 146
             $this->oProp->aRootMenu[ '_page_hook' ] = add_menu_page(  
147
-                $this->oProp->sClassName,                 // Page title - will be invisible anyway
148
-                $this->oProp->aRootMenu[ 'sTitle' ],      // Menu title - should be the root page title.
149
-                $this->oProp->sCapability,                // Capability - access right
150
-                $this->oProp->aRootMenu[ 'sPageSlug' ],   // Menu ID 
151
-                '',                                       // Page content displaying function - the root page will be removed so no need to register a function.
152
-                $this->oProp->aRootMenu[ 'sIcon16x16' ],  // icon path
147
+                $this->oProp->sClassName, // Page title - will be invisible anyway
148
+                $this->oProp->aRootMenu[ 'sTitle' ], // Menu title - should be the root page title.
149
+                $this->oProp->sCapability, // Capability - access right
150
+                $this->oProp->aRootMenu[ 'sPageSlug' ], // Menu ID 
151
+                '', // Page content displaying function - the root page will be removed so no need to register a function.
152
+                $this->oProp->aRootMenu[ 'sIcon16x16' ], // icon path
153 153
                 $this->oUtil->getElement( 
154 154
                     $this->oProp->aRootMenu, 
155 155
                     'iPosition', 
@@ -173,32 +173,32 @@  discard block
 block discarded – undo
173 173
          */ 
174 174
         private function _registerSubMenuItem( array $aArgs ) {
175 175
 
176
-            if ( ! current_user_can( $aArgs['capability'] ) ) {
176
+            if ( !current_user_can( $aArgs[ 'capability' ] ) ) {
177 177
                 return '';
178 178
             }
179 179
                  
180
-            $_sRootPageSlug = $this->oProp->aRootMenu['sPageSlug'];
180
+            $_sRootPageSlug = $this->oProp->aRootMenu[ 'sPageSlug' ];
181 181
             $_sMenuSlug     = plugin_basename( $_sRootPageSlug ); // to be compatible with add_submenu_page()
182 182
             
183
-            switch( $aArgs['type'] ) {
183
+            switch ( $aArgs[ 'type' ] ) {
184 184
                 case 'page':
185 185
                     // it's possible that the page_slug key is not set if the user uses a method like setPageHeadingTabsVisibility() prior to addSubMenuItam().
186 186
                     return $this->_addPageSubmenuItem(
187 187
                         $_sRootPageSlug,
188 188
                         $_sMenuSlug,
189
-                        $aArgs['page_slug'],
190
-                        $this->oUtil->getElement( $aArgs, 'page_title', $aArgs['title'] ),
191
-                        $this->oUtil->getElement( $aArgs, 'menu_title', $aArgs['title'] ),
192
-                        $aArgs['capability'],
193
-                        $aArgs['show_in_menu']
189
+                        $aArgs[ 'page_slug' ],
190
+                        $this->oUtil->getElement( $aArgs, 'page_title', $aArgs[ 'title' ] ),
191
+                        $this->oUtil->getElement( $aArgs, 'menu_title', $aArgs[ 'title' ] ),
192
+                        $aArgs[ 'capability' ],
193
+                        $aArgs[ 'show_in_menu' ]
194 194
                     );
195 195
                 case 'link':
196 196
                     return $this->_addLinkSubmenuItem( 
197 197
                         $_sMenuSlug, 
198
-                        $aArgs['title'], 
199
-                        $aArgs['capability'],
200
-                        $aArgs['href'],
201
-                        $aArgs['show_in_menu']
198
+                        $aArgs[ 'title' ], 
199
+                        $aArgs[ 'capability' ],
200
+                        $aArgs[ 'href' ],
201
+                        $aArgs[ 'show_in_menu' ]
202 202
                     );
203 203
                 default:
204 204
                     return '';
@@ -214,43 +214,43 @@  discard block
 block discarded – undo
214 214
              */
215 215
             private function _addPageSubmenuItem( $sRootPageSlug, $sMenuSlug, $sPageSlug, $sPageTitle, $sMenuTitle, $sCapability, $bShowInMenu ) {
216 216
                 
217
-                if ( ! $sPageSlug ) {
217
+                if ( !$sPageSlug ) {
218 218
                     return '';
219 219
                 }
220 220
                 $_sPageHook = add_submenu_page( 
221
-                    $sRootPageSlug,         // the root(parent) page slug
222
-                    $sPageTitle,            // page title
223
-                    $sMenuTitle,            // menu title
224
-                    $sCapability,           // capability
225
-                    $sPageSlug,             // menu slug
221
+                    $sRootPageSlug, // the root(parent) page slug
222
+                    $sPageTitle, // page title
223
+                    $sMenuTitle, // menu title
224
+                    $sCapability, // capability
225
+                    $sPageSlug, // menu slug
226 226
                     // In admin.php ( line 149 of WordPress v3.6.1 ), do_action($page_hook) ( where $page_hook is $_sPageHook )
227 227
                     // will be executed and it triggers the __call() magic method with the method name of "md5 class hash + _page_ + this page slug".
228
-                    array( $this, $this->oProp->sClassHash . '_page_' . $sPageSlug )
228
+                    array( $this, $this->oProp->sClassHash.'_page_'.$sPageSlug )
229 229
                 );     
230 230
                 
231 231
                 // Ensure only it is added one time per page slug.
232
-                if ( ! isset( $this->oProp->aPageHooks[ $_sPageHook ] ) ) {
232
+                if ( !isset( $this->oProp->aPageHooks[ $_sPageHook ] ) ) {
233 233
                     // 3.4.1+ Give a lower priority as the page meta box class also hooks the current_screen to register form elements.
234 234
                     // When the validation callback is triggered, their form registration should be done already. So this hook should be loaded later than them.
235
-                    add_action( 'current_screen' , array( $this, "load_pre_" . $sPageSlug ), 20 );
235
+                    add_action( 'current_screen', array( $this, "load_pre_".$sPageSlug ), 20 );
236 236
                     
237 237
                     // 3.6.3+
238 238
                     // It is possible that an in-page tab is added during the above hooks and the current page is the default tab without the tab GET query key in the url. 
239 239
                     // Set a low priority because the user may add in-page tabs in their callback method of this action hook.
240
-                    add_action( "load_" . $sPageSlug, array( $this, '_replyToFinalizeInPageTabs' ), 9999 );
240
+                    add_action( "load_".$sPageSlug, array( $this, '_replyToFinalizeInPageTabs' ), 9999 );
241 241
                     
242 242
                     // 3.6.3+
243
-                    add_action( "load_after_" . $sPageSlug, array( $this, '_replyToEnqueuePageAssets' ) );
243
+                    add_action( "load_after_".$sPageSlug, array( $this, '_replyToEnqueuePageAssets' ) );
244 244
                     
245 245
                 }
246 246
                 $this->oProp->aPageHooks[ $sPageSlug ] = $this->oUtil->getAOrB(
247 247
                     is_network_admin(),
248
-                    $_sPageHook . '-network',
248
+                    $_sPageHook.'-network',
249 249
                     $_sPageHook
250 250
                 );
251 251
                 
252 252
                 // If the visibility option is false, remove the one just added from the sub-menu array
253
-                if ( ! $bShowInMenu ) {
253
+                if ( !$bShowInMenu ) {
254 254
                     $this->_removePageSubmenuItem( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug );
255 255
                 }                
256 256
                 return $_sPageHook;
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
                  * @since       3.1.1       Moved from `AdminPageFramework_Menu`.
264 264
                  * @return      void
265 265
                  */
266
-                private function _removePageSubmenuItem( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ){
266
+                private function _removePageSubmenuItem( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ) {
267 267
                     
268
-                    foreach( ( array ) $GLOBALS['submenu'][ $sMenuSlug ] as $_iIndex => $_aSubMenu ) {
268
+                    foreach ( ( array ) $GLOBALS[ 'submenu' ][ $sMenuSlug ] as $_iIndex => $_aSubMenu ) {
269 269
                       
270
-                        if ( ! isset( $_aSubMenu[ 3 ] ) ) { 
270
+                        if ( !isset( $_aSubMenu[ 3 ] ) ) { 
271 271
                             continue; 
272 272
                         }
273 273
                                                
@@ -318,15 +318,15 @@  discard block
 block discarded – undo
318 318
                         
319 319
                         // If it is in the network admin area, do not remove the menu; otherwise, it gets not accessible. 
320 320
                         if ( is_network_admin() ) {
321
-                            unset( $GLOBALS['submenu'][ $sMenuSlug ][ $_iIndex ] );
321
+                            unset( $GLOBALS[ 'submenu' ][ $sMenuSlug ][ $_iIndex ] );
322 322
                             return;
323 323
                         } 
324 324
                         
325 325
                         if ( 
326
-                            ! isset( $_GET['page'] ) 
327
-                            || isset( $_GET['page'] ) && $sPageSlug != $_GET['page'] 
326
+                            !isset( $_GET[ 'page' ] ) 
327
+                            || isset( $_GET[ 'page' ] ) && $sPageSlug != $_GET[ 'page' ] 
328 328
                         ) {
329
-                            unset( $GLOBALS['submenu'][ $sMenuSlug ][ $_iIndex ] );
329
+                            unset( $GLOBALS[ 'submenu' ][ $sMenuSlug ][ $_iIndex ] );
330 330
                         }                        
331 331
                         
332 332
                     }
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
              * @return      void
340 340
              */
341 341
             private function _addLinkSubmenuItem( $sMenuSlug, $sTitle, $sCapability, $sHref, $bShowInMenu ) {
342
-                if ( ! $bShowInMenu ) {
342
+                if ( !$bShowInMenu ) {
343 343
                     return;
344 344
                 }
345
-                if ( ! isset( $GLOBALS['submenu'][ $sMenuSlug ] ) ) {
346
-                    $GLOBALS['submenu'][ $sMenuSlug ] = array();
345
+                if ( !isset( $GLOBALS[ 'submenu' ][ $sMenuSlug ] ) ) {
346
+                    $GLOBALS[ 'submenu' ][ $sMenuSlug ] = array();
347 347
                 }
348
-                $GLOBALS['submenu'][ $sMenuSlug ][] = array ( 
348
+                $GLOBALS[ 'submenu' ][ $sMenuSlug ][ ] = array( 
349 349
                     $sTitle, 
350 350
                     $sCapability, 
351 351
                     $sHref,
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
          * @internal
361 361
          */
362 362
         public function _replyToFixPageTitleForHiddenPages( $sAdminTitle, $sPageTitle ) {
363
-            if ( isset( $_GET['page'], $this->oProp->aHiddenPages[ $_GET['page'] ] ) ) {
364
-                return $this->oProp->aHiddenPages[ $_GET['page'] ] . $sAdminTitle;
363
+            if ( isset( $_GET[ 'page' ], $this->oProp->aHiddenPages[ $_GET[ 'page' ] ] ) ) {
364
+                return $this->oProp->aHiddenPages[ $_GET[ 'page' ] ].$sAdminTitle;
365 365
             }    
366 366
             return $sAdminTitle;     
367 367
         }  
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
             foreach ( $this->oProp->aPages as $_aPage ) {
128 128
                 
129
-                if ( ! isset( $_aPage[ 'page_slug' ] ) ) { 
129
+                if ( ! isset( $_aPage[ 'page_slug' ] ) ) {
130 130
                     continue; 
131 131
                 }
132 132
                 $this->oProp->sDefaultPageSlug = $_aPage[ 'page_slug' ];
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
                  * @since       3.1.1       Moved from `AdminPageFramework_Menu`.
264 264
                  * @return      void
265 265
                  */
266
-                private function _removePageSubmenuItem( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ){
266
+                private function _removePageSubmenuItem( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ) {
267 267
                     
268 268
                     foreach( ( array ) $GLOBALS['submenu'][ $sMenuSlug ] as $_iIndex => $_aSubMenu ) {
269 269
                       
270
-                        if ( ! isset( $_aSubMenu[ 3 ] ) ) { 
270
+                        if ( ! isset( $_aSubMenu[ 3 ] ) ) {
271 271
                             continue; 
272 272
                         }
273 273
                                                
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                             $sPageTitle,
283 283
                             $sPageSlug,
284 284
                         );
285
-                        if ( $_aA !== $_aB ) { 
285
+                        if ( $_aA !== $_aB ) {
286 286
                             continue;
287 287
                         }
288 288
 
Please login to merge, or discard this patch.
development/factory/admin_page/form/AdminPageFramework_Form_admin_page.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -455,6 +455,7 @@
 block discarded – undo
455 455
      * @internal
456 456
      * @since       3.5.3
457 457
      * @since       DEVVER      Moved from `AdminPageFramework_FormDefinition_Page`.
458
+     * @param string $sTabSlug
458 459
      * @return      boolean
459 460
      */
460 461
     private function _isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) {
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
     public function getPageOnlyOptions( $aOptions, $sPageSlug ) {
53 53
 
54 54
         $_aStoredOptionsOfThePage = array();
55
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
55
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
56 56
             
57 57
             // Check the section
58
-            if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
58
+            if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
59 59
                 continue;
60 60
             }
61 61
 
62 62
             // At this point, the element belongs the given page slug as the section is of the given page slug's.
63 63
             $this->_setPageOnlyOptions( 
64
-                $_aStoredOptionsOfThePage,  // by reference - gets updated in the method.
64
+                $_aStoredOptionsOfThePage, // by reference - gets updated in the method.
65 65
                 $aOptions, 
66 66
                 $_aSubSectionsOrFields, 
67 67
                 $sPageSlug,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
          * @internal
82 82
          */
83 83
         private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) {
84
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
84
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
85 85
                 
86 86
                 // If it's a sub-section array,
87 87
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function getOtherPageOptions( $aOptions, $sPageSlug ) {
154 154
 
155 155
         $_aStoredOptionsNotOfThePage = array();
156
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
156
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
157 157
             
158 158
             // Check the section
159 159
             if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
          * @internal
183 183
          */
184 184
         private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) {
185
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
185
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
186 186
 
187 187
                 // It's a sub-section array. 
188 188
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) {
246 246
 
247 247
         $_aStoredOptionsNotOfTheTab = array();
248
-        foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
248
+        foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
249 249
                         
250 250
             // If the section is of the given page and the given tab, skip.
251 251
             if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) {
277 277
             
278 278
             // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped.
279
-            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField  ) {
279
+            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) {
280 280
                 
281 281
                 // If it's a sub section
282 282
                 if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @since       DEVVER      Moved from `AdminPageFramework_FormDefinition_Page`.
334 334
      * @return      array
335 335
      */
336
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
336
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) {     
337 337
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
338 338
         return $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );     
339 339
     }
@@ -348,17 +348,17 @@  discard block
 block discarded – undo
348 348
      * @since       DEVVER      Moved from `AdminPageFramework_FormDefinition_Page`.
349 349
      * @return      array
350 350
      */
351
-    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
351
+    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) {
352 352
         
353 353
         $_aStoredOptionsOfTheTab = array();
354
-        if ( ! $sTabSlug ) { 
354
+        if ( !$sTabSlug ) { 
355 355
             return $_aStoredOptionsOfTheTab; 
356 356
         }
357 357
         
358
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
358
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
359 359
              
360 360
             // Check the section
361
-            if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
361
+            if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
362 362
                 continue;
363 363
             }
364 364
             
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
          */
385 385
         private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) {
386 386
             
387
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
387
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
388 388
                                 
389 389
                 // if it's a sub-section array.
390 390
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     private function _isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) {
443 443
         
444
-        if ( ! isset( $this->aSectionsets[ $_sSectionID ][ 'page_slug' ] ) ) {
444
+        if ( !isset( $this->aSectionsets[ $_sSectionID ][ 'page_slug' ] ) ) {
445 445
             return false;
446 446
         }
447 447
         return ( 
@@ -459,10 +459,10 @@  discard block
 block discarded – undo
459 459
      */
460 460
     private function _isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) {
461 461
         
462
-        if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
462
+        if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
463 463
             return false;
464 464
         }
465
-        if ( ! isset( $this->aSectionsets[ $_sSectionID ][ 'tab_slug' ] ) ) {
465
+        if ( !isset( $this->aSectionsets[ $_sSectionID ][ 'tab_slug' ] ) ) {
466 466
             return false;
467 467
         }
468 468
         return (
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
      */
480 480
     private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) {
481 481
         $_aDimensionalPath = $this->getAsArray( $asDimensionalPath );
482
-        $_mValue     = $this->getElement(
482
+        $_mValue = $this->getElement(
483 483
             $aOptions,
484
-            $_aDimensionalPath,    // as of DEVVER, it can be an array or string
484
+            $_aDimensionalPath, // as of DEVVER, it can be an array or string
485 485
             null
486 486
         );
487 487
         if ( isset( $_mValue ) ) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 );
108 108
                 // @todo Examine whether this check can be removed 
109 109
                 // as the section that hods this field is already checked above outside this loop.
110
-                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) { 
110
+                if ( $sPageSlug !== $_aFieldset[ 'page_slug' ] ) {
111 111
                     continue; 
112 112
                 }        
113 113
                 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      * @since       DEVVER      Moved from `AdminPageFramework_FormDefinition_Page`.
334 334
      * @return      array
335 335
      */
336
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {     
336
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {
337 337
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
338 338
         return $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );     
339 339
     }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
352 352
         
353 353
         $_aStoredOptionsOfTheTab = array();
354
-        if ( ! $sTabSlug ) { 
354
+        if ( ! $sTabSlug ) {
355 355
             return $_aStoredOptionsOfTheTab; 
356 356
         }
357 357
         
Please login to merge, or discard this patch.
factory/meta_box/_controller/AdminPageFramework_HelpPane_MetaBox.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -43,6 +43,7 @@
 block discarded – undo
43 43
      * @since       2.1.0
44 44
      * @remark      This method just adds the given text into the class property. The actual registration will be performed with the <em>replyToRegisterHelpTabTextForMetaBox()</em> method.
45 45
      * @internal
46
+     * @param string $sHTMLContent
46 47
      */ 
47 48
     public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) {
48 49
         
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
      * @remark      This method just adds the given text into the class property. The actual registration will be performed with the <em>replyToRegisterHelpTabTextForMetaBox()</em> method.
45 45
      * @internal
46 46
      */ 
47
-    public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) {
47
+    public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) {
48 48
         
49
-        $this->oProp->aHelpTabText[]        = "<div class='contextual-help-description'>" . $sHTMLContent . "</div>";
50
-        $this->oProp->aHelpTabTextSide[]    = "<div class='contextual-help-description'>" . $sHTMLSidebarContent . "</div>";
49
+        $this->oProp->aHelpTabText[ ]        = "<div class='contextual-help-description'>".$sHTMLContent."</div>";
50
+        $this->oProp->aHelpTabTextSide[ ]    = "<div class='contextual-help-description'>".$sHTMLSidebarContent."</div>";
51 51
         
52 52
     }
53 53
     
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
      * @remark      This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method.
63 63
      * @internal
64 64
      */     
65
-    public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar="" ) {
65
+    public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar = "" ) {
66 66
         $this->_addHelpText(
67
-            "<span class='contextual-help-tab-title'>" . $sFieldTitle . "</span> - " . PHP_EOL
67
+            "<span class='contextual-help-tab-title'>".$sFieldTitle."</span> - ".PHP_EOL
68 68
                 . $sHelpText,     
69 69
             $sHelpTextSidebar
70 70
         );     
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function _replyToRegisterHelpTabTextForMetaBox() {
82 82
 
83 83
         // Check if the currently loaded page is of meta box page.
84
-        if ( ! $this->_isInThePage() ) { return false; }
84
+        if ( !$this->_isInThePage() ) { return false; }
85 85
 
86 86
         $this->_setHelpTab(     // defined in the base class.
87 87
             $this->oProp->sMetaBoxID, 
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected function _isInThePage() {
102 102
         
103
-        if ( ! $this->oProp->bIsAdmin ) { return false; }
104
-        if ( ! in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
103
+        if ( !$this->oProp->bIsAdmin ) { return false; }
104
+        if ( !in_array( $this->oProp->sPageNow, array( 'post.php', 'post-new.php' ) ) ) {
105 105
             return false;
106 106
         }
107
-        if ( ! in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
107
+        if ( !in_array( $this->oUtil->getCurrentPostType(), $this->oProp->aPostTypes ) ) {
108 108
             return false;     
109 109
         }    
110 110
         return true;
Please login to merge, or discard this patch.
factory/page_meta_box/_model/AdminPageFramework_Property_MetaBox_Page.php 4 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -53,6 +53,10 @@
 block discarded – undo
53 53
      */
54 54
     public $_sFormRegistrationHook = 'admin_enqueue_scripts';
55 55
     
56
+    /**
57
+     * @param AdminPageFramework_PageMetaBox_Model $oCaller
58
+     * @param string $sClassName
59
+     */
56 60
     function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {     
57 61
         
58 62
         // this must be done after the menu class finishes building the menu with the _replyToBuildMenu() method.
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
      * @since       3.5.3
171 171
      * @return      string      The found page slug. An empty string if not found.
172 172
      * @remark      Do not return `null` when not found as some framework methods check the retuened value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an emtpy string (''). 
173
-    */     
173
+     */     
174 174
     public function getCurrentPageSlug() {
175 175
         return isset( $_GET[ 'page' ] ) 
176 176
             ? $_GET[ 'page' ] 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public $_sFormRegistrationHook = 'admin_enqueue_scripts';
55 55
     
56
-    function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {     
56
+    function __construct( $oCaller, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType = 'page_meta_box' ) {     
57 57
         
58 58
         // this must be done after the menu class finishes building the menu with the _replyToBuildMenu() method.
59 59
         add_action( 'admin_menu', array( $this, '_replyToSetUpProperties' ), 100 ); 
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function _replyToSetUpProperties() {
93 93
         
94
-        if ( ! isset( $_GET[ 'page' ] ) ) { 
94
+        if ( !isset( $_GET[ 'page' ] ) ) { 
95 95
             return; 
96 96
         }
97 97
                 
98 98
         $this->oAdminPage = $this->_getOwnerObjectOfPage( $_GET[ 'page' ] );
99
-        if ( ! $this->oAdminPage ) { 
99
+        if ( !$this->oAdminPage ) { 
100 100
             return; 
101 101
         }
102 102
         
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function _getScreenIDOfPage( $sPageSlug ) {
129 129
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
130
-            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ] . ( is_network_admin() ? '-network' : '' )
130
+            ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ].( is_network_admin() ? '-network' : '' )
131 131
             : '';
132 132
     }    
133 133
     
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      * @since       3.0.0
138 138
      * @return      boolean     Returns true if it is of framework's added page; otherwise, false.
139 139
      */
140
-    public function isPageAdded( $sPageSlug='' ) {    
140
+    public function isPageAdded( $sPageSlug = '' ) {    
141 141
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
142 142
             ? $_oAdminPage->oProp->isPageAdded( $sPageSlug )
143 143
             : false;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function isCurrentTab( $sTabSlug ) {
154 154
         
155 155
         $_sCurrentPageSlug = $this->getElement( $_GET, 'page' );
156
-        if ( ! $_sCurrentPageSlug ) { 
156
+        if ( !$_sCurrentPageSlug ) { 
157 157
             return false; 
158 158
         }
159 159
         $_sCurrentTabSlug = $this->getElement( 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */         
204 204
     public function getDefaultInPageTab( $sPageSlug ) {
205 205
     
206
-        if ( ! $sPageSlug ) { 
206
+        if ( !$sPageSlug ) { 
207 207
             return ''; 
208 208
         }
209 209
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function getOptionKey( $sPageSlug ) {
220 220
         
221
-        if ( ! $sPageSlug ) { 
221
+        if ( !$sPageSlug ) { 
222 222
             return ''; 
223 223
         }
224 224
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             $GLOBALS,
245 245
             array( 'aAdminPageFramework', 'aPageClasses' )
246 246
         );                 
247
-        foreach( $_aPageClasses as $_oAdminPage ) {
247
+        foreach ( $_aPageClasses as $_oAdminPage ) {
248 248
             if ( $_oAdminPage->oProp->isPageAdded( $sPageSlug ) ) {
249 249
                 return $_oAdminPage;
250 250
             }
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public $_sFormRegistrationHook = 'admin_enqueue_scripts';
55 55
     
56
-    function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {     
56
+    function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) {
57 57
         
58 58
         // this must be done after the menu class finishes building the menu with the _replyToBuildMenu() method.
59 59
         add_action( 'admin_menu', array( $this, '_replyToSetUpProperties' ), 100 ); 
60
-        if ( is_network_admin() ) { 
60
+        if ( is_network_admin() ) {
61 61
             add_action( 'network_admin_menu', array( $this, '_replyToSetUpProperties' ), 100 ); 
62 62
         }     
63 63
         
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function _replyToSetUpProperties() {
93 93
         
94
-        if ( ! isset( $_GET[ 'page' ] ) ) { 
94
+        if ( ! isset( $_GET[ 'page' ] ) ) {
95 95
             return; 
96 96
         }
97 97
                 
98 98
         $this->oAdminPage = $this->_getOwnerObjectOfPage( $_GET[ 'page' ] );
99
-        if ( ! $this->oAdminPage ) { 
99
+        if ( ! $this->oAdminPage ) {
100 100
             return; 
101 101
         }
102 102
         
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      * @since       3.0.0
138 138
      * @return      boolean     Returns true if it is of framework's added page; otherwise, false.
139 139
      */
140
-    public function isPageAdded( $sPageSlug='' ) {    
140
+    public function isPageAdded( $sPageSlug='' ) {
141 141
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
142 142
             ? $_oAdminPage->oProp->isPageAdded( $sPageSlug )
143 143
             : false;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public function isCurrentTab( $sTabSlug ) {
154 154
         
155 155
         $_sCurrentPageSlug = $this->getElement( $_GET, 'page' );
156
-        if ( ! $_sCurrentPageSlug ) { 
156
+        if ( ! $_sCurrentPageSlug ) {
157 157
             return false; 
158 158
         }
159 159
         $_sCurrentTabSlug = $this->getElement( 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */         
204 204
     public function getDefaultInPageTab( $sPageSlug ) {
205 205
     
206
-        if ( ! $sPageSlug ) { 
206
+        if ( ! $sPageSlug ) {
207 207
             return ''; 
208 208
         }
209 209
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      */
219 219
     public function getOptionKey( $sPageSlug ) {
220 220
         
221
-        if ( ! $sPageSlug ) { 
221
+        if ( ! $sPageSlug ) {
222 222
             return ''; 
223 223
         }
224 224
         return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) )
Please login to merge, or discard this patch.