@@ -181,7 +181,8 @@ discard block |
||
181 | 181 | */ |
182 | 182 | private function _validateEachField( array $aData, array $aInputsToParse ) { |
183 | 183 | |
184 | - foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
184 | + foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { |
|
185 | +// $_sID is either a section id or a field id |
|
185 | 186 | |
186 | 187 | // For each section |
187 | 188 | if ( $this->oFactory->oForm->isSection( $_sID ) ) { |
@@ -192,7 +193,8 @@ discard block |
||
192 | 193 | } |
193 | 194 | |
194 | 195 | // Call the validation callback method. |
195 | - foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
196 | + foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { |
|
197 | +// For fields |
|
196 | 198 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ] = $this->_getValidatedData( |
197 | 199 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}_{$_sFieldID}", |
198 | 200 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ], |
@@ -276,7 +278,7 @@ discard block |
||
276 | 278 | */ |
277 | 279 | private function _validateTabFields( array $aData ) { |
278 | 280 | |
279 | - if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
281 | + if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
280 | 282 | return $aData; |
281 | 283 | } |
282 | 284 | |
@@ -337,7 +339,7 @@ discard block |
||
337 | 339 | */ |
338 | 340 | private function _validatePageFields( array $aData ) { |
339 | 341 | |
340 | - if ( ! $aData[ 'sPageSlug' ] ) { |
|
342 | + if ( ! $aData[ 'sPageSlug' ] ) { |
|
341 | 343 | return $aData[ 'aInput' ]; |
342 | 344 | } |
343 | 345 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->oFactory |
89 | 89 | ), |
90 | 90 | 'aStoredTabDataWODynamicElements' => array(), |
91 | - 'aEmbeddedDataWODynamicElements' => array(), // stores page meta box field options. This will be updated inside the validation methods. |
|
91 | + 'aEmbeddedDataWODynamicElements' => array(), // stores page meta box field options. This will be updated inside the validation methods. |
|
92 | 92 | 'aSubmitInformation' => $aSubmitInformation, // 3.5.0+ |
93 | 93 | ); |
94 | 94 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | call_user_func_array( |
104 | 104 | array( $this->oFactory, 'validate' ), // triggers __call() |
105 | 105 | array( $_aData[ 'aInput' ], $_aData[ 'aStoredData' ], $this->oFactory, $_aData[ 'aSubmitInformation' ] ) |
106 | - ), // 3.5.3+ |
|
106 | + ), // 3.5.3+ |
|
107 | 107 | $_aData[ 'aStoredData' ], |
108 | 108 | $_aData[ 'aSubmitInformation' ] // 3.5.0+ |
109 | 109 | ); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | // If everything fine, return the filtered input data. |
117 | 117 | $this->_bHasFieldErrors = $this->oFactory->hasFieldError(); |
118 | - if ( ! $this->_bHasFieldErrors ) { |
|
118 | + if ( !$this->_bHasFieldErrors ) { |
|
119 | 119 | return $_aInput; |
120 | 120 | } |
121 | 121 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ); |
130 | 130 | |
131 | 131 | // Go to the catch clause. |
132 | - $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
132 | + $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
133 | 133 | $_oException->aReturn = $_aInput; |
134 | 134 | throw $_oException; |
135 | 135 | |
@@ -153,22 +153,22 @@ discard block |
||
153 | 153 | */ |
154 | 154 | private function _validateEachField( array $aData, array $aInputsToParse ) { |
155 | 155 | |
156 | - foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
156 | + foreach ( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
157 | 157 | |
158 | 158 | // For each section |
159 | 159 | if ( $this->oFactory->oForm->isSection( $_sID ) ) { |
160 | 160 | |
161 | 161 | // If the parsing item does not belong to the current page, do not call the validation callback method. |
162 | - if ( ! $this->_isValidSection( $_sID, $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
162 | + if ( !$this->_isValidSection( $_sID, $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
163 | 163 | continue; |
164 | 164 | } |
165 | 165 | |
166 | 166 | // Call the validation callback method. |
167 | - foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
167 | + foreach ( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
168 | 168 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ] = $this->_getValidatedData( |
169 | 169 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}_{$_sFieldID}", |
170 | 170 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ], |
171 | - $this->getElement( $aData, array( 'aStoredData', $_sID, $_sFieldID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] ) ? $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] : null, |
|
171 | + $this->getElement( $aData, array( 'aStoredData', $_sID, $_sFieldID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] ) ? $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] : null, |
|
172 | 172 | $aData[ 'aSubmitInformation' ] // 3.5.0+ |
173 | 173 | ); |
174 | 174 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $aData[ 'aInput' ][ $_sID ] = $this->_getValidatedData( |
190 | 190 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}", |
191 | 191 | $_aSectionInput, |
192 | - $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
192 | + $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
193 | 193 | $aData[ 'aSubmitInformation' ] |
194 | 194 | ); |
195 | 195 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | // Check if the parsing item (the default section) belongs to the current page; if not, do not call the validation callback method. |
201 | - if ( ! $this->_isValidSection( '_default', $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
201 | + if ( !$this->_isValidSection( '_default', $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
202 | 202 | continue; |
203 | 203 | } |
204 | 204 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $aData[ 'aInput' ][ $_sID ] = $this->_getValidatedData( |
207 | 207 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}", |
208 | 208 | $aData[ 'aInput' ][ $_sID ], |
209 | - $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
209 | + $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
210 | 210 | $aData[ 'aSubmitInformation' ] |
211 | 211 | ); |
212 | 212 | |
@@ -248,22 +248,22 @@ discard block |
||
248 | 248 | */ |
249 | 249 | private function _validateTabFields( array $aData ) { |
250 | 250 | |
251 | - if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
251 | + if ( !$aData[ 'sTabSlug' ] || !$aData[ 'sPageSlug' ] ) { |
|
252 | 252 | return $aData; |
253 | 253 | } |
254 | 254 | |
255 | - $aData[ 'aStoredTabData' ] = $this->oFactory->oForm->getTabOptions( |
|
255 | + $aData[ 'aStoredTabData' ] = $this->oFactory->oForm->getTabOptions( |
|
256 | 256 | $aData[ 'aStoredData' ], |
257 | 257 | $aData[ 'sPageSlug' ], |
258 | 258 | $aData[ 'sTabSlug' ] |
259 | 259 | ); // respects page meta box fields |
260 | - $aData[ 'aStoredTabData' ] = $this->addAndApplyFilter( |
|
260 | + $aData[ 'aStoredTabData' ] = $this->addAndApplyFilter( |
|
261 | 261 | $this->oFactory, |
262 | 262 | "validation_saved_options_{$aData[ 'sPageSlug' ]}_{$aData[ 'sTabSlug' ]}", |
263 | 263 | $aData[ 'aStoredTabData' ], |
264 | 264 | $this->oFactory |
265 | 265 | ); |
266 | - $_aOtherTabOptions = $this->oFactory->oForm->getOtherTabOptions( |
|
266 | + $_aOtherTabOptions = $this->oFactory->oForm->getOtherTabOptions( |
|
267 | 267 | $aData[ 'aStoredData' ], |
268 | 268 | $aData[ 'sPageSlug' ], |
269 | 269 | $aData[ 'sTabSlug' ] |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | */ |
318 | 318 | private function _validatePageFields( array $aData ) { |
319 | 319 | |
320 | - if ( ! $aData[ 'sPageSlug' ] ) { |
|
320 | + if ( !$aData[ 'sPageSlug' ] ) { |
|
321 | 321 | return $aData[ 'aInput' ]; |
322 | 322 | } |
323 | 323 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $_aPageOptionsWODynamicElements = $this->addAndApplyFilter( |
330 | 330 | $this->oFactory, |
331 | 331 | "validation_saved_options_without_dynamic_elements_{$aData[ 'sPageSlug' ]}", |
332 | - $this->oFactory->oForm->getPageOptions( $aData[ 'aStoredDataWODynamicElements' ], $aData[ 'sPageSlug' ] ), // united with the in-page tab specific data in order to override the page-specific dynamic elements. |
|
332 | + $this->oFactory->oForm->getPageOptions( $aData[ 'aStoredDataWODynamicElements' ], $aData[ 'sPageSlug' ] ), // united with the in-page tab specific data in order to override the page-specific dynamic elements. |
|
333 | 333 | $this->oFactory |
334 | 334 | ); |
335 | 335 | |
@@ -342,15 +342,15 @@ discard block |
||
342 | 342 | // Validate the input data. |
343 | 343 | $aData[ 'aInput' ] = $this->_getValidatedData( |
344 | 344 | "validation_{$aData[ 'sPageSlug' ]}", |
345 | - $aData[ 'aInput' ], // new values |
|
346 | - $_aPageOptions, // stored page options |
|
345 | + $aData[ 'aInput' ], // new values |
|
346 | + $_aPageOptions, // stored page options |
|
347 | 347 | $aData[ 'aSubmitInformation' ] // submit information 3.5.0+ |
348 | 348 | ); |
349 | 349 | |
350 | 350 | // If it's in a tab-page, drop the elements which belong to the tab so that arrayed-options will not be merged such as multiple select options. |
351 | - $_aPageOptions = $aData[ 'sTabSlug' ] && ! empty( $aData[ 'aStoredTabData' ] ) |
|
351 | + $_aPageOptions = $aData[ 'sTabSlug' ] && !empty( $aData[ 'aStoredTabData' ] ) |
|
352 | 352 | ? $this->invertCastArrayContents( $_aPageOptions, $aData[ 'aStoredTabData' ] ) |
353 | - : ( ! $aData[ 'sTabSlug' ] // if the tab is not specified, do not merge the input array with the page options as the input array already includes the page options. This is for dynamic elements(repeatable sections). |
|
353 | + : ( !$aData[ 'sTabSlug' ] // if the tab is not specified, do not merge the input array with the page options as the input array already includes the page options. This is for dynamic elements(repeatable sections). |
|
354 | 354 | ? array() |
355 | 355 | : $_aPageOptions |
356 | 356 | ); |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | * @param array $aStoredData The stored option. |
406 | 406 | * @param array $aSubmitInfo [3.5.0+] The form submit information such as the field ID of the pressed submit field. |
407 | 407 | */ |
408 | - private function _getValidatedData( $sFilterName, $aInputs, $aStoredData, $aSubmitInfo=array() ) { |
|
408 | + private function _getValidatedData( $sFilterName, $aInputs, $aStoredData, $aSubmitInfo = array() ) { |
|
409 | 409 | return $this->addAndApplyFilter( |
410 | - $this->oFactory, // caller |
|
411 | - $sFilterName, // hook name |
|
412 | - $aInputs, // 1st argument |
|
413 | - $aStoredData, // 2nd argument |
|
414 | - $this->oFactory, // 3rd argument |
|
410 | + $this->oFactory, // caller |
|
411 | + $sFilterName, // hook name |
|
412 | + $aInputs, // 1st argument |
|
413 | + $aStoredData, // 2nd argument |
|
414 | + $this->oFactory, // 3rd argument |
|
415 | 415 | $aSubmitInfo // 4th argument 3.5.0+ |
416 | 416 | ); |
417 | 417 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function get() { |
53 | 53 | |
54 | - // Apply filters to modify the in-page tab array. |
|
54 | + // Apply filters to modify the in-page tab array. |
|
55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
56 | 56 | $this->oFactory, // caller object |
57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
@@ -53,14 +53,14 @@ |
||
53 | 53 | |
54 | 54 | // Apply filters to modify the in-page tab array. |
55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
56 | - $this->oFactory, // caller object |
|
56 | + $this->oFactory, // caller object |
|
57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
58 | 58 | $this->aInPageTabs // filtering value |
59 | 59 | ); |
60 | 60 | |
61 | 61 | // Added items may be missing necessary keys so format them |
62 | - foreach( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | - if ( ! is_array( $_aInPageTab ) ) { |
|
62 | + foreach ( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | + if ( !is_array( $_aInPageTab ) ) { |
|
64 | 64 | continue; |
65 | 65 | } |
66 | 66 | $_oFormatter = new AdminPageFramework_Format_InPageTab( |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function render( $sContext ) { |
30 | 30 | |
31 | 31 | // If nothing is registered do not render even the container. |
32 | - if ( ! $this->doesMetaBoxExist() ) { |
|
32 | + if ( !$this->doesMetaBoxExist() ) { |
|
33 | 33 | return; |
34 | 34 | } |
35 | 35 |
@@ -20,7 +20,6 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Renders a registered meta box. |
23 | - |
|
24 | 23 | * @return void |
25 | 24 | * @param string $sContext `side`, `normal`, or `advanced`. |
26 | 25 | * @since 3.0.0 |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`. |
56 | 56 | * @return void returns nothing. |
57 | 57 | */ |
58 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
58 | + public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ) { |
|
59 | 59 | |
60 | 60 | if ( ! $this->_isInstantiatable() ) { |
61 | 61 | return; |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | protected $_aBuiltInRootMenuSlugs = array( |
40 | 40 | // All keys must be lower case to support case insensitive look-ups. |
41 | 41 | 'dashboard' => 'index.php', |
42 | - 'sites' => 'sites.php', // not work |
|
43 | - 'themes' => 'themes.php', // not work |
|
42 | + 'sites' => 'sites.php', // not work |
|
43 | + 'themes' => 'themes.php', // not work |
|
44 | 44 | 'plugins' => 'plugins.php', |
45 | 45 | 'users' => 'users.php', |
46 | 46 | 'settings' => 'settings.php', |
47 | - 'updates' => 'update-core.php', // does not work |
|
47 | + 'updates' => 'update-core.php', // does not work |
|
48 | 48 | ); |
49 | 49 | |
50 | 50 | /** |
@@ -65,15 +65,15 @@ discard block |
||
65 | 65 | * @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`. |
66 | 66 | * @return void returns nothing. |
67 | 67 | */ |
68 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
68 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_network', $sTextDomain = 'admin-page-framework' ) { |
|
69 | 69 | |
70 | - if ( ! $this->_isInstantiatable() ) { |
|
70 | + if ( !$this->_isInstantiatable() ) { |
|
71 | 71 | return; |
72 | 72 | } |
73 | 73 | |
74 | 74 | $sCallerPath = $sCallerPath |
75 | 75 | ? $sCallerPath |
76 | - : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
76 | + : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
77 | 77 | |
78 | 78 | parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain ); |
79 | 79 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param mixed $vDefault the default value that will be returned if nothing is stored. |
158 | 158 | * @return mixed If the field ID is not specified. |
159 | 159 | */ |
160 | - static public function getOption( $sOptionKey, $asKey=null , $vDefault=null ) { |
|
160 | + static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) { |
|
161 | 161 | return AdminPageFramework_WPUtility::getSiteOption( $sOptionKey, $asKey, $vDefault ); |
162 | 162 | } |
163 | 163 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | trigger_error( |
44 | - 'Admin Page Framework - Loader: ' . ' : ' . sprintf( |
|
44 | + 'Admin Page Framework - Loader: '.' : '.sprintf( |
|
45 | 45 | __( 'The method is not defined: %1$s', 'admin-page-framework-loader' ), |
46 | 46 | $sMethodName |
47 | 47 | ), |
@@ -24,12 +24,12 @@ |
||
24 | 24 | */ |
25 | 25 | public function content( $sContent ) { |
26 | 26 | |
27 | - $_aReplacements = array( |
|
27 | + $_aReplacements = array( |
|
28 | 28 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
29 | 29 | '%WP_ADMIN_URL%' => admin_url(), |
30 | 30 | ); |
31 | 31 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
32 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
32 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
33 | 33 | $_aReplacements |
34 | 34 | ); |
35 | 35 | return '' |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | public function replyToDoTab( $oFactory ) { |
36 | 36 | |
37 | - echo "<h3>" . __( 'Saved Options', 'admin-page-framework-loader' ) . "</h3>"; |
|
37 | + echo "<h3>".__( 'Saved Options', 'admin-page-framework-loader' )."</h3>"; |
|
38 | 38 | $oFactory->oDebug->dump( $oFactory->oProp->aOptions ); |
39 | 39 | |
40 | 40 | } |
@@ -226,8 +226,9 @@ |
||
226 | 226 | |
227 | 227 | $_aContributors = json_decode( wp_remote_retrieve_body( $_mResponse ) ); |
228 | 228 | |
229 | - if ( ! is_array( $_aContributors ) ) |
|
230 | - return array(); |
|
229 | + if ( ! is_array( $_aContributors ) ) { |
|
230 | + return array(); |
|
231 | + } |
|
231 | 232 | |
232 | 233 | set_transient( 'apfl_contributors', $_aContributors, 3600 ); |
233 | 234 |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | 'tab_slug' => $this->sTabSlug, |
29 | 29 | 'section_id' => $this->sTabSlug, |
30 | 30 | 'section_tab_slug' => 'welcome', |
31 | - 'title' => __( "What's New", 'admin-page-framework-loader' ), // ' |
|
31 | + 'title' => __( "What's New", 'admin-page-framework-loader' ), // ' |
|
32 | 32 | 'content' => $this->_getReadmeContents( |
33 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
33 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
34 | 34 | '', // TOC title |
35 | 35 | array( 'New Features' ) // section |
36 | 36 | ) |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | 'tab_slug' => $this->sTabSlug, |
40 | 40 | 'section_tab_slug' => $this->sTabSlug, |
41 | 41 | 'section_id' => 'getting_started', |
42 | - 'title' => __( "Getting Started", 'admin-page-framework-loader' ), // ' |
|
42 | + 'title' => __( "Getting Started", 'admin-page-framework-loader' ), // ' |
|
43 | 43 | 'content' => $this->_getReadmeContents( |
44 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
45 | - "<h3>" . __( 'Contents', 'admin-page-framework-loader' ) . "</h3>", |
|
44 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
45 | + "<h3>".__( 'Contents', 'admin-page-framework-loader' )."</h3>", |
|
46 | 46 | array( 'Getting Started', 'Tutorials' ) |
47 | 47 | ), |
48 | 48 | ), |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'tab_slug' => $this->sTabSlug, |
51 | 51 | 'section_tab_slug' => $this->sTabSlug, |
52 | 52 | 'section_id' => 'change_log', |
53 | - 'title' => __( "Change Log", 'admin-page-framework-loader' ), // ' |
|
53 | + 'title' => __( "Change Log", 'admin-page-framework-loader' ), // ' |
|
54 | 54 | 'content' => $this->_getChangeLog(), |
55 | 55 | ) |
56 | 56 | ); |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | array( |
87 | 87 | 'field_id' => 'github_star', |
88 | 88 | 'type' => 'github', |
89 | - 'user_name' => 'michaeluno', // the GitHub account ID |
|
90 | - 'button_type' => 'star', // either of the followings: follow, star, watch, fork, issue |
|
89 | + 'user_name' => 'michaeluno', // the GitHub account ID |
|
90 | + 'button_type' => 'star', // either of the followings: follow, star, watch, fork, issue |
|
91 | 91 | 'count' => false, |
92 | 92 | 'repository' => 'admin-page-framework', |
93 | 93 | 'size' => 'mega', |
94 | 94 | 'attributes' => array( |
95 | - 'data-text' => ' ' . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion() . ' ', |
|
95 | + 'data-text' => ' '.AdminPageFramework_Registry::NAME.' '.AdminPageFramework_Registry::getVersion().' ', |
|
96 | 96 | // 'data-icon' => 'octicon-mark-github', |
97 | 97 | ), |
98 | 98 | 'description' => __( 'Star the repository and get Involved!', 'admin-page-framework-loader' ), |
@@ -132,26 +132,26 @@ discard block |
||
132 | 132 | * @since 3.6.1 |
133 | 133 | * @return void |
134 | 134 | */ |
135 | - private function _getChangeLog( $sSection='Changelog' ) { |
|
135 | + private function _getChangeLog( $sSection = 'Changelog' ) { |
|
136 | 136 | |
137 | - $_aReplacements = array( |
|
137 | + $_aReplacements = array( |
|
138 | 138 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
139 | 139 | '%WP_ADMIN_URL%' => admin_url(), |
140 | 140 | ); |
141 | 141 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
142 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', |
|
142 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', |
|
143 | 143 | $_aReplacements |
144 | 144 | ); |
145 | 145 | $_sChangeLog = $_oWPReadmeParser->getSection( $sSection ); |
146 | 146 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
147 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/changelog.md', |
|
147 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/changelog.md', |
|
148 | 148 | $_aReplacements |
149 | 149 | ); |
150 | 150 | $_sChangeLog .= $_oWPReadmeParser->getSection( $sSection ); |
151 | 151 | |
152 | 152 | $_sChangeLog = $_sChangeLog |
153 | 153 | ? $_sChangeLog |
154 | - : '<p>' . __( 'No valid changlog was found.', 'admin-page-framework-loader' ) . '</p>'; |
|
154 | + : '<p>'.__( 'No valid changlog was found.', 'admin-page-framework-loader' ).'</p>'; |
|
155 | 155 | return "<div class='changelog'>" |
156 | 156 | . $_sChangeLog |
157 | 157 | . "</div>"; |
@@ -182,18 +182,18 @@ discard block |
||
182 | 182 | return ''; |
183 | 183 | } |
184 | 184 | |
185 | - $_aOutput = array(); |
|
185 | + $_aOutput = array(); |
|
186 | 186 | foreach ( $_aContributors as $_oContributor ) { |
187 | - $_aOutput[] = '<li class="wp-person">'; |
|
188 | - $_aOutput[] .= sprintf( '<a href="%s" title="%s">', |
|
189 | - esc_url( 'https://github.com/' . $_oContributor->login ), |
|
187 | + $_aOutput[ ] = '<li class="wp-person">'; |
|
188 | + $_aOutput[ ] .= sprintf( '<a href="%s" title="%s">', |
|
189 | + esc_url( 'https://github.com/'.$_oContributor->login ), |
|
190 | 190 | esc_html( sprintf( __( 'View %s', 'admin-page-framework-loader' ), $_oContributor->login ) ) |
191 | 191 | ); |
192 | - $_aOutput[] .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $_oContributor->avatar_url ), esc_html( $_oContributor->login ) ); |
|
193 | - $_aOutput[] .= '</a>'; |
|
194 | - $_aOutput[] .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/' . $_oContributor->login ), esc_html( $_oContributor->login ) ); |
|
195 | - $_aOutput[] .= '</a>'; |
|
196 | - $_aOutput[] .= '</li>'; |
|
192 | + $_aOutput[ ] .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $_oContributor->avatar_url ), esc_html( $_oContributor->login ) ); |
|
193 | + $_aOutput[ ] .= '</a>'; |
|
194 | + $_aOutput[ ] .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/'.$_oContributor->login ), esc_html( $_oContributor->login ) ); |
|
195 | + $_aOutput[ ] .= '</a>'; |
|
196 | + $_aOutput[ ] .= '</li>'; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | return '<ul class="wp-people-group">' |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | return $_aContributors; |
218 | 218 | } |
219 | 219 | |
220 | - $_mResponse = wp_remote_get( $sRepositoryURL . '/contributors', array( 'sslverify' => false ) ); |
|
220 | + $_mResponse = wp_remote_get( $sRepositoryURL.'/contributors', array( 'sslverify' => false ) ); |
|
221 | 221 | |
222 | 222 | if ( is_wp_error( $_mResponse ) || 200 != wp_remote_retrieve_response_code( $_mResponse ) ) { |
223 | 223 | return array(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | $_aContributors = json_decode( wp_remote_retrieve_body( $_mResponse ) ); |
227 | 227 | |
228 | - if ( ! is_array( $_aContributors ) ) |
|
228 | + if ( !is_array( $_aContributors ) ) |
|
229 | 229 | return array(); |
230 | 230 | |
231 | 231 | set_transient( 'apfl_contributors', $_aContributors, 3600 ); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function __construct() { |
25 | 25 | |
26 | 26 | new AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion( |
27 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_action_get_development_version' // action name |
|
27 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_action_get_development_version' // action name |
|
28 | 28 | ); |
29 | 29 | |
30 | 30 | } |