@@ -66,7 +66,7 @@ |
||
66 | 66 | * |
67 | 67 | * @since DEVVER |
68 | 68 | * @see https://codex.wordpress.org/Plugin_API/Admin_Screen_Reference |
69 | - * @param array|strin $asScreenIDs Screen IDs or page slug. |
|
69 | + * @param string[] $asScreenIDs Screen IDs or page slug. |
|
70 | 70 | * @param string $sPointerID A unique pointer ID. |
71 | 71 | * @Param array $aPointerData The pointer data. |
72 | 72 | */ |
@@ -173,7 +173,7 @@ |
||
173 | 173 | get_current_user_id(), |
174 | 174 | 'dismissed_wp_pointers', |
175 | 175 | true |
176 | - ) |
|
176 | + ) |
|
177 | 177 | ); |
178 | 178 | $_aValidPointers = array( |
179 | 179 | 'pointers' => array(), |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function __construct( $asScreenIDs, $sPointerID, array $aPointerData ) { |
63 | 63 | |
64 | 64 | // Bail if the WordPress version is less than 3.3, |
65 | - if ( version_compare( $GLOBALS[ 'wp_version' ], '3.3', '<' ) ) { |
|
65 | + if ( version_compare( $GLOBALS[ 'wp_version' ], '3.3', '<' ) ) { |
|
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | */ |
95 | 95 | private function _setHooks( $aScreenIDs ) { |
96 | - foreach( $aScreenIDs as $_sScreenID ) { |
|
96 | + foreach( $aScreenIDs as $_sScreenID ) { |
|
97 | 97 | if ( ! $_sScreenID ) { |
98 | 98 | continue; |
99 | 99 | } |
@@ -112,18 +112,18 @@ discard block |
||
112 | 112 | */ |
113 | 113 | private function _setHooks( $aScreenIDs ) { |
114 | 114 | |
115 | - foreach( $aScreenIDs as $_sScreenID ) { |
|
116 | - if ( ! $_sScreenID ) { |
|
115 | + foreach ( $aScreenIDs as $_sScreenID ) { |
|
116 | + if ( !$_sScreenID ) { |
|
117 | 117 | continue; |
118 | 118 | } |
119 | 119 | add_filter( |
120 | - get_class( $this ) . '-' . $_sScreenID, |
|
120 | + get_class( $this ).'-'.$_sScreenID, |
|
121 | 121 | array( $this, '_replyToSetPointer' ) |
122 | 122 | ); |
123 | 123 | |
124 | 124 | } |
125 | 125 | |
126 | - if ( ! $this->_hasBeenCalled() ) { |
|
126 | + if ( !$this->_hasBeenCalled() ) { |
|
127 | 127 | return; |
128 | 128 | } |
129 | 129 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | $_aPointers = $this->_getValidPointers( $this->_getPointers() ); |
172 | 172 | |
173 | - if ( empty( $_aPointers ) || ! is_array( $_aPointers ) ) { |
|
173 | + if ( empty( $_aPointers ) || !is_array( $_aPointers ) ) { |
|
174 | 174 | return; |
175 | 175 | } |
176 | 176 | |
@@ -190,11 +190,11 @@ discard block |
||
190 | 190 | $_oScreen = get_current_screen(); |
191 | 191 | $_sScreenID = $_oScreen->id; |
192 | 192 | if ( in_array( $_sScreenID, $this->aScreenIDs ) ) { |
193 | - return apply_filters( get_class( $this ) . '-' . $_sScreenID, array() ); |
|
193 | + return apply_filters( get_class( $this ).'-'.$_sScreenID, array() ); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | if ( isset( $_GET[ 'page' ] ) ) { |
197 | - return apply_filters( get_class( $this ) . '-' . $_GET[ 'page' ], array() ); |
|
197 | + return apply_filters( get_class( $this ).'-'.$_GET[ 'page' ], array() ); |
|
198 | 198 | } |
199 | 199 | return array(); |
200 | 200 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | private function _getValidPointers( $_aPointers ) { |
209 | 209 | |
210 | 210 | // Get dismissed pointers |
211 | - $_aDismissed = explode( |
|
211 | + $_aDismissed = explode( |
|
212 | 212 | ',', |
213 | 213 | ( string ) get_user_meta( |
214 | 214 | get_current_user_id(), |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $_aPointer[ 'pointer_id' ] = $_iPointerID; |
237 | 237 | |
238 | 238 | // Add the pointer to $_aValidPointers array |
239 | - $_aValidPointers[] = $_aPointer; |
|
239 | + $_aValidPointers[ ] = $_aPointer; |
|
240 | 240 | |
241 | 241 | } |
242 | 242 | return $_aValidPointers; |
@@ -312,9 +312,9 @@ discard block |
||
312 | 312 | * @return string |
313 | 313 | * @internal |
314 | 314 | */ |
315 | - public function _getInternalScript( $aPointers=array() ) { |
|
315 | + public function _getInternalScript( $aPointers = array() ) { |
|
316 | 316 | |
317 | - $_aJSArray = json_encode( $aPointers ); |
|
317 | + $_aJSArray = json_encode( $aPointers ); |
|
318 | 318 | |
319 | 319 | /** |
320 | 320 | * Checks check-boxes in siblings. |
@@ -25,6 +25,7 @@ |
||
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Sets up hooks and properties. |
28 | + * @param AdminPageFrameworkLoader_AdminPage $oFactory |
|
28 | 29 | */ |
29 | 30 | public function __construct( $oFactory, array $aPageArguments ) { |
30 | 31 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function __construct( $oFactory, array $aPageArguments ) { |
30 | 30 | |
31 | 31 | $this->oFactory = $oFactory; |
32 | - $this->sPageSlug = $aPageArguments['page_slug']; |
|
32 | + $this->sPageSlug = $aPageArguments[ 'page_slug' ]; |
|
33 | 33 | $this->_addPage( $aPageArguments ); |
34 | 34 | $this->construct( $oFactory ); |
35 | 35 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function replyToLoadResources( $oFactory ) { |
60 | 60 | |
61 | - $_sCSSPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/' . $this->sPageSlug . '.css'; |
|
62 | - if ( ! file_exists( $_sCSSPath ) ) { |
|
61 | + $_sCSSPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/'.$this->sPageSlug.'.css'; |
|
62 | + if ( !file_exists( $_sCSSPath ) ) { |
|
63 | 63 | return; |
64 | 64 | } |
65 | 65 | $this->oFactory->enqueueStyle( |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | public function getClasses() { |
32 | 32 | |
33 | 33 | // Include the include lists. The including file reassigns the list(array) to the $_aClassFiles variable. |
34 | - $_aClassFiles = array(); |
|
35 | - include( dirname( $this->sFilePath ) . '/include/loader-class-list.php' ); |
|
34 | + $_aClassFiles = array(); |
|
35 | + include( dirname( $this->sFilePath ).'/include/loader-class-list.php' ); |
|
36 | 36 | $this->_aClassFiles = $_aClassFiles; |
37 | 37 | return $_aClassFiles; |
38 | 38 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if ( $_oRequirementCheck->check() ) { |
61 | 61 | $_oRequirementCheck->deactivatePlugin( |
62 | 62 | $this->sFilePath, |
63 | - __( 'Deactivating the plugin', 'admin-page-framework-loader' ), // additional message |
|
63 | + __( 'Deactivating the plugin', 'admin-page-framework-loader' ), // additional message |
|
64 | 64 | true // is in the activation hook. This will exit the script. |
65 | 65 | ); |
66 | 66 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function setLocalization() { |
76 | 76 | |
77 | 77 | // This plugin does not have messages to be displayed in the front end. |
78 | - if ( ! $this->bIsAdmin ) { |
|
78 | + if ( !$this->bIsAdmin ) { |
|
79 | 79 | return; |
80 | 80 | } |
81 | 81 | |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | load_plugin_textdomain( |
84 | 84 | AdminPageFrameworkLoader_Registry::TEXT_DOMAIN, |
85 | 85 | false, |
86 | - $_sPluginBaseNameDirName . '/' . AdminPageFrameworkLoader_Registry::TEXT_DOMAIN_PATH |
|
86 | + $_sPluginBaseNameDirName.'/'.AdminPageFrameworkLoader_Registry::TEXT_DOMAIN_PATH |
|
87 | 87 | ); |
88 | 88 | |
89 | 89 | load_plugin_textdomain( |
90 | 90 | 'admin-page-framework', |
91 | 91 | false, |
92 | - $_sPluginBaseNameDirName . '/' . AdminPageFrameworkLoader_Registry::TEXT_DOMAIN_PATH |
|
92 | + $_sPluginBaseNameDirName.'/'.AdminPageFrameworkLoader_Registry::TEXT_DOMAIN_PATH |
|
93 | 93 | ); |
94 | 94 | |
95 | 95 | } |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | |
113 | 113 | // Loader plugin admin pages. |
114 | 114 | new AdminPageFrameworkLoader_AdminPage( |
115 | - AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ], // the option key |
|
115 | + AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ], // the option key |
|
116 | 116 | $this->sFilePath // caller script path |
117 | 117 | ); |
118 | 118 | |
119 | 119 | // Network admin pages. |
120 | 120 | if ( is_network_admin() ) { |
121 | 121 | new AdminPageFrameworkLoader_NetworkAdmin( |
122 | - AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ], // the option key |
|
122 | + AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ], // the option key |
|
123 | 123 | $this->sFilePath // caller script path |
124 | 124 | ); |
125 | 125 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | private function _shouldShowAdminPages() { |
141 | 141 | |
142 | - if ( ! $this->bIsAdmin ) { |
|
142 | + if ( !$this->bIsAdmin ) { |
|
143 | 143 | return false; |
144 | 144 | } |
145 | 145 | if ( AdminPageFrameworkLoader_Utility::isSilentMode() ) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | AdminPageFrameworkLoader_Registry::NAME |
59 | 59 | ); |
60 | 60 | |
61 | - if ( $_oRequirementCheck->check() ) { |
|
61 | + if ( $_oRequirementCheck->check() ) { |
|
62 | 62 | $_oRequirementCheck->deactivatePlugin( |
63 | 63 | $this->sFilePath, |
64 | 64 | __( 'Deactivating the plugin', 'admin-page-framework-loader' ), // additional message |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | public function setLocalization() { |
77 | 77 | |
78 | 78 | // This plugin does not have messages to be displayed in the front end. |
79 | - if ( ! $this->bIsAdmin ) { |
|
79 | + if ( ! $this->bIsAdmin ) { |
|
80 | 80 | return; |
81 | 81 | } |
82 | 82 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function start() { |
27 | 27 | |
28 | - if ( ! is_admin() ) { |
|
28 | + if ( !is_admin() ) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | // When newly installed, the 'welcomed' value is not set. |
49 | 49 | $_oOption = AdminPageFrameworkLoader_Option::getInstance(); |
50 | - if ( ! $_oOption->get( 'welcomed' ) ) { |
|
50 | + if ( !$_oOption->get( 'welcomed' ) ) { |
|
51 | 51 | $this->_setInitialOptions( $_oOption, AdminPageFrameworkLoader_Registry::VERSION ); |
52 | 52 | $this->_goToWelcomePage(); // will exit |
53 | 53 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | private function _goToWelcomePage() { |
74 | 74 | |
75 | 75 | $_sWelcomePageURL = apply_filters( |
76 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url', |
|
76 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_welcome_redirect_url', |
|
77 | 77 | add_query_arg( |
78 | 78 | array( 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ] ), |
79 | 79 | admin_url( 'index.php' ) // Dashboard |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | public function setUp() { |
94 | 94 | |
95 | 95 | $_oOption = AdminPageFrameworkLoader_Option::getInstance(); |
96 | - if ( ! $_oOption->get( 'enable_admin_pages' ) ) { |
|
96 | + if ( !$_oOption->get( 'enable_admin_pages' ) ) { |
|
97 | 97 | return; |
98 | 98 | } |
99 | 99 | |
100 | - $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]; |
|
100 | + $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]; |
|
101 | 101 | |
102 | 102 | // Root page |
103 | 103 | $this->setRootMenuPage( |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | $this->addSubMenuItems( |
109 | 109 | array( |
110 | 110 | 'title' => AdminPageFrameworkLoader_Registry::SHORTNAME, |
111 | - 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug |
|
111 | + 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug |
|
112 | 112 | 'show_in_menu' => false, |
113 | 113 | 'style' => array( |
114 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/about.css', |
|
115 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css', |
|
116 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.css', |
|
114 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/about.css', |
|
115 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css', |
|
116 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.css', |
|
117 | 117 | version_compare( $GLOBALS[ 'wp_version' ], '3.8', '<' ) |
118 | 118 | ? ".about-wrap .introduction h2 { |
119 | 119 | padding: 1em; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | }", |
128 | 128 | ), |
129 | 129 | 'script' => array( |
130 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.js', |
|
130 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.js', |
|
131 | 131 | "jQuery( document ).ready( function() { |
132 | 132 | jQuery( '.apf-badge-image' ).mflip(); |
133 | 133 | } );", |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it. |
139 | 139 | |
140 | 140 | // Hook |
141 | - add_action( "load_" . $this->oProp->sClassName, array( $this, 'replyToLoadClassPages' ) ); |
|
142 | - add_action( "load_" . AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) ); |
|
141 | + add_action( "load_".$this->oProp->sClassName, array( $this, 'replyToLoadClassPages' ) ); |
|
142 | + add_action( "load_".AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) ); |
|
143 | 143 | |
144 | 144 | } |
145 | 145 | |
@@ -165,14 +165,14 @@ discard block |
||
165 | 165 | |
166 | 166 | $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]; |
167 | 167 | new AdminPageFrameworkLoader_AdminPageWelcome_Welcome( |
168 | - $this, // factory object |
|
169 | - $_sPageSlug, // page slug |
|
168 | + $this, // factory object |
|
169 | + $_sPageSlug, // page slug |
|
170 | 170 | array( |
171 | 171 | 'tab_slug' => 'welcome', |
172 | 172 | // 'title' => __( "What's New", 'admin-page-framework-loader' ), // ' |
173 | 173 | 'style' => array( |
174 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css', |
|
175 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css', |
|
174 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css', |
|
175 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css', |
|
176 | 176 | ), |
177 | 177 | ) |
178 | 178 | ); |
@@ -201,24 +201,24 @@ discard block |
||
201 | 201 | */ |
202 | 202 | public function replyToFilterContentTop( $sContent ) { |
203 | 203 | |
204 | - $_sVersion = '- ' . AdminPageFrameworkLoader_Registry::VERSION; |
|
205 | - $_sPluginName = AdminPageFrameworkLoader_Registry::SHORTNAME . ' ' . $_sVersion; |
|
204 | + $_sVersion = '- '.AdminPageFrameworkLoader_Registry::VERSION; |
|
205 | + $_sPluginName = AdminPageFrameworkLoader_Registry::SHORTNAME.' '.$_sVersion; |
|
206 | 206 | |
207 | 207 | $_sBadgeURL = esc_url( AdminPageFrameworkLoader_Registry::getPluginURL( 'asset/image/icon-128x128.png' ) ); |
208 | 208 | |
209 | 209 | $_aOutput = array(); |
210 | - $_aOutput[] = "<h1>" |
|
210 | + $_aOutput[ ] = "<h1>" |
|
211 | 211 | . sprintf( __( 'Welcome to %1$s', 'admin-page-framework-loader' ), $_sPluginName ) |
212 | 212 | . "</h1>"; |
213 | - $_aOutput[] = "<div class='about-text'>" |
|
213 | + $_aOutput[ ] = "<div class='about-text'>" |
|
214 | 214 | . sprintf( __( 'Thank you for updating to the latest version! %1$s is ready to make your plugin or theme development faster, more organized and better!', 'admin-page-framework-loader' ), $_sPluginName ) |
215 | 215 | . "</div>"; |
216 | - $_aOutput[] = '' |
|
216 | + $_aOutput[ ] = '' |
|
217 | 217 | . "<div class='apf-badge'>" |
218 | 218 | . "<div class='apf-badge-image m-flip'>" |
219 | 219 | . "<img src='{$_sBadgeURL}' />" |
220 | 220 | . "</div>" |
221 | - . "<span class='label'>" . sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion ) . "</span>" |
|
221 | + . "<span class='label'>".sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion )."</span>" |
|
222 | 222 | . "</div>"; |
223 | 223 | |
224 | 224 | return implode( PHP_EOL, $_aOutput ) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | // When newly installed, the 'welcomed' value is not set. |
49 | 49 | $_oOption = AdminPageFrameworkLoader_Option::getInstance(); |
50 | - if ( ! $_oOption->get( 'welcomed' ) ) { |
|
50 | + if ( ! $_oOption->get( 'welcomed' ) ) { |
|
51 | 51 | $this->_setInitialOptions( $_oOption, AdminPageFrameworkLoader_Registry::VERSION ); |
52 | 52 | $this->_goToWelcomePage(); // will exit |
53 | 53 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | } |
72 | 72 | |
73 | - private function _goToWelcomePage() { |
|
73 | + private function _goToWelcomePage() { |
|
74 | 74 | |
75 | 75 | $_sWelcomePageURL = apply_filters( |
76 | 76 | AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url', |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function start() { |
20 | 20 | |
21 | - if ( ! $this->oProp->bIsAdmin ) { |
|
21 | + if ( !$this->oProp->bIsAdmin ) { |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 | |
25 | 25 | // Allows the user to switch the menu visibility. |
26 | - if ( isset( $_GET['enable_apfl_admin_pages'] ) ) { |
|
26 | + if ( isset( $_GET[ 'enable_apfl_admin_pages' ] ) ) { |
|
27 | 27 | |
28 | 28 | // Update the options and reload the page |
29 | 29 | $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] ); |
@@ -67,15 +67,15 @@ discard block |
||
67 | 67 | public function setUp() { |
68 | 68 | |
69 | 69 | $_aOptions = $this->oProp->aOptions; |
70 | - $_bAdminPageEnabled = ! is_array( $_aOptions ) // for the first time of loading, the option is not set and it is not an array. |
|
71 | - || ( isset( $_aOptions['enable_admin_pages'] ) && $_aOptions['enable_admin_pages'] ); |
|
70 | + $_bAdminPageEnabled = !is_array( $_aOptions ) // for the first time of loading, the option is not set and it is not an array. |
|
71 | + || ( isset( $_aOptions[ 'enable_admin_pages' ] ) && $_aOptions[ 'enable_admin_pages' ] ); |
|
72 | 72 | |
73 | 73 | // Set up pages |
74 | 74 | if ( $_bAdminPageEnabled ) { |
75 | 75 | |
76 | 76 | $this->setRootMenuPage( |
77 | - AdminPageFrameworkLoader_Registry::SHORTNAME, // menu slug |
|
78 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/image/wp-logo_16x16.png', // menu icon |
|
77 | + AdminPageFrameworkLoader_Registry::SHORTNAME, // menu slug |
|
78 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/image/wp-logo_16x16.png', // menu icon |
|
79 | 79 | 4 // menu position |
80 | 80 | ); |
81 | 81 | |
@@ -86,19 +86,19 @@ discard block |
||
86 | 86 | 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ], |
87 | 87 | 'title' => __( 'Tools', 'admin-page-framework-loader' ), |
88 | 88 | 'style' => array( |
89 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css', |
|
90 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css' |
|
89 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css', |
|
90 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css' |
|
91 | 91 | ), |
92 | 92 | ) |
93 | 93 | ); |
94 | 94 | new AdminPageFrameworkLoader_AdminPage_Addon( |
95 | 95 | $this, |
96 | 96 | array( |
97 | - 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ], // page slug |
|
97 | + 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ], // page slug |
|
98 | 98 | 'title' => __( 'Add Ons', 'admin-page-framework-loader' ), |
99 | 99 | 'style' => array( |
100 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css', |
|
101 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css' |
|
100 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css', |
|
101 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css' |
|
102 | 102 | ), |
103 | 103 | ) |
104 | 104 | ); |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | 'title' => __( 'Help', 'admin-page-framework-loader' ), |
110 | 110 | 'order' => 1000, // to be the last menu item |
111 | 111 | 'style' => array( |
112 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css', |
|
113 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css' |
|
112 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css', |
|
113 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css' |
|
114 | 114 | ), |
115 | 115 | ) |
116 | 116 | ); |
117 | 117 | |
118 | - add_action( 'load_' . $this->oProp->sClassName, array( $this, 'replyToDoPageSettings' ) ); |
|
118 | + add_action( 'load_'.$this->oProp->sClassName, array( $this, 'replyToDoPageSettings' ) ); |
|
119 | 119 | |
120 | 120 | } |
121 | 121 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private function _addActionLinks( $_bAdminPageEnabled, $_aOptions ) { |
130 | 130 | |
131 | - if ( 'plugins.php' !== $this->oProp->sPageNow ) { |
|
131 | + if ( 'plugins.php' !== $this->oProp->sPageNow ) { |
|
132 | 132 | return; |
133 | 133 | } |
134 | 134 | |
@@ -152,24 +152,24 @@ discard block |
||
152 | 152 | * @return string |
153 | 153 | */ |
154 | 154 | private function _getAdminURLTools( $_bAdminPageEnabled ) { |
155 | - if ( ! $_bAdminPageEnabled ) { |
|
155 | + if ( !$_bAdminPageEnabled ) { |
|
156 | 156 | return; |
157 | 157 | } |
158 | - $_sLink = esc_url( |
|
158 | + $_sLink = esc_url( |
|
159 | 159 | add_query_arg( |
160 | 160 | array( |
161 | - 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['tool'], |
|
161 | + 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ], |
|
162 | 162 | ), |
163 | 163 | admin_url( 'admin.php' ) |
164 | 164 | ) |
165 | 165 | ); |
166 | - return "<a href='{$_sLink}'>" . __( 'Tools', 'admin-page-framework-loader' ) . "</a>"; |
|
166 | + return "<a href='{$_sLink}'>".__( 'Tools', 'admin-page-framework-loader' )."</a>"; |
|
167 | 167 | } |
168 | 168 | /** |
169 | 169 | * Returns the Enable /Disable Admin Pages link. |
170 | 170 | */ |
171 | 171 | private function _getAdminPageSwitchLink( $bEnabled ) { |
172 | - $_sLink = esc_url( |
|
172 | + $_sLink = esc_url( |
|
173 | 173 | add_query_arg( |
174 | 174 | array( |
175 | 175 | 'enable_apfl_admin_pages' => $bEnabled ? 0 : 1, |
@@ -177,19 +177,19 @@ discard block |
||
177 | 177 | ) |
178 | 178 | ); |
179 | 179 | return $bEnabled |
180 | - ? "<a href='{$_sLink}'>" . __( 'Disable Admin Pages', 'admin-page-framework-loader' ) . "</a>" |
|
181 | - : "<a href='{$_sLink}'>" . __( 'Enable Admin Pages', 'admin-page-framework-loader' ) . "</a>"; |
|
180 | + ? "<a href='{$_sLink}'>".__( 'Disable Admin Pages', 'admin-page-framework-loader' )."</a>" |
|
181 | + : "<a href='{$_sLink}'>".__( 'Enable Admin Pages', 'admin-page-framework-loader' )."</a>"; |
|
182 | 182 | } |
183 | 183 | /** |
184 | 184 | * Returns the switch link of the demo pages. |
185 | 185 | */ |
186 | - private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions=array() ) { |
|
186 | + private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions = array() ) { |
|
187 | 187 | |
188 | - if ( ! $_bAdminPageEnabled ) { |
|
188 | + if ( !$_bAdminPageEnabled ) { |
|
189 | 189 | return ''; |
190 | 190 | } |
191 | - $_bEnabled = isset( $mOptions['enable_demo'] ) && $mOptions['enable_demo']; |
|
192 | - $_sLink = esc_url( |
|
191 | + $_bEnabled = isset( $mOptions[ 'enable_demo' ] ) && $mOptions[ 'enable_demo' ]; |
|
192 | + $_sLink = esc_url( |
|
193 | 193 | add_query_arg( |
194 | 194 | array( |
195 | 195 | 'enable_apfl_demo_pages' => $_bEnabled ? 0 : 1, |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | ) |
198 | 198 | ); |
199 | 199 | return $_bEnabled |
200 | - ? "<a href='{$_sLink}'>" . __( 'Disable Demo', 'admin-page-framework-loader' ) . "</a>" |
|
201 | - : "<a href='{$_sLink}'><strong id='activate-demo-action-link' style='font-size: 1em;'>" . __( 'Enable Demo', 'admin-page-framework-loader' ) . "</strong></a>"; |
|
200 | + ? "<a href='{$_sLink}'>".__( 'Disable Demo', 'admin-page-framework-loader' )."</a>" |
|
201 | + : "<a href='{$_sLink}'><strong id='activate-demo-action-link' style='font-size: 1em;'>".__( 'Enable Demo', 'admin-page-framework-loader' )."</strong></a>"; |
|
202 | 202 | |
203 | 203 | } |
204 | 204 | |
@@ -214,14 +214,14 @@ discard block |
||
214 | 214 | |
215 | 215 | // Page meta boxes |
216 | 216 | new AdminPageFrameworkLoader_AdminPageMetaBox_Notification( |
217 | - null, // meta box id - passing null will make it auto generate |
|
217 | + null, // meta box id - passing null will make it auto generate |
|
218 | 218 | __( 'Notification', 'admin-page-framework-loader' ), // title |
219 | 219 | array( // page slugs |
220 | 220 | AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ], |
221 | 221 | AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ], |
222 | 222 | AdminPageFrameworkLoader_Registry::$aAdminPages[ 'help' ], |
223 | 223 | ), |
224 | - 'side', // context |
|
224 | + 'side', // context |
|
225 | 225 | 'default' // priority |
226 | 226 | ); |
227 | 227 |
@@ -19,8 +19,8 @@ |
||
19 | 19 | public function replyToLoadPage( $oFactory ) { |
20 | 20 | |
21 | 21 | new AdminPageFrameworkLoader_AdminPage_Addon_Top( |
22 | - $oFactory, // factory object |
|
23 | - $this->sPageSlug, // page slug |
|
22 | + $oFactory, // factory object |
|
23 | + $this->sPageSlug, // page slug |
|
24 | 24 | array( // tab definition |
25 | 25 | 'tab_slug' => 'top', |
26 | 26 | 'title' => __( 'Add Ons', 'admin-page-framework-loader' ), |
@@ -274,7 +274,7 @@ |
||
274 | 274 | $this->aCustomFieldTypes, |
275 | 275 | array( $sParsingClassName, 'text_domain' ) |
276 | 276 | ); |
277 | - if ( $_sFieldTypeTextDomain ) { |
|
277 | + if ( $_sFieldTypeTextDomain ) { |
|
278 | 278 | $_aSearches[] = $_sFieldTypeTextDomain; |
279 | 279 | $_aReplaces[] = $_sUserTextDomain; |
280 | 280 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'class_name' => 'AceCustomFieldType', |
89 | 89 | 'label' => __( 'ACE', 'admin-page-framework-loader' ), |
90 | 90 | 'description' => __( 'provides code syntax highlighting in a text area field.', 'admin-page-framework-loader' ), |
91 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/ace-custom-field-type', |
|
91 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/ace-custom-field-type', |
|
92 | 92 | 'archive_file_path' => 'custom-field-types/ace-custom-field-type/AceCustomFieldType.php', |
93 | 93 | 'archive_dir_path' => 'custom-field-types/ace-custom-field-type', |
94 | 94 | 'text_domain' => 'admin-page-framework', |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'class_name' => 'GitHubCustomFieldType', |
98 | 98 | 'label' => __( 'GitHub Buttons', 'admin-page-framework-loader' ), |
99 | 99 | 'description' => __( 'allows you to display GitHub buttons in a field.', 'admin-page-framework-loader' ), |
100 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/include/library/github-custom-field-type', |
|
100 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/include/library/github-custom-field-type', |
|
101 | 101 | 'archive_file_path' => 'custom-field-types/github-custom-field-type/GitHubCustomFieldType.php', |
102 | 102 | 'archive_dir_path' => 'custom-field-types/github-custom-field-type', |
103 | 103 | 'text_domain' => 'admin-page-framework', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'class_name' => 'PathCustomFieldType', |
107 | 107 | 'label' => __( 'Path', 'admin-page-framework-loader' ), |
108 | 108 | 'description' => __( 'allows the user to select a file path on the server.', 'admin-page-framework-loader' ), |
109 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/path-custom-field-type', |
|
109 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/path-custom-field-type', |
|
110 | 110 | 'archive_file_path' => 'custom-field-types/path-custom-field-type/PathCustomFieldType.php', |
111 | 111 | 'archive_dir_path' => 'custom-field-types/path-custom-field-type', |
112 | 112 | 'text_domain' => 'admin-page-framework', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'class_name' => 'ToggleCustomFieldType', |
116 | 116 | 'label' => __( 'Toggle', 'admin-page-framework-loader' ), |
117 | 117 | 'description' => __( 'allows the user to switch a button.', 'admin-page-framework-loader' ), |
118 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/toggle-custom-field-type', |
|
118 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/toggle-custom-field-type', |
|
119 | 119 | 'archive_file_path' => 'custom-field-types/toggle-custom-field-type/ToggleCustomFieldType.php', |
120 | 120 | 'archive_dir_path' => 'custom-field-types/toggle-custom-field-type', |
121 | 121 | 'text_domain' => 'admin-page-framework', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'class_name' => 'NoUISliderCustomFieldType', |
125 | 125 | 'label' => __( 'NoUISlider (Range Slider)', 'admin-page-framework-loader' ), |
126 | 126 | 'description' => __( 'allows the user to set values in ranges.', 'admin-page-framework-loader' ), |
127 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/nouislider-custom-field-type', |
|
127 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/nouislider-custom-field-type', |
|
128 | 128 | 'archive_file_path' => 'custom-field-types/nouislider-custom-field-type/NoUISliderCustomFieldType.php', |
129 | 129 | 'archive_dir_path' => 'custom-field-types/nouislider-custom-field-type', |
130 | 130 | 'text_domain' => 'admin-page-framework', |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'class_name' => 'Select2CustomFieldType', |
134 | 134 | 'label' => __( 'Select2', 'admin-page-framework-loader' ), |
135 | 135 | 'description' => __( 'allows the user to select items with autocomplete from a list which can be populated with AJAX.', 'admin-page-framework-loader' ), |
136 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/select2-custom-field-type', |
|
136 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/select2-custom-field-type', |
|
137 | 137 | 'archive_file_path' => 'custom-field-types/select2-custom-field-type/Select2CustomFieldType.php', |
138 | 138 | 'archive_dir_path' => 'custom-field-types/select2-custom-field-type', |
139 | 139 | 'text_domain' => 'admin-page-framework', |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'class_name' => 'PostTypeTaxonomyCustomFieldType', |
143 | 143 | 'label' => __( 'Post Type Taxonomy', 'admin-page-framework-loader' ), |
144 | 144 | 'description' => __( 'allows the user to select taxonomy terms of selected post types.', 'admin-page-framework-loader' ), |
145 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/post_type_taxonomy_field-type', |
|
145 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/post_type_taxonomy_field-type', |
|
146 | 146 | 'archive_file_path' => 'custom-field-types/post_type_taxonomy_field-type/PostTypeTaxonomyCustomFieldType.php', |
147 | 147 | 'archive_dir_path' => 'custom-field-types/post_type_taxonomy_field-type', |
148 | 148 | 'text_domain' => 'admin-page-framework', |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | |
152 | 152 | // Let third-party scripts add custom field types. |
153 | 153 | $this->aCustomFieldTypes = apply_filters( |
154 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_custom_field_types', |
|
154 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_custom_field_types', |
|
155 | 155 | $this->aCustomFieldTypes |
156 | 156 | ); |
157 | 157 | |
158 | - foreach( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
158 | + foreach ( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
159 | 159 | $this->aCustomFieldTypeLabels[ $_sKey ] = $_aCustomFieldType[ 'label' ] |
160 | - . ' - <span class="description">' . $_aCustomFieldType[ 'description' ] . '</span>'; |
|
160 | + . ' - <span class="description">'.$_aCustomFieldType[ 'description' ].'</span>'; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | } |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | |
174 | 174 | // Check the file extension. |
175 | 175 | $_aAllowedExtensions = apply_filters( |
176 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions', |
|
176 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions', |
|
177 | 177 | array( 'php', 'css', 'js' ) |
178 | 178 | ); |
179 | - if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) { |
|
179 | + if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) { |
|
180 | 180 | return $sFileContents; |
181 | 181 | } |
182 | 182 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | private function _getModifiedInclusionList( $sFileContents ) { |
207 | 207 | return str_replace( |
208 | 208 | ');', // search |
209 | - $this->_getClassListOfCustomFieldTypes() . ');', // replace - @todo insert the selected class list here |
|
209 | + $this->_getClassListOfCustomFieldTypes().');', // replace - @todo insert the selected class list here |
|
210 | 210 | $sFileContents // subject |
211 | 211 | ); |
212 | 212 | } |
@@ -223,18 +223,18 @@ discard block |
||
223 | 223 | $_POST, |
224 | 224 | array( |
225 | 225 | $this->oFactory->oProp->sOptionKey, |
226 | - 'generator', // section id |
|
226 | + 'generator', // section id |
|
227 | 227 | 'class_prefix' // field id |
228 | 228 | ), |
229 | 229 | '' |
230 | 230 | ); |
231 | 231 | $_aOutput = array(); |
232 | - foreach( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
233 | - $_aOutput[] = ' "' . $_sClassPrefix . $_sClassName . '"' |
|
232 | + foreach ( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
233 | + $_aOutput[ ] = ' "'.$_sClassPrefix.$_sClassName.'"' |
|
234 | 234 | . ' => ' |
235 | - . 'AdminPageFramework_Registry::$sDirPath . ' . '"/' . ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ) . '",'; |
|
235 | + . 'AdminPageFramework_Registry::$sDirPath . '.'"/'.ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ).'",'; |
|
236 | 236 | } |
237 | - return implode( PHP_EOL, $_aOutput ) . PHP_EOL; |
|
237 | + return implode( PHP_EOL, $_aOutput ).PHP_EOL; |
|
238 | 238 | |
239 | 239 | } |
240 | 240 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $this->aCustomFieldTypes // ArchiveFilePaths |
253 | 253 | ); |
254 | 254 | $_aArchiveFilePaths = array(); |
255 | - foreach( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
255 | + foreach ( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
256 | 256 | $_aArchiveFilePaths[ $_sClassName ] = $this->oFactory->oUtil->getElement( |
257 | 257 | $_aCustomFieldType, |
258 | 258 | 'archive_file_path', |
@@ -304,17 +304,17 @@ discard block |
||
304 | 304 | array( $sParsingClassName, 'text_domain' ) |
305 | 305 | ); |
306 | 306 | if ( $_sFieldTypeTextDomain ) { |
307 | - $_aSearches[] = $_sFieldTypeTextDomain; |
|
308 | - $_aReplaces[] = $_sUserTextDomain; |
|
307 | + $_aSearches[ ] = $_sFieldTypeTextDomain; |
|
308 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
309 | 309 | } |
310 | 310 | |
311 | - $_aSearches[] = 'admin-page-framework'; |
|
312 | - $_aReplaces[] = $_sUserTextDomain; |
|
311 | + $_aSearches[ ] = 'admin-page-framework'; |
|
312 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
313 | 313 | |
314 | 314 | // Return the converted string. |
315 | 315 | return str_replace( |
316 | - $_aSearches, // search |
|
317 | - $_aReplaces, // replace |
|
316 | + $_aSearches, // search |
|
317 | + $_aReplaces, // replace |
|
318 | 318 | $sFileContents // subject |
319 | 319 | ); |
320 | 320 | |
@@ -332,8 +332,8 @@ discard block |
||
332 | 332 | ); |
333 | 333 | |
334 | 334 | return preg_replace( |
335 | - $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
336 | - $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
335 | + $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
336 | + $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
337 | 337 | $sFileContents // subject |
338 | 338 | ); |
339 | 339 | |
@@ -346,8 +346,8 @@ discard block |
||
346 | 346 | private function _getClassPrefixRegexPatterns( array $aSelectedFieldTypeClassNames ) { |
347 | 347 | |
348 | 348 | $_aPregSearches = array(); |
349 | - foreach( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
350 | - $_aPregSearches[] = '/(?<=[^a-zA-Z0-9])(' . $_sClassName . ')/'; |
|
349 | + foreach ( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
350 | + $_aPregSearches[ ] = '/(?<=[^a-zA-Z0-9])('.$_sClassName.')/'; |
|
351 | 351 | } |
352 | 352 | return $_aPregSearches; |
353 | 353 | |
@@ -359,9 +359,9 @@ discard block |
||
359 | 359 | */ |
360 | 360 | private function _getClassPrefixRegexReplacements( array $aSelectedFieldTypeClassNames ) { |
361 | 361 | |
362 | - $_aPrefixedClassNames = $aSelectedFieldTypeClassNames; |
|
362 | + $_aPrefixedClassNames = $aSelectedFieldTypeClassNames; |
|
363 | 363 | array_walk( |
364 | - $_aPrefixedClassNames, // passed by reference |
|
364 | + $_aPrefixedClassNames, // passed by reference |
|
365 | 365 | array( $this, '_replyToSetPrefix' ), |
366 | 366 | $this->oFactory->oUtil->getElement( |
367 | 367 | $_POST, |
@@ -382,8 +382,8 @@ discard block |
||
382 | 382 | * @callback function array_walk |
383 | 383 | * @return string |
384 | 384 | */ |
385 | - public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix='' ) { |
|
386 | - $sClassName = $sPrefix . '$0'; |
|
385 | + public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix = '' ) { |
|
386 | + $sClassName = $sPrefix.'$0'; |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | |
@@ -404,12 +404,12 @@ discard block |
||
404 | 404 | */ |
405 | 405 | public function replyToSetAdditionalDirectoriesForGenerator( $aDirPaths ) { |
406 | 406 | |
407 | - $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
407 | + $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
408 | 408 | $this->aCustomFieldTypes |
409 | 409 | ); |
410 | 410 | |
411 | 411 | $_aDirPathInfo = array(); |
412 | - foreach( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
412 | + foreach ( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
413 | 413 | |
414 | 414 | $_sArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'archive_dir_path' ); |
415 | 415 | $_sSourceDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'directory_path' ); |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * @return array The array keys of the checked items. |
426 | 426 | * @since 3.6.0 |
427 | 427 | */ |
428 | - private function _getSelectedCustomFieldTypes( array $aSubject=array() ) { |
|
428 | + private function _getSelectedCustomFieldTypes( array $aSubject = array() ) { |
|
429 | 429 | |
430 | 430 | $_aCheckedCustomFieldTypes = $this->oFactory->oUtil->getElementAsArray( |
431 | 431 | $_POST, |
@@ -21,8 +21,8 @@ |
||
21 | 21 | public function replyToDoTab( /* $oFactory */ ) { |
22 | 22 | |
23 | 23 | echo $this->_getReadmeContents( |
24 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
25 | - '', // no TOC |
|
24 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
25 | + '', // no TOC |
|
26 | 26 | array( 'Support' ) |
27 | 27 | ); |
28 | 28 |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | |
26 | 26 | // Tabs |
27 | 27 | new AdminPageFrameworkLoader_AdminPage_Help_Information( |
28 | - $oFactory, // factory object |
|
29 | - $this->sPageSlug, // page slug |
|
28 | + $oFactory, // factory object |
|
29 | + $this->sPageSlug, // page slug |
|
30 | 30 | array( // tab definition |
31 | 31 | 'tab_slug' => 'information', |
32 | 32 | 'title' => __( 'Support', 'admin-page-framework-loader' ), |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | 'title' => __( 'Getting Started', 'admin-page-framework-loader' ), |
41 | 41 | 'url' => add_query_arg( |
42 | 42 | array( |
43 | - 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['about'], |
|
43 | + 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], |
|
44 | 44 | // 'tab' => 'guide', |
45 | 45 | ), |
46 | 46 | admin_url( 'index.php' ) // Dashboard |
47 | - ) . '#section-getting_started__' |
|
47 | + ).'#section-getting_started__' |
|
48 | 48 | ) |
49 | 49 | ); |
50 | 50 | new AdminPageFrameworkLoader_AdminPage_Help_FAQ( |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'title' => __( 'About', 'admin-page-framework-loader' ), |
88 | 88 | 'url' => add_query_arg( |
89 | 89 | array( |
90 | - 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['about'] |
|
90 | + 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ] |
|
91 | 91 | ), |
92 | 92 | admin_url( 'index.php' ) // Dashboard |
93 | 93 | ) |
@@ -105,17 +105,17 @@ discard block |
||
105 | 105 | |
106 | 106 | // Page meta boxes |
107 | 107 | new AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks( |
108 | - null, // meta box id - passing null will make it auto generate |
|
108 | + null, // meta box id - passing null will make it auto generate |
|
109 | 109 | __( 'Resources', 'admin-page-framework-loader' ), // title |
110 | 110 | array( // page slugs |
111 | 111 | AdminPageFrameworkLoader_Registry::$aAdminPages[ 'help' ], |
112 | 112 | ), |
113 | - 'side', // context |
|
113 | + 'side', // context |
|
114 | 114 | 'default' // priority |
115 | 115 | ); |
116 | 116 | |
117 | 117 | $oFactory->enqueueStyle( |
118 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/help.css', |
|
118 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/help.css', |
|
119 | 119 | $this->sPageSlug |
120 | 120 | ); |
121 | 121 |