@@ -74,6 +74,8 @@ discard block |
||
74 | 74 | * <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> |
75 | 75 | * </ul> |
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 | + * @param string $sIcon16x16 |
|
78 | + * @param integer $iMenuPosition |
|
77 | 79 | * @return void |
78 | 80 | */ |
79 | 81 | public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) { |
@@ -96,6 +98,7 @@ discard block |
||
96 | 98 | * |
97 | 99 | * @since 2.0.0 |
98 | 100 | * @internal |
101 | + * @param string $sMenuLabel |
|
99 | 102 | * @return void|string Returns the associated slug string, if true. |
100 | 103 | */ |
101 | 104 | private function _isBuiltInMenuItem( $sMenuLabel ) { |
@@ -160,9 +163,6 @@ discard block |
||
160 | 163 | * @since 3.0.0 Changed the scope to public. |
161 | 164 | * @remark The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug. |
162 | 165 | * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
163 | - * @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. |
|
164 | - * @param array $aSubMenuItem2 (optional) a second sub-menu array. |
|
165 | - * @param array $_and_more (optional) a third and add items as many as necessary with next parameters. |
|
166 | 166 | * @access public |
167 | 167 | * @return void |
168 | 168 | */ |
@@ -250,20 +250,20 @@ |
||
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
253 | - * Adds the given link into the menu on the left sidebar of the administration panel. |
|
254 | - * |
|
255 | - * @since 2.0.0 |
|
256 | - * @since 3.0.0 Changed the scope to public from protected. |
|
257 | - * @since 3.5.0 Changed the scope to public as it was still protected. |
|
258 | - * @param string the menu title. |
|
259 | - * @param string the URL linked to the menu. |
|
260 | - * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
261 | - * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
262 | - * @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. |
|
263 | - * @access public |
|
264 | - * @return void |
|
265 | - * @internal |
|
266 | - */ |
|
253 | + * Adds the given link into the menu on the left sidebar of the administration panel. |
|
254 | + * |
|
255 | + * @since 2.0.0 |
|
256 | + * @since 3.0.0 Changed the scope to public from protected. |
|
257 | + * @since 3.5.0 Changed the scope to public as it was still protected. |
|
258 | + * @param string the menu title. |
|
259 | + * @param string the URL linked to the menu. |
|
260 | + * @param string (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>. |
|
261 | + * @param string (optional) the order number. The larger it is, the lower the position it gets. |
|
262 | + * @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. |
|
263 | + * @access public |
|
264 | + * @return void |
|
265 | + * @internal |
|
266 | + */ |
|
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
@@ -76,7 +76,7 @@ discard block |
||
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 |
@@ -267,16 +267,16 @@ discard block |
||
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
270 | + if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
271 | 271 | return; |
272 | 272 | } |
273 | 273 | |
274 | 274 | // If the set URL is not valid, return. |
275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
275 | + if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
276 | 276 | return; |
277 | 277 | } |
278 | 278 | |
279 | - $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
279 | + $_oFormatter = new AdminPageFramework_Format_SubMenuLink( |
|
280 | 280 | $aSubMenuLink, |
281 | 281 | $this, |
282 | 282 | count( $this->oProp->aPages ) + 1 |
@@ -334,11 +334,11 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
336 | 336 | |
337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
337 | + if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
338 | 338 | return; |
339 | 339 | } |
340 | 340 | |
341 | - $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
341 | + $_oFormatter = new AdminPageFramework_Format_SubMenuPage( |
|
342 | 342 | $aSubMenuPage, |
343 | 343 | $this, |
344 | 344 | count( $this->oProp->aPages ) + 1 |
@@ -267,12 +267,12 @@ discard block |
||
267 | 267 | public function addSubMenuLink( array $aSubMenuLink ) { |
268 | 268 | |
269 | 269 | // If required keys are not set, return. |
270 | - if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
270 | + if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { |
|
271 | 271 | return; |
272 | 272 | } |
273 | 273 | |
274 | 274 | // If the set URL is not valid, return. |
275 | - if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
275 | + if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { |
|
276 | 276 | return; |
277 | 277 | } |
278 | 278 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | */ |
335 | 335 | public function addSubMenuPage( array $aSubMenuPage ) { |
336 | 336 | |
337 | - if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
337 | + if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { |
|
338 | 338 | return; |
339 | 339 | } |
340 | 340 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package AdminPageFramework |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
13 | +if ( !class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
14 | 14 | /** |
15 | 15 | * Facilitates WordPress plugin and theme development. |
16 | 16 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
62 | 62 | |
63 | 63 | const TEXT_DOMAIN = 'admin-page-framework'; |
64 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
64 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | * Sets up static properties. |
104 | 104 | * @return void |
105 | 105 | */ |
106 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
106 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
107 | 107 | |
108 | 108 | self::$sFilePath = $sFilePath; |
109 | 109 | self::$sDirPath = dirname( self::$sFilePath ); |
110 | - self::$sIncludeClassListPath = self::$sDirPath . '/admin-page-framework-include-class-list.php'; |
|
110 | + self::$sIncludeClassListPath = self::$sDirPath.'/admin-page-framework-include-class-list.php'; |
|
111 | 111 | self::$aClassFiles = self::_getClassFilePathList( self::$sIncludeClassListPath ); |
112 | 112 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
113 | 113 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @return array |
123 | 123 | */ |
124 | 124 | static private function _getClassFilePathList( $sInclusionClassListPath ) { |
125 | - $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
125 | + $aClassFiles = array(); // this will be updated if the inclusion below is successful. |
|
126 | 126 | include( $sInclusionClassListPath ); |
127 | 127 | return $aClassFiles; |
128 | 128 | } |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | */ |
136 | 136 | static public function getVersion() { |
137 | 137 | |
138 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
139 | - trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
138 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
139 | + trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
140 | 140 | return self::VERSION; |
141 | 141 | } |
142 | - $_aMinifiedVesionSuffix = array( |
|
142 | + $_aMinifiedVesionSuffix = array( |
|
143 | 143 | 0 => '', |
144 | 144 | 1 => '.min', |
145 | 145 | ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | endif; |
170 | 170 | |
171 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
171 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
172 | 172 | /** |
173 | 173 | * Loads the Admin Page Framework library. |
174 | 174 | * |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function __construct( $sLibraryPath ) { |
191 | 191 | |
192 | - if ( ! $this->_isLoadable() ) { |
|
192 | + if ( !$this->_isLoadable() ) { |
|
193 | 193 | return; |
194 | 194 | } |
195 | 195 |
@@ -218,8 +218,8 @@ |
||
218 | 218 | * @remark $_aDefaultKeys holds shared default key-values defined in the base class. |
219 | 219 | */ |
220 | 220 | protected $aDefaultKeys = array( |
221 | - 'label_min_width' => '', // disabled as the embedded elements are all inline. |
|
222 | - 'show_debug_info' => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it. |
|
221 | + 'label_min_width' => '', // disabled as the embedded elements are all inline. |
|
222 | + 'show_debug_info' => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it. |
|
223 | 223 | ); |
224 | 224 | |
225 | 225 |
@@ -1,40 +1,40 @@ |
||
1 | 1 | <?php |
2 | 2 | $_aClassFiles = array( |
3 | - "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | - "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | - "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | - "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | - "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | - "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | - "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | - "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | - "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | - "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | - "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | - "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | - "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | - "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | - "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | - "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | - "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | - "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | - "AdminPageFrameworkLoader_AdminPage_Tool_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier.php", |
|
25 | - "AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php", |
|
26 | - "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
27 | - "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
28 | - "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
29 | - "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
30 | - "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
31 | - "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
32 | - "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
33 | - "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
34 | - "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
35 | - "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
36 | - "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
37 | - "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
38 | - "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
39 | - "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
3 | + "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | + "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | + "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | + "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | + "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | + "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | + "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | + "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | + "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | + "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | + "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | + "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | + "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | + "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | + "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | + "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | + "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | + "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | + "AdminPageFrameworkLoader_AdminPage_Tool_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier.php", |
|
25 | + "AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php", |
|
26 | + "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
27 | + "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
28 | + "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
29 | + "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
30 | + "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
31 | + "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
32 | + "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
33 | + "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
34 | + "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
35 | + "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
36 | + "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
37 | + "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
38 | + "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
39 | + "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
40 | 40 | ); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get() { |
57 | 57 | |
58 | 58 | // Get the set value(s) |
59 | - $_mSavedValue = $this->_getStoredInputFieldValue( |
|
59 | + $_mSavedValue = $this->_getStoredInputFieldValue( |
|
60 | 60 | $this->aField, |
61 | 61 | $this->aOptions |
62 | 62 | ); |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | * @return void |
117 | 117 | */ |
118 | 118 | private function _divideMainAndSubFields( $aField, array &$aFirstField, array &$aSubFields ) { |
119 | - foreach( $aField as $_nsIndex => $_mFieldElement ) { |
|
119 | + foreach ( $aField as $_nsIndex => $_mFieldElement ) { |
|
120 | 120 | if ( is_numeric( $_nsIndex ) ) { |
121 | - $aSubFields[] = $_mFieldElement; |
|
121 | + $aSubFields[ ] = $_mFieldElement; |
|
122 | 122 | } else { |
123 | 123 | $aFirstField[ $_nsIndex ] = $_mFieldElement; |
124 | 124 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | // We are collecting elements from the second sub-field. |
145 | 145 | unset( $_aSavedValues[ 0 ] ); |
146 | 146 | |
147 | - foreach( $_aSavedValues as $_iIndex => $vValue ) { |
|
147 | + foreach ( $_aSavedValues as $_iIndex => $vValue ) { |
|
148 | 148 | $aSubFields[ $_iIndex - 1 ] = isset( $aSubFields[ $_iIndex - 1 ] ) && is_array( $aSubFields[ $_iIndex - 1 ] ) |
149 | 149 | ? $aSubFields[ $_iIndex - 1 ] |
150 | 150 | : array(); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | private function _fillSubFields( array &$aSubFields, array $aFirstField ) { |
161 | 161 | |
162 | - foreach( $aSubFields as &$_aSubField ) { |
|
162 | + foreach ( $aSubFields as &$_aSubField ) { |
|
163 | 163 | |
164 | 164 | // Evacuate the label element which should not be merged. |
165 | 165 | $_aLabel = $this->getElement( |
@@ -190,15 +190,15 @@ discard block |
||
190 | 190 | |
191 | 191 | // Determine whether the elements are saved in an array. |
192 | 192 | // $_bHasSubFields = count( $aFields ) > 1 || $aField[ 'repeatable' ] || $aField[ 'sortable' ]; |
193 | - if ( ! $this->hasSubFields( $aFields, $aField ) ) { |
|
193 | + if ( !$this->hasSubFields( $aFields, $aField ) ) { |
|
194 | 194 | $aFields[ 0 ][ '_saved_value' ] = $mSavedValue; |
195 | 195 | $aFields[ 0 ][ '_is_multiple_fields' ] = false; |
196 | 196 | return; |
197 | 197 | } |
198 | 198 | |
199 | - foreach( $aFields as $_iIndex => &$_aThisField ) { |
|
199 | + foreach ( $aFields as $_iIndex => &$_aThisField ) { |
|
200 | 200 | $_aThisField[ '_saved_value' ] = $this->getElement( $mSavedValue, $_iIndex, null ); |
201 | - $_aThisField[ '_subfield_index' ] = $_iIndex; // 3.8.0+ |
|
201 | + $_aThisField[ '_subfield_index' ] = $_iIndex; // 3.8.0+ |
|
202 | 202 | $_aThisField[ '_is_multiple_fields' ] = true; |
203 | 203 | } |
204 | 204 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @since 3.6.0 Moved from `AdminPageFramework_FieldDefinition`. |
213 | 213 | */ |
214 | 214 | private function _setFieldsValue( &$aFields ) { |
215 | - foreach( $aFields as &$_aField ) { |
|
215 | + foreach ( $aFields as &$_aField ) { |
|
216 | 216 | $_aField[ '_is_value_set_by_user' ] = isset( $_aField[ 'value' ] ); |
217 | 217 | $_aField[ 'value' ] = $this->_getSetFieldValue( $_aField ); |
218 | 218 | } |
@@ -257,10 +257,10 @@ discard block |
||
257 | 257 | */ |
258 | 258 | private function _getStoredInputFieldValue( $aField, $aOptions ) { |
259 | 259 | |
260 | - $_aFieldPath = $aField[ '_field_path_array' ]; |
|
260 | + $_aFieldPath = $aField[ '_field_path_array' ]; |
|
261 | 261 | |
262 | 262 | // If a section is not set, check the first dimension element. |
263 | - if ( ! isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) { |
|
263 | + if ( !isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) { |
|
264 | 264 | return $this->getElement( |
265 | 265 | $aOptions, |
266 | 266 | $_aFieldPath, // $aField[ 'field_id' ], // @todo this may have to be a field path instead of field id. |
@@ -254,7 +254,7 @@ |
||
254 | 254 | * @since 3.7.0 Changed the `_field_type` element to `_structure_type`. |
255 | 255 | * @return null|string|array |
256 | 256 | */ |
257 | - private function _getStoredInputFieldValue( $aField, $aOptions ) { |
|
257 | + private function _getStoredInputFieldValue( $aField, $aOptions ) { |
|
258 | 258 | |
259 | 259 | $_aFieldPath = $aField[ '_field_path_array' ]; |
260 | 260 |
@@ -520,7 +520,7 @@ |
||
520 | 520 | return self::getAttributes( |
521 | 521 | array( |
522 | 522 | 'class' => 'repeatable-section-remove-button button-secondary ' |
523 | - . 'repeatable-section-button button button-large', |
|
523 | + . 'repeatable-section-button button button-large', |
|
524 | 524 | 'title' => $oMsg->get( 'remove_section' ), |
525 | 525 | 'style' => $iSectionCount <= 1 |
526 | 526 | ? 'display:none' |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | if ( empty( $asArguments ) ) { |
447 | 447 | return ''; |
448 | 448 | } |
449 | - if ( self::hasBeenCalled( 'repeatable_section_' . $sContainerTagID ) ) { |
|
449 | + if ( self::hasBeenCalled( 'repeatable_section_'.$sContainerTagID ) ) { |
|
450 | 450 | return ''; |
451 | 451 | } |
452 | 452 | |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | $_oFormatter = new AdminPageFramework_Form_Model___Format_RepeatableSection( $asArguments, $oMsg ); |
455 | 455 | $_aArguments = $_oFormatter->get(); |
456 | 456 | $_sButtons = self::___getRepeatableSectionButtons( $_aArguments, $oMsg, $sContainerTagID, $iSectionCount ); |
457 | - $_sButtonsHTML = '"' . $_sButtons . '"'; |
|
457 | + $_sButtonsHTML = '"'.$_sButtons.'"'; |
|
458 | 458 | $_aJSArray = json_encode( $_aArguments ); |
459 | 459 | $_sScript = <<<JAVASCRIPTS |
460 | 460 | jQuery( document ).ready( function() { |
@@ -500,17 +500,17 @@ discard block |
||
500 | 500 | $_sIconAdd = "<span class='dashicons dashicons-plus-alt2'></span>"; |
501 | 501 | } |
502 | 502 | return "<div class='admin-page-framework-repeatable-section-buttons-outer-container'>" |
503 | - . "<div " . self::___getContainerAttributes( $_aArguments, $oMsg ) . ' >' |
|
504 | - . "<a " . self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ) . ">" |
|
503 | + . "<div ".self::___getContainerAttributes( $_aArguments, $oMsg ).' >' |
|
504 | + . "<a ".self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ).">" |
|
505 | 505 | . $_sIconRemove |
506 | 506 | . "</a>" |
507 | - . "<a " . self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ) . ">" |
|
507 | + . "<a ".self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ).">" |
|
508 | 508 | . $_sIconAdd |
509 | 509 | . "</a>" |
510 | 510 | . "</div>" |
511 | 511 | . "</div>" |
512 | 512 | . AdminPageFramework_Form_Utility::getModalForDisabledRepeatableElement( |
513 | - 'repeatable_section_disabled_' . $sContainerTagID, |
|
513 | + 'repeatable_section_disabled_'.$sContainerTagID, |
|
514 | 514 | $_aArguments[ 'disabled' ] |
515 | 515 | ); |
516 | 516 | } |
@@ -526,12 +526,12 @@ discard block |
||
526 | 526 | empty( $aArguments[ 'disabled' ] ) ? '' : 'disabled' |
527 | 527 | ), |
528 | 528 | ); |
529 | - unset( $aArguments[ 'disabled' ][ 'message' ] ); // this element can contain HTML tags. |
|
529 | + unset( $aArguments[ 'disabled' ][ 'message' ] ); // this element can contain HTML tags. |
|
530 | 530 | // Needs to remove it if it is empty as its data attribute will be checked in the JavaScript script. |
531 | 531 | if ( empty( $aArguments[ 'disabled' ] ) ) { |
532 | 532 | unset( $aArguments[ 'disabled' ] ); |
533 | 533 | } |
534 | - return self::getAttributes( $_aAttriubtes ) . ' ' . self::getDataAttributes( $aArguments ); |
|
534 | + return self::getAttributes( $_aAttriubtes ).' '.self::getDataAttributes( $aArguments ); |
|
535 | 535 | } |
536 | 536 | /** |
537 | 537 | * @return string |
@@ -562,10 +562,10 @@ discard block |
||
562 | 562 | . 'repeatable-section-button button button-large', |
563 | 563 | 'title' => $oMsg->get( 'add_section' ), |
564 | 564 | 'data-id' => $sContainerTagID, |
565 | - 'href' => ! empty( $aArguments[ 'disabled' ] ) |
|
566 | - ? '#TB_inline?width=' . $aArguments[ 'disabled' ][ 'box_width' ] |
|
567 | - . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ] |
|
568 | - . '&inlineId=' . 'repeatable_section_disabled_' . $sContainerTagID |
|
565 | + 'href' => !empty( $aArguments[ 'disabled' ] ) |
|
566 | + ? '#TB_inline?width='.$aArguments[ 'disabled' ][ 'box_width' ] |
|
567 | + . '&height='.$aArguments[ 'disabled' ][ 'box_height' ] |
|
568 | + . '&inlineId='.'repeatable_section_disabled_'.$sContainerTagID |
|
569 | 569 | : null, |
570 | 570 | ) |
571 | 571 | ); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | * @since 3.8.13 |
37 | 37 | */ |
38 | 38 | static protected $_aStructure_Disabled = array( |
39 | - 'message' => 'The ability of repeating sections is disabled.', // will be reassigned |
|
40 | - 'caption' => 'Warning', // will be reassigned |
|
39 | + 'message' => 'The ability of repeating sections is disabled.', // will be reassigned |
|
40 | + 'caption' => 'Warning', // will be reassigned |
|
41 | 41 | 'box_width' => 300, |
42 | 42 | 'box_height' => 72, |
43 | 43 | ); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function __construct( /* array $asArguments, $oMsg */ ) { |
56 | 56 | |
57 | - $_aParameters = func_get_args() + array( |
|
57 | + $_aParameters = func_get_args() + array( |
|
58 | 58 | $this->_aArguments, |
59 | 59 | null |
60 | 60 | ); |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | public function get() { |
74 | 74 | |
75 | 75 | $_aArguments = $this->_aArguments + self::$_aStructure; |
76 | - unset( $_aArguments[ 0 ] ); // remove the 0 index element converted from `'repeatable => 'true',`. |
|
77 | - if ( ! empty( $_aArguments[ 'disabled' ] ) ) { |
|
76 | + unset( $_aArguments[ 0 ] ); // remove the 0 index element converted from `'repeatable => 'true',`. |
|
77 | + if ( !empty( $_aArguments[ 'disabled' ] ) ) { |
|
78 | 78 | $_aArguments[ 'disabled' ] = $_aArguments[ 'disabled' ] + array( |
79 | 79 | 'message' => $this->_getDefaultMessage(), |
80 | 80 | 'caption' => $this->_oMsg->get( 'warning_caption' ), |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function _replyToRegisterHelpTabText() { |
30 | 30 | |
31 | 31 | // Check if the currently loaded page is of meta box page. |
32 | - if ( ! $this->oProp->oCaller->isInThePage() ) { |
|
32 | + if ( !$this->oProp->oCaller->isInThePage() ) { |
|
33 | 33 | return false; |
34 | 34 | } |
35 | 35 |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | * @access public |
219 | 219 | * @remark The actual registration will be performed in the `_replyToRegisterSettings()` method with the `admin_menu` hook. |
220 | 220 | * @remark The `$oForm` property should be created in each extended class. |
221 | - * @param array|string $aSection the section array. If a string is passed, it is considered as a target page slug that will be used as a page slug element from the next call so that the element can be omitted. |
|
221 | + * @param array|string $aSectionset the section array. If a string is passed, it is considered as a target page slug that will be used as a page slug element from the next call so that the element can be omitted. |
|
222 | 222 | * <h4>Section Definition Array</h4> |
223 | 223 | * <ul> |
224 | 224 | * <li>**section_id** - (string) the section ID. Avoid using non-alphabetic characters except underscore and numbers.</li> |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | * @since 3.0.0 The scope changed to public to indicate the users will use. |
348 | 348 | * @return void |
349 | 349 | * @remark The $oForm property should be created in each extended class. |
350 | - * @param array|string $asField A field definition array or a string of the target section id. |
|
350 | + * @param array|string $asFieldset A field definition array or a string of the target section id. |
|
351 | 351 | * <h4>Built-in Field Types</h4> |
352 | 352 | * <ul> |
353 | 353 | * <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li> |
@@ -306,18 +306,18 @@ discard block |
||
306 | 306 | } |
307 | 307 | |
308 | 308 | /** |
309 | - * Adds form fields. |
|
310 | - * |
|
311 | - * It inserts the given field definition arrays into the class property and later they are parsed when fields are registered. The field definition array requires specific keys. Refer to the parameter section of this method. |
|
312 | - * |
|
313 | - * @since 2.0.0 |
|
314 | - * @since 3.5.3 Removed the parameter declarations as they are caught with the func_get_args(). |
|
315 | - * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
316 | - * @param array the field definition array. |
|
317 | - * @param array (optional) another field array. |
|
318 | - * @param array (optional) add more field arrays to the next parameters as many as necessary. |
|
319 | - * @return void |
|
320 | - */ |
|
309 | + * Adds form fields. |
|
310 | + * |
|
311 | + * It inserts the given field definition arrays into the class property and later they are parsed when fields are registered. The field definition array requires specific keys. Refer to the parameter section of this method. |
|
312 | + * |
|
313 | + * @since 2.0.0 |
|
314 | + * @since 3.5.3 Removed the parameter declarations as they are caught with the func_get_args(). |
|
315 | + * @remark Accepts variadic parameters; the number of accepted parameters are not limited to three. |
|
316 | + * @param array the field definition array. |
|
317 | + * @param array (optional) another field array. |
|
318 | + * @param array (optional) add more field arrays to the next parameters as many as necessary. |
|
319 | + * @return void |
|
320 | + */ |
|
321 | 321 | public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) { |
322 | 322 | foreach( func_get_args() as $_aFieldset ) { |
323 | 323 | $this->addSettingField( $_aFieldset ); |
@@ -348,57 +348,57 @@ discard block |
||
348 | 348 | * @return void |
349 | 349 | * @remark The $oForm property should be created in each extended class. |
350 | 350 | * @param array|string $asField A field definition array or a string of the target section id. |
351 | - * <h4>Built-in Field Types</h4> |
|
352 | - * <ul> |
|
353 | - * <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li> |
|
354 | - * <li>[password](./class-AdminPageFramework_FieldType_text.html) - a masked text input field.</li> |
|
355 | - * <li>[textarea](./class-AdminPageFramework_FieldType_textarea.html) - a text input field with multiple lines. It supports rich text editors.</li> |
|
356 | - * <li>[radio](./class-AdminPageFramework_FieldType_radio.html) - a set of radio buttons that lets the user pick an option.</li> |
|
357 | - * <li>[checkbox](./class-AdminPageFramework_FieldType_checkbox.html) - a check box that lets the user enable/disable an item.</li> |
|
358 | - * <li>[select](./class-AdminPageFramework_FieldType_select.html) - a drop-down list that lest the user pick one or more item(s) from a list.</li> |
|
359 | - * <li>[hidden](./class-AdminPageFramework_FieldType_hidden.html) - a field with invisible input values.</li> |
|
360 | - * <li>[file](./class-AdminPageFramework_FieldType_file.html) - a file uploader that lets the user upload files.</li> |
|
361 | - * <li>[image](./class-AdminPageFramework_FieldType_image.html) - a text field with an image uploader that lets the user set the image URL.</li> |
|
362 | - * <li>[media](./class-AdminPageFramework_FieldType_media.html) - a text field with a media uploader that lets the user set the file URL.</li> |
|
363 | - * <li>[color](./class-AdminPageFramework_FieldType_color.html) - a text field with a color picker.</li> |
|
364 | - * <li>[submit](./class-AdminPageFramework_FieldType_submit.html) - a submit button that lets the user send the form.</li> |
|
365 | - * <li>[export](./class-AdminPageFramework_FieldType_export.html) - a custom submit field that lets the user export stored data.</li> |
|
366 | - * <li>[import](./class-AdminPageFramework_FieldType_import.html) - a custom combination field of file and submit fields that let the user import data.</li> |
|
367 | - * <li>[posttype](./class-AdminPageFramework_FieldType_posttype.html) - a check-list of post types enabled on the site.</li> |
|
368 | - * <li>[taxonomy](./class-AdminPageFramework_FieldType_taxonomy.html) - a set of check-lists of taxonomies enabled on the site in a tabbed box.</li> |
|
369 | - * <li>[size](./class-AdminPageFramework_FieldType_size.html) - a combination field of the text and the select fields that let the user set sizes with a selectable unit.</li> |
|
370 | - * <li>[section_title](./class-AdminPageFramework_FieldType_section_title.html) - [3.0.0+] a text field type that will be placed in the section title so that it lets the user set the section title. Note that only one field with this field type is allowed per a section.</li> |
|
371 | - * <li>[system](./class-AdminPageFramework_FieldType_system.html) - [3.3.0+] a custom text area field that displays the system information including the PHP settings, the framework version, MySQL version etc.</li> |
|
372 | - * <li>[inline_mixed](./class-AdminPageFramework_FieldType_inline_mixed.html) - [3.8.0+] a field that include inner fields with different field types. </li> |
|
373 | - * </ul> |
|
374 | - * <h4>Field Definition Arguments</h4> |
|
375 | - * <ul> |
|
376 | - * <li>**field_id** - (required, string) the field ID. Avoid using non-alphabetic characters except underscore and numbers.</li> |
|
377 | - * <li>**type** - (optional, string) the type of the field. The supported types are listed below. When creating nested fields, this argument can be omitted.</li> |
|
378 | - * <li>**section_id** - (optional, string) the section ID that the field belongs to. If not set, the internal `_default` section ID will be assigned.</li> |
|
379 | - * <li>**title** - (optional, string) the title of the section.</li> |
|
380 | - * <li>**description** - (optional, string) the description of the field which is inserted into the after the input field tag.</li> |
|
381 | - * <li>**tip** - (optional, string) the tip for the field which is displayed when the mouse is hovered over the field title.</li> |
|
382 | - * <li>**capability** - (optional, string) the <a href="http://codex.wordpress.org/Roles_and_Capabilities">access level</a> of the section. If the page visitor does not have sufficient capability, the section will be invisible to them.</li> |
|
383 | - * <li>**error_message** - (optional, string) the error message to display above the input field.</li> |
|
384 | - * <li>**before_field** - (optional, string) the HTML string to insert before the input field output.</li> |
|
385 | - * <li>**after_field** - (optional, string) the HTML string to insert after the input field output.</li> |
|
386 | - * <li>**if** - (optional, boolean) if the passed value is false, the section will not be registered.</li> |
|
387 | - * <li>**order** - (optional, integer) the order number of the section. The higher the number is, the lower the position it gets.</li> |
|
388 | - * <li>**label** - (optional, string) the text label(s) associated with and displayed along with the input field. Some input types can ignore this key.</li> |
|
389 | - * <li>**default** - (optional, string|array) the default value(s) assigned to the input tag's value attribute.</li> |
|
390 | - * <li>**value** - (optional, string|array) the value(s) assigned to the input tag's `value` attribute to override the default and the stored value.</li> |
|
391 | - * <li>**delimiter** - (optional, string) the HTML string that delimits multiple elements. This is available if the <var>label</var> key is passed as array. It will be enclosed in inline-block elements so the passed HTML string should not contain block elements.</li> |
|
392 | - * <li>**before_input** - (optional, string) the HTML string inserted right before the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li> |
|
393 | - * <li>**after_input** - (optional, string) the HTML string inserted right after the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li> |
|
394 | - * <li>**label_min_width** - (optional, string) the inline style property of the `min-width` of the label tag for the field. If the unit is not specified, 'px' is applied. Default: `120`. e.g. `100%`</li> |
|
395 | - * <li>**help** - (optional, string) the help description added to the contextual help tab.</li> |
|
396 | - * <li>**help_aside** - (optional, string) the additional help description for the side bar of the contextual help tab.</li> |
|
397 | - * <li>**repeatable** - [3.0.0+] (optional, array|boolean) whether the fields should be repeatable. If it yields true, the plus and the minus buttons appear next to each field that lets the user add/remove the fields. Optionally an setting array can be passed. |
|
398 | - * <h5>Repeatable Fields Setting Array</h5> |
|
399 | - * <ul> |
|
400 | - * <li>**max** - the allowed maximum number of fields to be repeated.</li> |
|
401 | - * <li>**min** - the allowed minimum number of fields to be repeated.</li> |
|
351 | + * <h4>Built-in Field Types</h4> |
|
352 | + * <ul> |
|
353 | + * <li>[text](./class-AdminPageFramework_FieldType_text.html) - a normal field to enter short text input.</li> |
|
354 | + * <li>[password](./class-AdminPageFramework_FieldType_text.html) - a masked text input field.</li> |
|
355 | + * <li>[textarea](./class-AdminPageFramework_FieldType_textarea.html) - a text input field with multiple lines. It supports rich text editors.</li> |
|
356 | + * <li>[radio](./class-AdminPageFramework_FieldType_radio.html) - a set of radio buttons that lets the user pick an option.</li> |
|
357 | + * <li>[checkbox](./class-AdminPageFramework_FieldType_checkbox.html) - a check box that lets the user enable/disable an item.</li> |
|
358 | + * <li>[select](./class-AdminPageFramework_FieldType_select.html) - a drop-down list that lest the user pick one or more item(s) from a list.</li> |
|
359 | + * <li>[hidden](./class-AdminPageFramework_FieldType_hidden.html) - a field with invisible input values.</li> |
|
360 | + * <li>[file](./class-AdminPageFramework_FieldType_file.html) - a file uploader that lets the user upload files.</li> |
|
361 | + * <li>[image](./class-AdminPageFramework_FieldType_image.html) - a text field with an image uploader that lets the user set the image URL.</li> |
|
362 | + * <li>[media](./class-AdminPageFramework_FieldType_media.html) - a text field with a media uploader that lets the user set the file URL.</li> |
|
363 | + * <li>[color](./class-AdminPageFramework_FieldType_color.html) - a text field with a color picker.</li> |
|
364 | + * <li>[submit](./class-AdminPageFramework_FieldType_submit.html) - a submit button that lets the user send the form.</li> |
|
365 | + * <li>[export](./class-AdminPageFramework_FieldType_export.html) - a custom submit field that lets the user export stored data.</li> |
|
366 | + * <li>[import](./class-AdminPageFramework_FieldType_import.html) - a custom combination field of file and submit fields that let the user import data.</li> |
|
367 | + * <li>[posttype](./class-AdminPageFramework_FieldType_posttype.html) - a check-list of post types enabled on the site.</li> |
|
368 | + * <li>[taxonomy](./class-AdminPageFramework_FieldType_taxonomy.html) - a set of check-lists of taxonomies enabled on the site in a tabbed box.</li> |
|
369 | + * <li>[size](./class-AdminPageFramework_FieldType_size.html) - a combination field of the text and the select fields that let the user set sizes with a selectable unit.</li> |
|
370 | + * <li>[section_title](./class-AdminPageFramework_FieldType_section_title.html) - [3.0.0+] a text field type that will be placed in the section title so that it lets the user set the section title. Note that only one field with this field type is allowed per a section.</li> |
|
371 | + * <li>[system](./class-AdminPageFramework_FieldType_system.html) - [3.3.0+] a custom text area field that displays the system information including the PHP settings, the framework version, MySQL version etc.</li> |
|
372 | + * <li>[inline_mixed](./class-AdminPageFramework_FieldType_inline_mixed.html) - [3.8.0+] a field that include inner fields with different field types. </li> |
|
373 | + * </ul> |
|
374 | + * <h4>Field Definition Arguments</h4> |
|
375 | + * <ul> |
|
376 | + * <li>**field_id** - (required, string) the field ID. Avoid using non-alphabetic characters except underscore and numbers.</li> |
|
377 | + * <li>**type** - (optional, string) the type of the field. The supported types are listed below. When creating nested fields, this argument can be omitted.</li> |
|
378 | + * <li>**section_id** - (optional, string) the section ID that the field belongs to. If not set, the internal `_default` section ID will be assigned.</li> |
|
379 | + * <li>**title** - (optional, string) the title of the section.</li> |
|
380 | + * <li>**description** - (optional, string) the description of the field which is inserted into the after the input field tag.</li> |
|
381 | + * <li>**tip** - (optional, string) the tip for the field which is displayed when the mouse is hovered over the field title.</li> |
|
382 | + * <li>**capability** - (optional, string) the <a href="http://codex.wordpress.org/Roles_and_Capabilities">access level</a> of the section. If the page visitor does not have sufficient capability, the section will be invisible to them.</li> |
|
383 | + * <li>**error_message** - (optional, string) the error message to display above the input field.</li> |
|
384 | + * <li>**before_field** - (optional, string) the HTML string to insert before the input field output.</li> |
|
385 | + * <li>**after_field** - (optional, string) the HTML string to insert after the input field output.</li> |
|
386 | + * <li>**if** - (optional, boolean) if the passed value is false, the section will not be registered.</li> |
|
387 | + * <li>**order** - (optional, integer) the order number of the section. The higher the number is, the lower the position it gets.</li> |
|
388 | + * <li>**label** - (optional, string) the text label(s) associated with and displayed along with the input field. Some input types can ignore this key.</li> |
|
389 | + * <li>**default** - (optional, string|array) the default value(s) assigned to the input tag's value attribute.</li> |
|
390 | + * <li>**value** - (optional, string|array) the value(s) assigned to the input tag's `value` attribute to override the default and the stored value.</li> |
|
391 | + * <li>**delimiter** - (optional, string) the HTML string that delimits multiple elements. This is available if the <var>label</var> key is passed as array. It will be enclosed in inline-block elements so the passed HTML string should not contain block elements.</li> |
|
392 | + * <li>**before_input** - (optional, string) the HTML string inserted right before the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li> |
|
393 | + * <li>**after_input** - (optional, string) the HTML string inserted right after the input tag. It will be enclosed in the <code>label</code> tag so the passed HTML string should not contain block elements.</li> |
|
394 | + * <li>**label_min_width** - (optional, string) the inline style property of the `min-width` of the label tag for the field. If the unit is not specified, 'px' is applied. Default: `120`. e.g. `100%`</li> |
|
395 | + * <li>**help** - (optional, string) the help description added to the contextual help tab.</li> |
|
396 | + * <li>**help_aside** - (optional, string) the additional help description for the side bar of the contextual help tab.</li> |
|
397 | + * <li>**repeatable** - [3.0.0+] (optional, array|boolean) whether the fields should be repeatable. If it yields true, the plus and the minus buttons appear next to each field that lets the user add/remove the fields. Optionally an setting array can be passed. |
|
398 | + * <h5>Repeatable Fields Setting Array</h5> |
|
399 | + * <ul> |
|
400 | + * <li>**max** - the allowed maximum number of fields to be repeated.</li> |
|
401 | + * <li>**min** - the allowed minimum number of fields to be repeated.</li> |
|
402 | 402 | * <li>**disabled** - (optional, boolean|array) [3.8.13+] |
403 | 403 | * <ul> |
404 | 404 | * <li>**message** - (optional, string) the message to show when the user clicks on the `Add` repeatable button.</li> |
@@ -407,108 +407,108 @@ discard block |
||
407 | 407 | * <li>**box_width** - (optional, integer) the height of the modal window that displays the message. Default: 100.</li> |
408 | 408 | * <ul> |
409 | 409 | * </li> |
410 | - * </ul> |
|
411 | - * </li> |
|
412 | - * <li>**sortable** - [3.0.0+] (optional, boolean) whether the fields should be sortable. If it yields true, the fields will be enclosed in a draggable box. |
|
413 | - * <li>**attributes** - [3.0.0+] (optional, array) holds key-value pairs representing the attribute and its property. Note that some field types have specific keys in the first dimensions. e.g. `array( 'class' => 'my_custom_class_selector', 'style' => 'background-color:#777', 'size' => 20, )` Every field holds the following nested attribute definition arrays. |
|
414 | - * <ul> |
|
415 | - * <li>**fieldrow** - the `td` tag element containing the field output.</li> |
|
416 | - * <li>**fieldset** - the `fieldset` tag element containing the field output.</li> |
|
417 | - * <li>**fields** - the `div` tag element containing the sub-fields and the main field.</li> |
|
418 | - * <li>**field** - the `div` tag element containing each field.</li> |
|
419 | - * </ul> |
|
420 | - * </li> |
|
421 | - * <li>**show_title_column** - [3.0.0+] (optional, boolean) If true, the field title column will be omitted from the output.</li> |
|
422 | - * <li>**hidden** - [3.0.0+] (optional, boolean) If true, the entire field row output will be invisible with the inline style attribute of `style="display:none"`.</li> |
|
423 | - * <li>**save** - [3.6.0+] (optional, boolean) If `false`, the field value will not be saved. Default: `true`</li> |
|
424 | - * <li>**content** - (optional, string|array) [3.6.1+] a custom section output. [3.8.0+] Supports an array to be passed for nested and inline-mixed fields. If an array holding field definitions is set, those fields will be nested. |
|
425 | - * <h4>Example</h4> |
|
426 | - * <pre><code> |
|
427 | - * $this->addSettingFields( |
|
428 | - * 'my_section_id', // the target section ID - pass dimensional keys of the section |
|
429 | - * array( |
|
430 | - * 'field_id' => 'Y', |
|
431 | - * 'title' => __( 'Y', 'admin-page-framework-loader' ), |
|
432 | - * 'description' => __( 'By passing an array of field definition to the <code>content</code> argument, you can nest fields.', 'admin-page-framework-loader' ) |
|
433 | - * . ' ' . __( 'Also the <code>type</code> argument can be omitted.', 'admin-page-framework-loader' ), |
|
434 | - * 'content' => array( |
|
435 | - * array( |
|
436 | - * 'field_id' => 'i', |
|
437 | - * 'title' => __( 'i', 'admin-page-framework-loader' ), |
|
438 | - * 'type' => 'textarea', |
|
439 | - * ), |
|
440 | - * array( |
|
441 | - * 'field_id' => 'ii', |
|
442 | - * 'title' => __( 'ii', 'admin-page-framework-loader' ), |
|
443 | - * 'type' => 'color', |
|
444 | - * ), |
|
445 | - * array( |
|
446 | - * 'field_id' => 'iii', |
|
447 | - * 'title' => __( 'iii', 'admin-page-framework-loader' ), |
|
448 | - * 'repeatable' => true, |
|
449 | - * 'sortable' => true, |
|
450 | - * 'content' => array( |
|
451 | - * array( |
|
452 | - * 'field_id' => 'a', |
|
453 | - * 'title' => __( 'a', 'admin-page-framework-loader' ), |
|
454 | - * 'type' => 'image', |
|
455 | - * 'attributes' => array( |
|
456 | - * 'preview' => array( |
|
457 | - * 'style' => 'max-width: 200px;', |
|
458 | - * ), |
|
459 | - * ), |
|
460 | - * ), |
|
461 | - * array( |
|
462 | - * 'field_id' => 'b', |
|
463 | - * 'title' => __( 'b', 'admin-page-framework-loader' ), |
|
464 | - * 'content' => array( |
|
465 | - * array( |
|
466 | - * 'field_id' => 'first', |
|
467 | - * 'title' => __( '1st', 'admin-page-framework-loader' ), |
|
468 | - * 'type' => 'color', |
|
469 | - * 'repeatable' => true, |
|
470 | - * 'sortable' => true, |
|
471 | - * ), |
|
472 | - * array( |
|
473 | - * 'field_id' => 'second', |
|
474 | - * 'title' => __( '2nd', 'admin-page-framework-loader' ), |
|
475 | - * 'type' => 'size', |
|
476 | - * ), |
|
477 | - * array( |
|
478 | - * 'field_id' => 'third', |
|
479 | - * 'title' => __( '3rd', 'admin-page-framework-loader' ), |
|
480 | - * 'type' => 'select', |
|
481 | - * 'label' => array( |
|
482 | - * 'x' => 'X', |
|
483 | - * 'y' => 'Y', |
|
484 | - * 'z' => 'Z', |
|
485 | - * ), |
|
486 | - * ), |
|
487 | - * ), |
|
488 | - * // 'description' => '', |
|
489 | - * ), |
|
490 | - * array( |
|
491 | - * 'field_id' => 'c', |
|
492 | - * 'title' => __( 'c', 'admin-page-framework-loader' ), |
|
493 | - * 'type' => 'radio', |
|
494 | - * 'label' => array( |
|
495 | - * 'a' => __( 'Apple', 'admin-page-framework-loader' ), |
|
496 | - * 'b' => __( 'Banana', 'admin-page-framework-loader' ), |
|
497 | - * 'c' => __( 'Cherry', 'admin-page-framework-loader' ), |
|
498 | - * ), |
|
499 | - * 'default' => 'b', |
|
500 | - * ), |
|
501 | - * ) |
|
502 | - * ), |
|
503 | - * ), |
|
504 | - * ) |
|
505 | - * ); |
|
506 | - * </code></pre> |
|
507 | - * </li> |
|
508 | - * <li>**placement** - [3.8.0+] (optional, string) Specifies where the field is rendered. Either `normal` `section_title` or `field_title` is accepted. `field_title` can only be used by nested fields defined in the `content` argument. Default: `normal`</li> |
|
509 | - * <li>**show_debug_info** - (optional, boolean) [3.8.8+] Whether to show debug information such as field definition tool-tips. Default: `true`.</li> |
|
510 | - * </ul> |
|
511 | - */ |
|
410 | + * </ul> |
|
411 | + * </li> |
|
412 | + * <li>**sortable** - [3.0.0+] (optional, boolean) whether the fields should be sortable. If it yields true, the fields will be enclosed in a draggable box. |
|
413 | + * <li>**attributes** - [3.0.0+] (optional, array) holds key-value pairs representing the attribute and its property. Note that some field types have specific keys in the first dimensions. e.g. `array( 'class' => 'my_custom_class_selector', 'style' => 'background-color:#777', 'size' => 20, )` Every field holds the following nested attribute definition arrays. |
|
414 | + * <ul> |
|
415 | + * <li>**fieldrow** - the `td` tag element containing the field output.</li> |
|
416 | + * <li>**fieldset** - the `fieldset` tag element containing the field output.</li> |
|
417 | + * <li>**fields** - the `div` tag element containing the sub-fields and the main field.</li> |
|
418 | + * <li>**field** - the `div` tag element containing each field.</li> |
|
419 | + * </ul> |
|
420 | + * </li> |
|
421 | + * <li>**show_title_column** - [3.0.0+] (optional, boolean) If true, the field title column will be omitted from the output.</li> |
|
422 | + * <li>**hidden** - [3.0.0+] (optional, boolean) If true, the entire field row output will be invisible with the inline style attribute of `style="display:none"`.</li> |
|
423 | + * <li>**save** - [3.6.0+] (optional, boolean) If `false`, the field value will not be saved. Default: `true`</li> |
|
424 | + * <li>**content** - (optional, string|array) [3.6.1+] a custom section output. [3.8.0+] Supports an array to be passed for nested and inline-mixed fields. If an array holding field definitions is set, those fields will be nested. |
|
425 | + * <h4>Example</h4> |
|
426 | + * <pre><code> |
|
427 | + * $this->addSettingFields( |
|
428 | + * 'my_section_id', // the target section ID - pass dimensional keys of the section |
|
429 | + * array( |
|
430 | + * 'field_id' => 'Y', |
|
431 | + * 'title' => __( 'Y', 'admin-page-framework-loader' ), |
|
432 | + * 'description' => __( 'By passing an array of field definition to the <code>content</code> argument, you can nest fields.', 'admin-page-framework-loader' ) |
|
433 | + * . ' ' . __( 'Also the <code>type</code> argument can be omitted.', 'admin-page-framework-loader' ), |
|
434 | + * 'content' => array( |
|
435 | + * array( |
|
436 | + * 'field_id' => 'i', |
|
437 | + * 'title' => __( 'i', 'admin-page-framework-loader' ), |
|
438 | + * 'type' => 'textarea', |
|
439 | + * ), |
|
440 | + * array( |
|
441 | + * 'field_id' => 'ii', |
|
442 | + * 'title' => __( 'ii', 'admin-page-framework-loader' ), |
|
443 | + * 'type' => 'color', |
|
444 | + * ), |
|
445 | + * array( |
|
446 | + * 'field_id' => 'iii', |
|
447 | + * 'title' => __( 'iii', 'admin-page-framework-loader' ), |
|
448 | + * 'repeatable' => true, |
|
449 | + * 'sortable' => true, |
|
450 | + * 'content' => array( |
|
451 | + * array( |
|
452 | + * 'field_id' => 'a', |
|
453 | + * 'title' => __( 'a', 'admin-page-framework-loader' ), |
|
454 | + * 'type' => 'image', |
|
455 | + * 'attributes' => array( |
|
456 | + * 'preview' => array( |
|
457 | + * 'style' => 'max-width: 200px;', |
|
458 | + * ), |
|
459 | + * ), |
|
460 | + * ), |
|
461 | + * array( |
|
462 | + * 'field_id' => 'b', |
|
463 | + * 'title' => __( 'b', 'admin-page-framework-loader' ), |
|
464 | + * 'content' => array( |
|
465 | + * array( |
|
466 | + * 'field_id' => 'first', |
|
467 | + * 'title' => __( '1st', 'admin-page-framework-loader' ), |
|
468 | + * 'type' => 'color', |
|
469 | + * 'repeatable' => true, |
|
470 | + * 'sortable' => true, |
|
471 | + * ), |
|
472 | + * array( |
|
473 | + * 'field_id' => 'second', |
|
474 | + * 'title' => __( '2nd', 'admin-page-framework-loader' ), |
|
475 | + * 'type' => 'size', |
|
476 | + * ), |
|
477 | + * array( |
|
478 | + * 'field_id' => 'third', |
|
479 | + * 'title' => __( '3rd', 'admin-page-framework-loader' ), |
|
480 | + * 'type' => 'select', |
|
481 | + * 'label' => array( |
|
482 | + * 'x' => 'X', |
|
483 | + * 'y' => 'Y', |
|
484 | + * 'z' => 'Z', |
|
485 | + * ), |
|
486 | + * ), |
|
487 | + * ), |
|
488 | + * // 'description' => '', |
|
489 | + * ), |
|
490 | + * array( |
|
491 | + * 'field_id' => 'c', |
|
492 | + * 'title' => __( 'c', 'admin-page-framework-loader' ), |
|
493 | + * 'type' => 'radio', |
|
494 | + * 'label' => array( |
|
495 | + * 'a' => __( 'Apple', 'admin-page-framework-loader' ), |
|
496 | + * 'b' => __( 'Banana', 'admin-page-framework-loader' ), |
|
497 | + * 'c' => __( 'Cherry', 'admin-page-framework-loader' ), |
|
498 | + * ), |
|
499 | + * 'default' => 'b', |
|
500 | + * ), |
|
501 | + * ) |
|
502 | + * ), |
|
503 | + * ), |
|
504 | + * ) |
|
505 | + * ); |
|
506 | + * </code></pre> |
|
507 | + * </li> |
|
508 | + * <li>**placement** - [3.8.0+] (optional, string) Specifies where the field is rendered. Either `normal` `section_title` or `field_title` is accepted. `field_title` can only be used by nested fields defined in the `content` argument. Default: `normal`</li> |
|
509 | + * <li>**show_debug_info** - (optional, boolean) [3.8.8+] Whether to show debug information such as field definition tool-tips. Default: `true`.</li> |
|
510 | + * </ul> |
|
511 | + */ |
|
512 | 512 | public function addSettingField( $asFieldset ) { |
513 | 513 | if ( method_exists( $this->oForm, 'addField' ) ) { |
514 | 514 | $this->oForm->addField( $asFieldset ); |
@@ -572,28 +572,28 @@ discard block |
||
572 | 572 | } |
573 | 573 | |
574 | 574 | /** |
575 | - * Sets the given message to be displayed in the next page load. |
|
576 | - * |
|
577 | - * This is used to inform users about the submitted input data, such as "Updated successfully." or "Problem occurred." etc. |
|
578 | - * and normally used in validation callback methods. |
|
579 | - * |
|
580 | - * <h4>Example</h4> |
|
581 | - * ` |
|
582 | - * if ( ! $bVerified ) { |
|
583 | - * $this->setFieldErrors( $aErrors ); |
|
584 | - * $this->setSettingNotice( 'There was an error in your input.' ); |
|
585 | - * return $aOldPageOptions; |
|
586 | - * } |
|
587 | - * ` |
|
588 | - * |
|
589 | - * @since 3.0.4 |
|
590 | - * @access public |
|
591 | - * @param string $sMessage the text message to be displayed. |
|
592 | - * @param string $sType (optional) the type of the message, either "error" or "updated" is used. |
|
593 | - * @param array $asAttributes (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value. |
|
594 | - * @param boolean $bOverride (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one. |
|
595 | - * @return void |
|
596 | - */ |
|
575 | + * Sets the given message to be displayed in the next page load. |
|
576 | + * |
|
577 | + * This is used to inform users about the submitted input data, such as "Updated successfully." or "Problem occurred." etc. |
|
578 | + * and normally used in validation callback methods. |
|
579 | + * |
|
580 | + * <h4>Example</h4> |
|
581 | + * ` |
|
582 | + * if ( ! $bVerified ) { |
|
583 | + * $this->setFieldErrors( $aErrors ); |
|
584 | + * $this->setSettingNotice( 'There was an error in your input.' ); |
|
585 | + * return $aOldPageOptions; |
|
586 | + * } |
|
587 | + * ` |
|
588 | + * |
|
589 | + * @since 3.0.4 |
|
590 | + * @access public |
|
591 | + * @param string $sMessage the text message to be displayed. |
|
592 | + * @param string $sType (optional) the type of the message, either "error" or "updated" is used. |
|
593 | + * @param array $asAttributes (optional) the tag attribute array applied to the message container HTML element. If a string is given, it is used as the ID attribute value. |
|
594 | + * @param boolean $bOverride (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one. |
|
595 | + * @return void |
|
596 | + */ |
|
597 | 597 | public function setSettingNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) { |
598 | 598 | $this->oForm->setSubmitNotice( |
599 | 599 | $sMessage, |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @return array|string |
54 | 54 | * @since 3.7.0 |
55 | 55 | */ |
56 | - public function getMessage( $sKey='' ) { |
|
56 | + public function getMessage( $sKey = '' ) { |
|
57 | 57 | return $this->oMsg->get( $sKey ); |
58 | 58 | } |
59 | 59 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @return array The array holing the queued items. |
74 | 74 | * @internal |
75 | 75 | */ |
76 | - public function enqueueStyles( $aSRCs, $_vArg2=null ) {} |
|
76 | + public function enqueueStyles( $aSRCs, $_vArg2 = null ) {} |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * Enqueues a style of the given source. |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @return string The style handle ID. If the passed url is not a valid url string, an empty string will be returned. |
94 | 94 | * @internal |
95 | 95 | */ |
96 | - public function enqueueStyle( $sSRC, $_vArg2=null ) {} |
|
96 | + public function enqueueStyle( $sSRC, $_vArg2 = null ) {} |
|
97 | 97 | |
98 | 98 | /** |
99 | 99 | * Enqueues scripts by the given sources. |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @return array The array holding the queued items. |
115 | 115 | * @internal |
116 | 116 | */ |
117 | - public function enqueueScripts( $aSRCs, $_vArg2=null ) {} |
|
117 | + public function enqueueScripts( $aSRCs, $_vArg2 = null ) {} |
|
118 | 118 | /** |
119 | 119 | * Enqueues a script by the given source. |
120 | 120 | * |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
147 | 147 | * @internal |
148 | 148 | */ |
149 | - public function enqueueScript( $sSRC, $_vArg2=null ) {} |
|
149 | + public function enqueueScript( $sSRC, $_vArg2 = null ) {} |
|
150 | 150 | |
151 | 151 | /* |
152 | 152 | * Help Pane |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @since 2.1.0 |
165 | 165 | * @remark This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method. |
166 | 166 | */ |
167 | - public function addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) { |
|
167 | + public function addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) { |
|
168 | 168 | if ( method_exists( $this->oHelpPane, '_addHelpText' ) ) { |
169 | 169 | $this->oHelpPane->_addHelpText( $sHTMLContent, $sHTMLSidebarContent ); |
170 | 170 | } |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) { |
202 | 202 | |
203 | - foreach( func_get_args() as $_asSectionset ) { |
|
203 | + foreach ( func_get_args() as $_asSectionset ) { |
|
204 | 204 | $this->addSettingSection( $_asSectionset ); |
205 | 205 | } |
206 | 206 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | */ |
287 | 287 | public function addSettingSection( $aSectionset ) { |
288 | 288 | |
289 | - if ( ! is_array( $aSectionset ) ) { |
|
289 | + if ( !is_array( $aSectionset ) ) { |
|
290 | 290 | return; |
291 | 291 | } |
292 | 292 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | * @return void |
320 | 320 | */ |
321 | 321 | public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) { |
322 | - foreach( func_get_args() as $_aFieldset ) { |
|
322 | + foreach ( func_get_args() as $_aFieldset ) { |
|
323 | 323 | $this->addSettingField( $_aFieldset ); |
324 | 324 | } |
325 | 325 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | * @param boolean $bOverride (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one. |
595 | 595 | * @return void |
596 | 596 | */ |
597 | - public function setSettingNotice( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) { |
|
597 | + public function setSettingNotice( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) { |
|
598 | 598 | $this->oForm->setSubmitNotice( |
599 | 599 | $sMessage, |
600 | 600 | $sType, |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | * @param string $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type. |
614 | 614 | * @return boolean True if a setting notice is set; otherwise, false. |
615 | 615 | */ |
616 | - public function hasSettingNotice( $sType='' ) { |
|
616 | + public function hasSettingNotice( $sType = '' ) { |
|
617 | 617 | return $this->oForm->hasSubmitNotice( $sType ); |
618 | 618 | } |
619 | 619 |