Completed
Pull Request — dev (#237)
by
unknown
10:59
created
admin_page/_view/AdminPageFramework_View__PageRenderer__PageHeadingTabs.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -60,6 +60,7 @@  discard block
 block discarded – undo
60 60
          * @since       3.3.1       Moved from `AdminPageFramework_Page`.
61 61
          * @since       3.5.3       Deprecated the `$aOutput` parameter.
62 62
          * @since       3.6.3       Moved from `AdminPageFramework_Page_View`. Changed the name from `_getPageHeadingTabs()`.
63
+         * @param string $sTag
63 64
          * @return      string      the output of page heading tabs.
64 65
          */
65 66
         private function _getOutput( $aPage, $sTag ) {
@@ -100,6 +101,7 @@  discard block
 block discarded – undo
100 101
              * @internal
101 102
              * @since       3.5.3
102 103
              * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
104
+             * @param string $sTag
103 105
              * @return      string      the HTML page heading tab navigation bar output.
104 106
              */
105 107
             private function _getPageHeadingtabNavigationBar( array $aPages, $sTag, $sCurrentPageSlug ) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $_aPage = $this->oFactory->oProp->aPages[ $this->sPageSlug ];
47 47
         
48 48
         // If the page title is disabled, return an empty string.
49
-        if ( ! $_aPage[ 'show_page_title' ] ) {
49
+        if ( !$_aPage[ 'show_page_title' ] ) {
50 50
             return "";
51 51
         }
52 52
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
          */
66 66
         private function _getOutput( $aPage, $sTag ) {
67 67
    
68
-            $sTag  = $this->_getPageHeadingTabTag( $sTag, $aPage );
68
+            $sTag = $this->_getPageHeadingTabTag( $sTag, $aPage );
69 69
             
70 70
             // If the page heading tab visibility is disabled, or only one page is registered, return the title.
71
-            if ( ! $aPage[ 'show_page_heading_tabs' ] || count( $this->oFactory->oProp->aPages ) == 1 ) {
71
+            if ( !$aPage[ 'show_page_heading_tabs' ] || count( $this->oFactory->oProp->aPages ) == 1 ) {
72 72
                 return "<{$sTag}>"
73 73
                         . $aPage[ 'title' ]
74 74
                     . "</{$sTag}>";
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
             private function _getPageHeadingtabNavigationBar( array $aPages, $sTag, $sCurrentPageSlug ) {
107 107
                 
108 108
                 $_oTabBar = new AdminPageFramework_TabNavigationBar(
109
-                    $aPages,     // tab items
109
+                    $aPages, // tab items
110 110
                     $sCurrentPageSlug, // active tab slug
111
-                    $sTag,       // container tag
111
+                    $sTag, // container tag
112 112
                     array(       // container attributes
113 113
                         // 'class' => '...',
114 114
                     ),
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
                  * @since           3.5.10
133 133
                  * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
134 134
                  */
135
-                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments=array() ) {
136
-                    switch( $aSubPage['type'] ) {
135
+                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments = array() ) {
136
+                    switch ( $aSubPage[ 'type' ] ) {
137 137
                         case 'link':
138 138
                             return $this->_getFormattedPageHeadingtabNavigationBarLinkItem( $aSubPage, $aStructure );
139 139
                         default:
@@ -151,10 +151,10 @@  discard block
 block discarded – undo
151 151
                      */
152 152
                     private function _getFormattedPageHeadingtabNavigationBarPageItem( array $aSubPage, $aStructure ) {
153 153
                         
154
-                        if ( ! isset( $aSubPage[ 'page_slug' ] ) ) {
154
+                        if ( !isset( $aSubPage[ 'page_slug' ] ) ) {
155 155
                             return array();
156 156
                         }
157
-                        if ( ! $aSubPage[ 'show_page_heading_tab' ] ) {
157
+                        if ( !$aSubPage[ 'show_page_heading_tab' ] ) {
158 158
                             return array();
159 159
                         }
160 160
 
@@ -186,10 +186,10 @@  discard block
 block discarded – undo
186 186
                      */
187 187
                     private function _getFormattedPageHeadingtabNavigationBarLinkItem( array $aSubPage, $aStructure ) {
188 188
                         
189
-                        if ( ! isset( $aSubPage[ 'href' ] ) ) {
189
+                        if ( !isset( $aSubPage[ 'href' ] ) ) {
190 190
                             return array();
191 191
                         }
192
-                        if ( ! $aSubPage[ 'show_page_heading_tab' ] ) {
192
+                        if ( !$aSubPage[ 'show_page_heading_tab' ] ) {
193 193
                             return array();
194 194
                         }
195 195
                         $aSubPage = array(
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                             + array( 'class' => null )
202 202
                             + $aStructure;
203 203
                             
204
-                        $aSubPage[ 'class' ] = trim( $aSubPage[ 'class' ] . ' link' );
204
+                        $aSubPage[ 'class' ] = trim( $aSubPage[ 'class' ].' link' );
205 205
 
206 206
                         return $aSubPage;
207 207
                     }
Please login to merge, or discard this patch.
admin_page/_view/AdminPageFramework_View__PageRenderer__ScreenIcon.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     }
49 49
         /**
50 50
          * @since       3.6.3
51
-         * @return      boolean
51
+         * @return      boolean|null
52 52
          */
53 53
         private function _isScreenIconVisible() {
54 54
             
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function get() {
43 43
         
44
-        if ( ! $this->_isScreenIconVisible() ) {
44
+        if ( !$this->_isScreenIconVisible() ) {
45 45
             return '';
46 46
         }
47 47
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
          */
55 55
         private function _isScreenIconVisible() {
56 56
             
57
-            $_bShowPageTitle        = $this->getElement(
57
+            $_bShowPageTitle = $this->getElement(
58 58
                 $this->oFactory->oProp->aPages,
59 59
                 array( $this->sPageSlug, 'show_page_title' )
60 60
             );
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 array( $sPageSlug, 'href_icon_32x32' ),
133 133
                 ''
134 134
             );
135
-            if ( ! $_sScreenIconPath ) {
135
+            if ( !$_sScreenIconPath ) {
136 136
                 return;
137 137
             }
138 138
             $_sScreenIconPath = $this->getResolvedSRC(
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $_aAttributes = array(
143 143
                 'style'    => $this->generateInlineCSS(
144 144
                     array(
145
-                        'background-image' => "url('" . esc_url( $_sScreenIconPath ) . "')",
145
+                        'background-image' => "url('".esc_url( $_sScreenIconPath )."')",
146 146
                     )
147 147
                 ),
148 148
             );
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
                 array( $sPageSlug, 'screen_icon_id' ),
167 167
                 ''
168 168
             );
169
-            if ( ! $_sScreenIconID ) {
169
+            if ( !$_sScreenIconID ) {
170 170
                 return;
171 171
             }
172 172
             
173 173
             $_aAttributes = array(
174
-                'id'       => "icon-" . $_sScreenIconID,
174
+                'id'       => "icon-".$_sScreenIconID,
175 175
             );
176 176
             
177 177
             // Go to the catch clause.
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
                 'class'    => $this->getClassAttribute(
195 195
                     $this->getAOrB(
196 196
                         empty( $_sIconIDAttribute ) && $_oScreen->post_type,
197
-                        sanitize_html_class( 'icon32-posts-' . $_oScreen->post_type ),
197
+                        sanitize_html_class( 'icon32-posts-'.$_oScreen->post_type ),
198 198
                         ''
199 199
                     ),
200 200
                     $this->getAOrB(
201 201
                         empty( $_sIconIDAttribute ) || $_sIconIDAttribute == $this->oFactory->oProp->sClassName,
202
-                        'generic',  // the default value
202
+                        'generic', // the default value
203 203
                         ''
204 204
                     )
205 205
                 ),
206
-                'id'       => "icon-" . $_sIconIDAttribute,
206
+                'id'       => "icon-".$_sIconIDAttribute,
207 207
             );
208 208
 
209 209
             return $this->_getScreenIconByAttributes( $_aAttributes );
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
              */
219 219
             private function _getScreenIDAttribute( $oScreen ) {
220 220
                 
221
-                if ( ! empty( $oScreen->parent_base ) ) {
221
+                if ( !empty( $oScreen->parent_base ) ) {
222 222
                     return $oScreen->parent_base;
223 223
                 }
224 224
                 if ( 'page' === $oScreen->post_type ) {
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
             private function _getScreenIconByAttributes( array $aAttributes ) {
241 241
                 
242 242
                 $aAttributes[ 'class' ] = $this->getClassAttribute(
243
-                    'icon32',   // required for a screen icon container element.
243
+                    'icon32', // required for a screen icon container element.
244 244
                     $this->getElement( $aAttributes, 'class' )
245 245
                 );
246 246
 
247
-                return "<div " . $this->getAttributes( $aAttributes ) . ">"
247
+                return "<div ".$this->getAttributes( $aAttributes ).">"
248 248
                         . "<br />"
249 249
                     . "</div>";
250 250
                 
Please login to merge, or discard this patch.
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.
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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      * @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`
69 69
      * @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.
70 70
      */
71
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
71
+    public function __construct( $isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
72 72
 
73
-        if ( ! $this->_isInstantiatable() ) {
73
+        if ( !$this->_isInstantiatable() ) {
74 74
             return;
75 75
         }
76 76
                         
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
             $isOptionKey,
79 79
             $sCallerPath
80 80
                 ? trim( $sCallerPath )
81
-                : $sCallerPath = ( is_admin() && ( isset( $GLOBALS['pagenow'] ) && in_array( $GLOBALS['pagenow'], array( 'plugins.php', ) ) || isset( $_GET['page'] ) )
81
+                : $sCallerPath = ( is_admin() && ( isset( $GLOBALS[ 'pagenow' ] ) && in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php',) ) || isset( $_GET[ 'page' ] ) )
82 82
                     ? AdminPageFramework_Utility::getCallerScriptPath( __FILE__ )
83 83
                     : null
84
-                ),     // this is important to attempt to find the caller script path here when separating the library into multiple files.    
84
+                ), // this is important to attempt to find the caller script path here when separating the library into multiple files.    
85 85
             $sCapability,
86 86
             $sTextDomain
87 87
         );
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Form.php 3 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
@@ -171,24 +171,24 @@  discard block
 block discarded – undo
171 171
         }
172 172
     
173 173
     /**
174
-    * Removes the given section(s) by section ID.
175
-    * 
176
-    * This accesses the property storing the added section arrays and removes the specified ones.
177
-    * 
178
-    * <h4>Example</h4>
179
-    * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
180
-    * </code>
181
-    * 
182
-    * @since        2.0.0
183
-    * @since        3.0.0       Changed the scope to public from protected.
184
-    * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
185
-    * @access       public
186
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
187
-    * @param        string      $sSectionID1        the section ID to remove.
188
-    * @param        string      $sSectionID2        (optional) another section ID to remove.
189
-    * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
190
-    * @return       void
191
-    */
174
+     * Removes the given section(s) by section ID.
175
+     * 
176
+     * This accesses the property storing the added section arrays and removes the specified ones.
177
+     * 
178
+     * <h4>Example</h4>
179
+     * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
180
+     * </code>
181
+     * 
182
+     * @since        2.0.0
183
+     * @since        3.0.0       Changed the scope to public from protected.
184
+     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
185
+     * @access       public
186
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
187
+     * @param        string      $sSectionID1        the section ID to remove.
188
+     * @param        string      $sSectionID2        (optional) another section ID to remove.
189
+     * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
190
+     * @return       void
191
+     */
192 192
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {
193 193
         foreach( func_get_args() as $_sSectionID ) {
194 194
             $this->oForm->removeSection( $_sSectionID );
@@ -253,38 +253,38 @@  discard block
 block discarded – undo
253 253
         }
254 254
     }
255 255
     /**
256
-    * Adds the given field array items into the field array property.
257
-    * 
258
-    * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
259
-    * 
260
-    * @since        2.1.2
261
-    * @since        3.0.0           Changed the scope to public from protected.
262
-    * @access       public
263
-    * @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.
264
-    * @return       void
265
-    */
256
+     * Adds the given field array items into the field array property.
257
+     * 
258
+     * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
259
+     * 
260
+     * @since        2.1.2
261
+     * @since        3.0.0           Changed the scope to public from protected.
262
+     * @access       public
263
+     * @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.
264
+     * @return       void
265
+     */
266 266
     public function addSettingField( $asField ) {
267 267
         $this->oForm->addField( $asField );
268 268
     }
269 269
     
270 270
     /**
271
-    * Removes the given field(s) by field ID.
272
-    * 
273
-    * This accesses the property storing the added field arrays and removes the specified ones.
274
-    * 
275
-    * <h4>Example</h4>
276
-    * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
277
-    * </code>
278
-    * 
279
-    * @since        2.0.0
280
-    * @since        3.0.0       Changed the scope to public from protected.
281
-    * @access       public
282
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
283
-    * @param        string      $sFieldID1      the field ID to remove.
284
-    * @param        string      $sFieldID2      (optional) another field ID to remove.
285
-    * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
286
-    * @return void
287
-    */
271
+     * Removes the given field(s) by field ID.
272
+     * 
273
+     * This accesses the property storing the added field arrays and removes the specified ones.
274
+     * 
275
+     * <h4>Example</h4>
276
+     * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
277
+     * </code>
278
+     * 
279
+     * @since        2.0.0
280
+     * @since        3.0.0       Changed the scope to public from protected.
281
+     * @access       public
282
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
283
+     * @param        string      $sFieldID1      the field ID to remove.
284
+     * @param        string      $sFieldID2      (optional) another field ID to remove.
285
+     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
286
+     * @return void
287
+     */
288 288
     public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
289 289
         foreach( func_get_args() as $_sFieldID ) {
290 290
             $this->oForm->removeField( $_sFieldID );
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 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;
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
             )
119 119
         );
120 120
         
121
-        $aSection[ 'section_tab_slug' ]   = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
121
+        $aSection[ 'section_tab_slug' ] = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
122 122
         
123 123
         // A page slug is required.
124
-        if ( ! $aSection[ 'page_slug' ] ) {
124
+        if ( !$aSection[ 'page_slug' ] ) {
125 125
             return;
126 126
         }
127 127
         $this->oForm->addSection( $aSection );
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
         private function _getTargetPageSlug( $aSection ) {
138 138
             
139 139
             $_sTargetPageSlug = $this->oUtil->getElement(
140
-                $aSection,      // subject
141
-                'page_slug',    // key
140
+                $aSection, // subject
141
+                'page_slug', // key
142 142
                 $this->_sTargetPageSlug     // default
143 143
             );
144 144
          
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
          */
160 160
         private function _getTargetTabSlug( $aSection ) {
161 161
             $_sTargetTabSlug = $this->oUtil->getElement(
162
-                $aSection,              // subject
163
-                'tab_slug',             // key
162
+                $aSection, // subject
163
+                'tab_slug', // key
164 164
                 $this->_sTargetTabSlug  // default
165 165
             );
166 166
             $_sTargetTabSlug = $_sTargetTabSlug
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     * @return       void
191 191
     */
192 192
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {
193
-        foreach( func_get_args() as $_sSectionID ) {
193
+        foreach ( func_get_args() as $_sSectionID ) {
194 194
             $this->oForm->removeSection( $_sSectionID );
195 195
         }
196 196
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
249 249
      */
250 250
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
251
-        foreach( func_get_args() as $aField ) {
251
+        foreach ( func_get_args() as $aField ) {
252 252
             $this->addSettingField( $aField );
253 253
         }
254 254
     }
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
286 286
     * @return void
287 287
     */
288
-    public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
289
-        foreach( func_get_args() as $_sFieldID ) {
288
+    public function removeSettingFields( $sFieldID1, $sFieldID2 = null, $_and_more ) {
289
+        foreach ( func_get_args() as $_sFieldID ) {
290 290
             $this->oForm->removeField( $_sFieldID );
291 291
         }
292 292
     }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             $this->oProp->sOptionKey,
335 335
             empty( $_aParams )
336 336
                 ? null                  // will return the entire options array
337
-                : $_aDimensionalKeys,   // dimensional keys
337
+                : $_aDimensionalKeys, // dimensional keys
338 338
             $_mDefault, // default
339 339
             $this->getSavedOptions() + $this->oForm->getDefaultFormValues()
340 340
         );
@@ -353,18 +353,18 @@  discard block
 block discarded – undo
353 353
      * If the user has not submitted the form, the framework will try to return the default value set in the field definition array.
354 354
      * @deprecated  3.3.0
355 355
      */
356
-    public function getFieldValue( $sFieldID, $sSectionID='' ) {
356
+    public function getFieldValue( $sFieldID, $sSectionID = '' ) {
357 357
                                
358
-        trigger_error( 'Admin Page Framework: ' . ' : ' . sprintf( __( 'The method is deprecated: %1$s. Use %2$s instead.', $this->oProp->sTextDomain ), __METHOD__, 'getValue()' ), E_USER_NOTICE );
358
+        trigger_error( 'Admin Page Framework: '.' : '.sprintf( __( 'The method is deprecated: %1$s. Use %2$s instead.', $this->oProp->sTextDomain ), __METHOD__, 'getValue()' ), E_USER_NOTICE );
359 359
     
360 360
         $_aOptions = $this->oUtil->uniteArrays( $this->oProp->aOptions, $this->oForm->getDefaultFormValues() );
361 361
         /* If it's saved, return it */
362
-        if ( ! $sSectionID ) {
362
+        if ( !$sSectionID ) {
363 363
             if ( array_key_exists( $sFieldID, $_aOptions ) ) {
364 364
                 return $_aOptions[ $sFieldID ];
365 365
             }
366 366
             // loop through section elements
367
-            foreach( $_aOptions as $aOptions ) {
367
+            foreach ( $_aOptions as $aOptions ) {
368 368
                 if ( array_key_exists( $sFieldID, $aOptions ) ) {
369 369
                     return $aOptions[ $sFieldID ];
370 370
                 }
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Menu.php 3 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
@@ -131,39 +131,39 @@  discard block
 block discarded – undo
131 131
     }
132 132
     
133 133
     /**
134
-    * Adds sub-menu items on the left sidebar menu of the administration panel. 
135
-    * 
136
-    * It supports pages and links. Each of them has the specific array structure.
137
-    * 
138
-    * <h4>Example</h4>
139
-    * <code>$this->addSubMenuItems(
140
-    *       array(
141
-    *           'title'         => 'Various Form Fields',
142
-    *           'page_slug'     => 'first_page',
143
-    *           'screen_icon'   => 'options-general',
144
-    *       ),
145
-    *       array(
146
-    *           'title'         => 'Manage Options',
147
-    *           'page_slug'     => 'second_page',
148
-    *           'screen_icon'   => 'link-manager',
149
-    *       ),
150
-    *       array(
151
-    *           'title'         => 'Google',
152
-    *           'href'          => 'http://www.google.com',    
153
-    *           'show_page_heading_tab' => false, // this removes the title from the page heading tabs.
154
-    *       )
155
-    * );</code>
156
-    * 
157
-    * @since        2.0.0
158
-    * @since        3.0.0       Changed the scope to public.
159
-    * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
160
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
161
-    * @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.
162
-    * @param        array       $aSubMenuItem2      (optional) a second sub-menu array.
163
-    * @param        array       $_and_more          (optional) a third and add items as many as necessary with next parameters.
164
-    * @access       public
165
-    * @return       void
166
-    */
134
+     * Adds sub-menu items on the left sidebar menu of the administration panel. 
135
+     * 
136
+     * It supports pages and links. Each of them has the specific array structure.
137
+     * 
138
+     * <h4>Example</h4>
139
+     * <code>$this->addSubMenuItems(
140
+     *       array(
141
+     *           'title'         => 'Various Form Fields',
142
+     *           'page_slug'     => 'first_page',
143
+     *           'screen_icon'   => 'options-general',
144
+     *       ),
145
+     *       array(
146
+     *           'title'         => 'Manage Options',
147
+     *           'page_slug'     => 'second_page',
148
+     *           'screen_icon'   => 'link-manager',
149
+     *       ),
150
+     *       array(
151
+     *           'title'         => 'Google',
152
+     *           'href'          => 'http://www.google.com',    
153
+     *           'show_page_heading_tab' => false, // this removes the title from the page heading tabs.
154
+     *       )
155
+     * );</code>
156
+     * 
157
+     * @since        2.0.0
158
+     * @since        3.0.0       Changed the scope to public.
159
+     * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
160
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
161
+     * @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.
162
+     * @param        array       $aSubMenuItem2      (optional) a second sub-menu array.
163
+     * @param        array       $_and_more          (optional) a third and add items as many as necessary with next parameters.
164
+     * @access       public
165
+     * @return       void
166
+     */
167 167
     public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2=null, $_and_more=null ) {
168 168
         foreach ( func_get_args() as $_aSubMenuItem ) {
169 169
             $this->addSubMenuItem( $_aSubMenuItem );
@@ -171,50 +171,50 @@  discard block
 block discarded – undo
171 171
     }
172 172
     
173 173
     /**
174
-    * Adds the given sub-menu item on the left sidebar menu of the administration panel.
175
-    * 
176
-    * It supports pages and links. Each of them has the specific array structure.
177
-    * 
178
-    * <h4>Example</h4>
179
-    * <code>$this->addSubMenuItem(
180
-    *       array(
181
-    *           'title'         => 'Read Me',
182
-    *           'menu_title'    => 'About'
183
-    *           'page_slug'     => 'my_plugin_readme',
184
-    *       )
185
-    * );</code>
186
-    * 
187
-    * @since        2.0.0
188
-    * @since        3.0.0       Changed the scope to public.
189
-    * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
190
-    * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
191
-    * <h4>Sub-menu Page Array</h4>
192
-    * <ul>
193
-    *   <li>**title** - (string) the page title of the page.</li>
194
-    *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
195
-    *   <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.
196
-    *       <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>
197
-    *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
198
-    *   </li>
199
-    *   <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>
200
-    *   <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>
201
-    *   <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>
202
-    *   <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>
203
-    *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
204
-    *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
205
-    * </ul>
206
-    * <h4>Sub-menu Link Array</h4>
207
-    * <ul>
208
-    *   <li>**title** - (string) the link title.</li>
209
-    *   <li>**href** - (string) the URL of the target link.</li>
210
-    *   <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>
211
-    *   <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>
212
-    *   <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>
213
-    *   <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>
214
-    * </ul>
215
-    * @access       public
216
-    * @return       void
217
-    */
174
+     * Adds the given sub-menu item on the left sidebar menu of the administration panel.
175
+     * 
176
+     * It supports pages and links. Each of them has the specific array structure.
177
+     * 
178
+     * <h4>Example</h4>
179
+     * <code>$this->addSubMenuItem(
180
+     *       array(
181
+     *           'title'         => 'Read Me',
182
+     *           'menu_title'    => 'About'
183
+     *           'page_slug'     => 'my_plugin_readme',
184
+     *       )
185
+     * );</code>
186
+     * 
187
+     * @since        2.0.0
188
+     * @since        3.0.0       Changed the scope to public.
189
+     * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
190
+     * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
191
+     * <h4>Sub-menu Page Array</h4>
192
+     * <ul>
193
+     *   <li>**title** - (string) the page title of the page.</li>
194
+     *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
195
+     *   <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.
196
+     *       <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>
197
+     *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
198
+     *   </li>
199
+     *   <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>
200
+     *   <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>
201
+     *   <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>
202
+     *   <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>
203
+     *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
204
+     *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
205
+     * </ul>
206
+     * <h4>Sub-menu Link Array</h4>
207
+     * <ul>
208
+     *   <li>**title** - (string) the link title.</li>
209
+     *   <li>**href** - (string) the URL of the target link.</li>
210
+     *   <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>
211
+     *   <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>
212
+     *   <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>
213
+     *   <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>
214
+     * </ul>
215
+     * @access       public
216
+     * @return       void
217
+     */
218 218
     public function addSubMenuItem( array $aSubMenuItem ) {
219 219
         if ( isset( $aSubMenuItem[ 'href' ] ) ) {
220 220
             $this->addSubMenuLink( $aSubMenuItem );
@@ -224,20 +224,20 @@  discard block
 block discarded – undo
224 224
     }
225 225
 
226 226
     /**
227
-    * Adds the given link into the menu on the left sidebar of the administration panel.
228
-    * 
229
-    * @since        2.0.0
230
-    * @since        3.0.0       Changed the scope to public from protected.
231
-    * @since        3.5.0       Changed the scope to public as it was still protected.
232
-    * @param        string      the menu title.
233
-    * @param        string      the URL linked to the menu.
234
-    * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
235
-    * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
236
-    * @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.
237
-    * @access       public
238
-    * @return       void
239
-    * @internal
240
-    */
227
+     * Adds the given link into the menu on the left sidebar of the administration panel.
228
+     * 
229
+     * @since        2.0.0
230
+     * @since        3.0.0       Changed the scope to public from protected.
231
+     * @since        3.5.0       Changed the scope to public as it was still protected.
232
+     * @param        string      the menu title.
233
+     * @param        string      the URL linked to the menu.
234
+     * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
235
+     * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
236
+     * @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.
237
+     * @access       public
238
+     * @return       void
239
+     * @internal
240
+     */
241 241
     public function addSubMenuLink( array $aSubMenuLink ) {
242 242
         
243 243
         // 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
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @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.
77 77
      * @return      void
78 78
      */
79
-    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) {
79
+    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16 = null, $iMenuPosition = null ) {
80 80
 
81 81
         $sRootMenuLabel = trim( $sRootMenuLabel );
82 82
         $_sSlug         = $this->_isBuiltInMenuItem( $sRootMenuLabel ); // if true, this method returns the slug
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function setRootMenuPageBySlug( $sRootMenuSlug ) {
127 127
         
128
-        $this->oProp->aRootMenu['sPageSlug']    = $sRootMenuSlug; // do not sanitize the slug here because post types includes a question mark.
129
-        $this->oProp->aRootMenu['fCreateRoot']  = false; // indicates to use an existing menu item. 
128
+        $this->oProp->aRootMenu[ 'sPageSlug' ]    = $sRootMenuSlug; // do not sanitize the slug here because post types includes a question mark.
129
+        $this->oProp->aRootMenu[ 'fCreateRoot' ]  = false; // indicates to use an existing menu item. 
130 130
 
131 131
     }
132 132
     
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     * @access       public
165 165
     * @return       void
166 166
     */
167
-    public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2=null, $_and_more=null ) {
167
+    public function addSubMenuItems( $aSubMenuItem1, $aSubMenuItem2 = null, $_and_more = null ) {
168 168
         foreach ( func_get_args() as $_aSubMenuItem ) {
169 169
             $this->addSubMenuItem( $_aSubMenuItem );
170 170
         }
@@ -241,16 +241,16 @@  discard block
 block discarded – undo
241 241
     public function addSubMenuLink( array $aSubMenuLink ) {
242 242
         
243 243
         // If required keys are not set, return.
244
-        if ( ! isset( $aSubMenuLink['href'], $aSubMenuLink['title'] ) ) {
244
+        if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) {
245 245
             return;
246 246
         }
247 247
         
248 248
         // If the set URL is not valid, return.
249
-        if ( ! filter_var( $aSubMenuLink['href'], FILTER_VALIDATE_URL ) ) {
249
+        if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) {
250 250
             return;
251 251
         }
252 252
 
253
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuLink(
253
+        $_oFormatter = new AdminPageFramework_Format_SubMenuLink(
254 254
             $aSubMenuLink,
255 255
             $this,
256 256
             count( $this->oProp->aPages ) + 1
@@ -340,11 +340,11 @@  discard block
 block discarded – undo
340 340
      */
341 341
     public function addSubMenuPage( array $aSubMenuPage ) {
342 342
 
343
-        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) {
343
+        if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) {
344 344
             return;
345 345
         }
346 346
             
347
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuPage(
347
+        $_oFormatter = new AdminPageFramework_Format_SubMenuPage(
348 348
             $aSubMenuPage,
349 349
             $this,
350 350
             count( $this->oProp->aPages ) + 1
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Page.php 2 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
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             
291 291
             $this->oProp->{$sPropertyName} = $mValue;
292 292
        
293
-            foreach( $this->oProp->aPages as &$_aPage ) {
293
+            foreach ( $this->oProp->aPages as &$_aPage ) {
294 294
                 $_aPage[ $sPropertyKey ] = $mValue;
295 295
 
296 296
             }
Please login to merge, or discard this patch.
development/factory/admin_page/form/AdminPageFramework_Form_admin_page.php 2 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
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
     public function getPageOnlyOptions( $aOptions, $sPageSlug ) {
54 54
 
55 55
         $_aStoredOptionsOfThePage = array();
56
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
56
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
57 57
             
58 58
             // Check the section
59
-            if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
59
+            if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
60 60
                 continue;
61 61
             }
62 62
 
63 63
             // At this point, the element belongs the given page slug as the section is of the given page slug's.
64 64
             $this->_setPageOnlyOptions(
65
-                $_aStoredOptionsOfThePage,  // by reference - gets updated in the method.
65
+                $_aStoredOptionsOfThePage, // by reference - gets updated in the method.
66 66
                 $aOptions,
67 67
                 $_aSubSectionsOrFields,
68 68
                 $sPageSlug,
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
          * @internal
84 84
          */
85 85
         private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) {
86
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
86
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
87 87
                 
88 88
                 // If it's a sub-section array,
89 89
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public function getOtherPageOptions( $aOptions, $sPageSlug ) {
156 156
 
157 157
         $_aStoredOptionsNotOfThePage = array();
158
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
158
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
159 159
             
160 160
             // Check the section
161 161
             if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
          * @internal
185 185
          */
186 186
         private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) {
187
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
187
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
188 188
 
189 189
                 // It's a sub-section array. 
190 190
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) {
248 248
 
249 249
         $_aStoredOptionsNotOfTheTab = array();
250
-        foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
250
+        foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) {
251 251
                         
252 252
             // If the section is of the given page and the given tab, skip.
253 253
             if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) {
279 279
             
280 280
             // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped.
281
-            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField  ) {
281
+            foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) {
282 282
                 
283 283
                 // If it's a sub section
284 284
                 if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
337 337
      * @return      array
338 338
      */
339
-    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) {
339
+    public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) {
340 340
                 
341 341
         $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug );
342 342
         $_aTabOptions      = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions );
@@ -355,17 +355,17 @@  discard block
 block discarded – undo
355 355
      * @since       3.7.0      Moved from `AdminPageFramework_FormDefinition_Page`.
356 356
      * @return      array
357 357
      */
358
-    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) {
358
+    public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) {
359 359
         
360 360
         $_aStoredOptionsOfTheTab = array();
361
-        if ( ! $sTabSlug ) {
361
+        if ( !$sTabSlug ) {
362 362
             return $_aStoredOptionsOfTheTab;
363 363
         }
364 364
         
365
-        foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
365
+        foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) {
366 366
              
367 367
             // Check the section
368
-            if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
368
+            if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) {
369 369
                 continue;
370 370
             }
371 371
             
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
          */
393 393
         private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) {
394 394
             
395
-            foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
395
+            foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) {
396 396
                                 
397 397
                 // if it's a sub-section array.
398 398
                 if ( $this->isNumericInteger( $_sFieldID ) ) {
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
      */
450 450
     private function _isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) {
451 451
         
452
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
452
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) {
453 453
             return false;
454 454
         }
455 455
 
@@ -468,10 +468,10 @@  discard block
 block discarded – undo
468 468
      */
469 469
     private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) {
470 470
         
471
-        if ( ! $this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
471
+        if ( !$this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) {
472 472
             return false;
473 473
         }
474
-        if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
474
+        if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) {
475 475
             return false;
476 476
         }
477 477
 
@@ -489,9 +489,9 @@  discard block
 block discarded – undo
489 489
      */
490 490
     private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) {
491 491
         $_aDimensionalPath = $this->getAsArray( $asDimensionalPath );
492
-        $_mValue     = $this->getElement(
492
+        $_mValue = $this->getElement(
493 493
             $aOptions,
494
-            $_aDimensionalPath,    // as of 3.7.0, it can be an array or string
494
+            $_aDimensionalPath, // as of 3.7.0, it can be an array or string
495 495
             null
496 496
         );
497 497
         if ( isset( $_mValue ) ) {
Please login to merge, or discard this patch.
factory/taxonomy_field/AdminPageFramework_TaxonomyField_View.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -107,6 +107,7 @@
 block discarded – undo
107 107
          * 
108 108
          * @since       3.0.0
109 109
          * @internal
110
+         * @param boolean $bRenderTableRow
110 111
          * @return      string
111 112
          */
112 113
         private function _getFieldsOutput( $iTermID, $bRenderTableRow ) {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         return "{$_aField['field_id']}{$_sKey}";
70 70
     }
71 71
 
72
-   /**
72
+    /**
73 73
      * Adds input fields
74 74
      * 
75 75
      * @internal
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             "[{$_sKey}]"
50 50
         );
51 51
 
52
-        return $_aField['field_id'] . $_sKey;
52
+        return $_aField[ 'field_id' ].$_sKey;
53 53
         
54 54
     }
55 55
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             "|{$_sKey}"
69 69
         );
70 70
 
71
-        return "{$_aField['field_id']}{$_sKey}";
71
+        return "{$_aField[ 'field_id' ]}{$_sKey}";
72 72
     }
73 73
 
74 74
    /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $_aOutput = array();
117 117
             
118 118
             // Set nonce.           
119
-            $_aOutput[] = wp_nonce_field(
119
+            $_aOutput[ ] = wp_nonce_field(
120 120
                 $this->oProp->sClassHash,
121 121
                 $this->oProp->sClassHash,
122 122
                 true,
@@ -127,17 +127,17 @@  discard block
 block discarded – undo
127 127
             $this->_setOptionArray( $iTermID, $this->oProp->sOptionKey );
128 128
             
129 129
             // Get the field outputs
130
-            $_aOutput[] = $this->oForm->get();
130
+            $_aOutput[ ] = $this->oForm->get();
131 131
             
132 132
             // Filter the output
133 133
             $_sOutput = $this->oUtil->addAndApplyFilters(
134 134
                 $this,
135
-                'content_' . $this->oProp->sClassName,
135
+                'content_'.$this->oProp->sClassName,
136 136
                 $this->content( implode( PHP_EOL, $_aOutput ) )
137 137
             );
138 138
 
139 139
             // Do action 
140
-            $this->oUtil->addAndDoActions( $this, 'do_' . $this->oProp->sClassName, $this );
140
+            $this->oUtil->addAndDoActions( $this, 'do_'.$this->oProp->sClassName, $this );
141 141
 
142 142
             return $_sOutput;
143 143
                        
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
     public function _replyToPrintColumnCell( $vValue, $sColumnSlug, $sTermID ) {
157 157
         
158 158
         $_sCellHTML = '';
159
-        if ( isset( $_GET['taxonomy'] ) && $_GET['taxonomy'] ) {
160
-            $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET['taxonomy']}", $vValue, $sColumnSlug, $sTermID );
159
+        if ( isset( $_GET[ 'taxonomy' ] ) && $_GET[ 'taxonomy' ] ) {
160
+            $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$_GET[ 'taxonomy' ]}", $vValue, $sColumnSlug, $sTermID );
161 161
         }
162 162
         $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}", $_sCellHTML, $sColumnSlug, $sTermID );
163 163
         $_sCellHTML = $this->oUtil->addAndApplyFilter( $this, "cell_{$this->oProp->sClassName}_{$sColumnSlug}", $_sCellHTML, $sTermID ); // 3.0.2+
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget_Factory.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -23,6 +23,7 @@
 block discarded – undo
23 23
      * Sets up internal properties.
24 24
      * 
25 25
      * @since       3.2.0
26
+     * @param AdminPageFramework_Widget_Model $oCaller
26 27
      * @return      void
27 28
      */
28 29
 	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @since       3.2.0
28 28
      * @return      void
29 29
      */
30
-	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
30
+    public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
31 31
 		
32 32
         $aArguments = $aArguments
33 33
             + array(
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
                 'description'   => '',
36 36
             );
37 37
             
38
-		parent::__construct(
38
+        parent::__construct(
39 39
             $oCaller->oProp->sClassName,  // base id 
40 40
             $sWidgetTitle,      // widget title
41 41
             $aArguments         // widget arguments
42 42
         );
43 43
         $this->oCaller = $oCaller;
44 44
      
45
-	}
45
+    }
46 46
     
47 47
     /**
48 48
      * Displays the widget contents in the front end.
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * whether the title should be visible or not depending on the content.
53 53
      * @return      void
54 54
      */
55
-	public function widget( $aArguments, $aFormData ) {
55
+    public function widget( $aArguments, $aFormData ) {
56 56
            
57 57
         echo $aArguments[ 'before_widget' ];
58 58
         
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 
76 76
         echo $_sContent;
77 77
         
78
-		echo $aArguments[ 'after_widget' ];
78
+        echo $aArguments[ 'after_widget' ];
79 79
 		
80
-	}
80
+    }
81 81
         /**
82 82
          * Returns the widget title.
83 83
          * 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 return '';
108 108
             }
109 109
 
110
-           return $aArguments['before_title']
110
+            return $aArguments['before_title']
111 111
                 . $_sTitle
112 112
             . $aArguments['after_title'];
113 113
             
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * @since       3.2.0
120 120
      * @return      mixed       The validated form data. The type should be an array but it is dealt by the framework user it will be unknown.
121 121
      */
122
-	public function update( $aSubmittedFormData, $aSavedFormData ) {
122
+    public function update( $aSubmittedFormData, $aSavedFormData ) {
123 123
                 
124 124
         return $this->oCaller->oUtil->addAndApplyFilters(
125 125
             $this->oCaller,
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             $this->oCaller
133 133
         );
134 134
  
135
-	}
135
+    }
136 136
     
137 137
     /**
138 138
      * Constructs the widget form with the given saved form data.
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * 
144 144
      * @return      void
145 145
      */
146
-	public function form( $aSavedFormData ) {
146
+    public function form( $aSavedFormData ) {
147 147
         
148 148
         $this->oCaller->oForm->aCallbacks = $this->_getFormCallbacks();
149 149
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $this->oCaller->oForm->aSectionsets          = $_aSectionsets;
183 183
         $this->oCaller->oForm->aFieldsets            = $_aFieldsets;
184 184
         
185
-	}
185
+    }
186 186
         /**
187 187
          * Calls the load() method of the caller factory object.
188 188
          * 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @since       3.2.0
28 28
      * @return      void
29 29
      */
30
-	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
30
+	public function __construct( $oCaller, $sWidgetTitle, array $aArguments = array() ) {
31 31
 		
32 32
         $aArguments = $aArguments
33 33
             + array(
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
             );
37 37
             
38 38
 		parent::__construct(
39
-            $oCaller->oProp->sClassName,  // base id 
40
-            $sWidgetTitle,      // widget title
39
+            $oCaller->oProp->sClassName, // base id 
40
+            $sWidgetTitle, // widget title
41 41
             $aArguments         // widget arguments
42 42
         );
43 43
         $this->oCaller = $oCaller;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         
59 59
         $this->oCaller->oUtil->addAndDoActions(
60 60
             $this->oCaller,
61
-            'do_' . $this->oCaller->oProp->sClassName,
61
+            'do_'.$this->oCaller->oProp->sClassName,
62 62
             $this->oCaller
63 63
         );
64 64
        
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
          */
90 90
         private function _getTitle( array $aArguments, array $aFormData ) {
91 91
                 
92
-            if ( ! $this->oCaller->oProp->bShowWidgetTitle ) {
92
+            if ( !$this->oCaller->oProp->bShowWidgetTitle ) {
93 93
                 return '';
94 94
             }
95 95
             
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
                 $aFormData,
104 104
                 $this->id_base
105 105
             );
106
-            if ( ! $_sTitle ) {
106
+            if ( !$_sTitle ) {
107 107
                 return '';
108 108
             }
109 109
 
110
-           return $aArguments['before_title']
110
+           return $aArguments[ 'before_title' ]
111 111
                 . $_sTitle
112
-            . $aArguments['after_title'];
112
+            . $aArguments[ 'after_title' ];
113 113
             
114 114
         }
115 115
             
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             $this->oCaller,
126 126
             "validation_{$this->oCaller->oProp->sClassName}",
127 127
             call_user_func_array(
128
-                array( $this->oCaller, 'validate' ),    // triggers __call()
128
+                array( $this->oCaller, 'validate' ), // triggers __call()
129 129
                 array( $aSubmittedFormData, $aSavedFormData, $this->oCaller ) // parameters
130 130
             ), // 3.5.3+                        
131 131
             $aSavedFormData,
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
         $this->oCaller->oForm   = new AdminPageFramework_Form_widget(
174 174
             array(
175 175
                 'register_if_action_already_done' => false, // do not register fields right away
176
-            ) + $this->oCaller->oProp->aFormArguments,  // form arguments  
177
-            $this->oCaller->oForm->aCallbacks,  // callbacks 
176
+            ) + $this->oCaller->oProp->aFormArguments, // form arguments  
177
+            $this->oCaller->oForm->aCallbacks, // callbacks 
178 178
             $this->oCaller->oMsg
179 179
         );
180 180
         // Reuse the data of the previous widget instance.
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
              * Call the load method only once per class. Also the added field registrations in the class also done once.
196 196
              * @since       3.7.9
197 197
              */
198
-            if ( $this->oCaller->oUtil->hasBeenCalled( '_widget_load_' . $this->oCaller->oProp->sClassName ) ) {
198
+            if ( $this->oCaller->oUtil->hasBeenCalled( '_widget_load_'.$this->oCaller->oProp->sClassName ) ) {
199 199
                 
200 200
                 // The saved option callback is done with the below load_... callback so for widget form instances called from the second time
201 201
                 // need to call the callback manually.
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
             $this->oCaller->oUtil->addAndDoActions(
211 211
                 $this->oCaller,
212 212
                 array(
213
-                    'load_' . $this->oCaller->oProp->sClassName,
213
+                    'load_'.$this->oCaller->oProp->sClassName,
214 214
                 ),
215 215
                 $this->oCaller
216 216
             );
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
          */
225 225
         private function _getFormCallbacks() {
226 226
             return array(
227
-                'hfID'          => array( $this, 'get_field_id' ),    // defined in the WP_Widget class.  
228
-                'hfTagID'       => array( $this, 'get_field_id' ),    // defined in the WP_Widget class.  
229
-                'hfName'        => array( $this, '_replyToGetFieldName' ),  // defined in the WP_Widget class.  
227
+                'hfID'          => array( $this, 'get_field_id' ), // defined in the WP_Widget class.  
228
+                'hfTagID'       => array( $this, 'get_field_id' ), // defined in the WP_Widget class.  
229
+                'hfName'        => array( $this, '_replyToGetFieldName' ), // defined in the WP_Widget class.  
230 230
                 'hfInputName'   => array( $this, '_replyToGetFieldInputName' ),
231 231
                 
232 232
                 'saved_data'    => array( $this, '_replyToGetSavedFormData' ),
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
     public function  _replyToGetSavedFormData() {
244 244
         return $this->oCaller->oUtil->addAndApplyFilter(
245 245
             $this->oCaller, // the caller factory object
246
-            'options_' . $this->oCaller->oProp->sClassName,
247
-            $this->oCaller->oProp->aOptions,      // subject value to be filtered
246
+            'options_'.$this->oCaller->oProp->sClassName,
247
+            $this->oCaller->oProp->aOptions, // subject value to be filtered
248 248
             $this->id   // 3.7.9+
249 249
         );
250 250
     }
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
                 ? "[{$aFieldset[ '_section_index' ]}]"
279 279
                 : "";
280 280
             $_sDimensions   = $this->oCaller->isSectionSet( $aFieldset )
281
-                ? $aFieldset[ 'section_id' ] . "]" . $_sSectionIndex . "[" . $aFieldset[ 'field_id' ]
281
+                ? $aFieldset[ 'section_id' ]."]".$_sSectionIndex."[".$aFieldset[ 'field_id' ]
282 282
                 : $aFieldset[ 'field_id' ];
283 283
 
284
-            return 'widget-' . $this->id_base . '[' . $this->number . '][' . $_sDimensions . ']';
284
+            return 'widget-'.$this->id_base.'['.$this->number.']['.$_sDimensions.']';
285 285
         }
286 286
     
287 287
     /**
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
         $_sIndex        = $this->oCaller->oUtil->getAOrB(
299 299
             '0' !== $sIndex && empty( $sIndex ),
300 300
             '',
301
-            "[" . $sIndex . "]"
301
+            "[".$sIndex."]"
302 302
         );
303 303
 
304
-        return $this->_replyToGetFieldName( '', $aFieldset ) . $_sIndex;
304
+        return $this->_replyToGetFieldName( '', $aFieldset ).$_sIndex;
305 305
 
306 306
     }
307 307
   
Please login to merge, or discard this patch.