Completed
Branch dev (65e704)
by
unknown
06:13
created
development/factory/admin_page/AdminPageFramework_Controller_Menu.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -173,52 +173,52 @@  discard block
 block discarded – undo
173 173
     }
174 174
     
175 175
     /**
176
-    * Adds the given sub-menu item on the left sidebar menu of the administration panel.
177
-    * 
178
-    * It supports pages and links. Each of them has the specific array structure.
179
-    * 
180
-    * <h4>Example</h4>
181
-    * <code>
182
-    * $this->addSubMenuItem(
183
-    *       array(
184
-    *           'title'         => 'Read Me',
185
-    *           'menu_title'    => 'About'
186
-    *           'page_slug'     => 'my_plugin_readme',
187
-    *       )
188
-    * );
189
-    * </code>
190
-    * 
191
-    * @since        2.0.0
192
-    * @since        3.0.0       Changed the scope to public.
193
-    * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
194
-    * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
195
-    * <h4>Sub-menu Page Array</h4>
196
-    * <ul>
197
-    *   <li>**title** - (string) the page title of the page.</li>
198
-    *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
199
-    *   <li>**screen_icon** - (optional, string) either the ID selector name from the following list or the icon URL. The size of the icon should be 32 by 32 in pixel. This is for WordPress 3.7.x or below.
200
-    *       <pre>edit, post, index, media, upload, link-manager, link, link-category, edit-pages, page, edit-comments, themes, plugins, users, profile, user-edit, tools, admin, options-general, ms-admin, generic</pre>
201
-    *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
202
-    *   </li>
203
-    *   <li>**capability** - (optional, string) the access level to the created admin pages defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
204
-    *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
205
-    *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
206
-    *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
207
-    *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
208
-    *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
209
-    * </ul>
210
-    * <h4>Sub-menu Link Array</h4>
211
-    * <ul>
212
-    *   <li>**title** - (string) the link title.</li>
213
-    *   <li>**href** - (string) the URL of the target link.</li>
214
-    *   <li>**capability** - (optional, string) the access level to show the item, defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
215
-    *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
216
-    *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
217
-    *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
218
-    * </ul>
219
-    * @access       public
220
-    * @return       void
221
-    */    
176
+     * Adds the given sub-menu item on the left sidebar menu of the administration panel.
177
+     * 
178
+     * It supports pages and links. Each of them has the specific array structure.
179
+     * 
180
+     * <h4>Example</h4>
181
+     * <code>
182
+     * $this->addSubMenuItem(
183
+     *       array(
184
+     *           'title'         => 'Read Me',
185
+     *           'menu_title'    => 'About'
186
+     *           'page_slug'     => 'my_plugin_readme',
187
+     *       )
188
+     * );
189
+     * </code>
190
+     * 
191
+     * @since        2.0.0
192
+     * @since        3.0.0       Changed the scope to public.
193
+     * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
194
+     * @param        array       a sub-menu array. It can be a page or a link. The array structures are as follows:
195
+     * <h4>Sub-menu Page Array</h4>
196
+     * <ul>
197
+     *   <li>**title** - (string) the page title of the page.</li>
198
+     *   <li>**page_slug** - (string) the page slug of the page. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
199
+     *   <li>**screen_icon** - (optional, string) either the ID selector name from the following list or the icon URL. The size of the icon should be 32 by 32 in pixel. This is for WordPress 3.7.x or below.
200
+     *       <pre>edit, post, index, media, upload, link-manager, link, link-category, edit-pages, page, edit-comments, themes, plugins, users, profile, user-edit, tools, admin, options-general, ms-admin, generic</pre>
201
+     *       <p>( Notes: the `generic` icon is available WordPress version 3.5 or above.)</p> 
202
+     *   </li>
203
+     *   <li>**capability** - (optional, string) the access level to the created admin pages defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
204
+     *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
205
+     *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
206
+     *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
207
+     *   <li>**page_title** - (optional) [3.3.0+] When the page title differs from the menu title, use this argument.</li>
208
+     *   <li>**menu_title** - (optional) [3.3.0+] When the menu title differs from the menu title, use this argument.</li>
209
+     * </ul>
210
+     * <h4>Sub-menu Link Array</h4>
211
+     * <ul>
212
+     *   <li>**title** - (string) the link title.</li>
213
+     *   <li>**href** - (string) the URL of the target link.</li>
214
+     *   <li>**capability** - (optional, string) the access level to show the item, defined <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. If not set, the overall capability assigned in the class constructor, which is `manage_options` by default, will be used.</li>
215
+     *   <li>**order** - (optional, integer) the order number of the page. The lager the number is, the lower the position it is placed in the menu.</li>
216
+     *   <li>**show_page_heading_tab** - (optional, boolean) if this is set to false, the page title won't be displayed in the page heading tab. Default: `true`.</li>
217
+     *   <li>**show_in_menu** - (optional) If this is set to false, the page title won't be displayed in the sidebar menu while the page is still accessible. Default: true.</li>
218
+     * </ul>
219
+     * @access       public
220
+     * @return       void
221
+     */    
222 222
     public function addSubMenuItem( array $aSubMenuItem ) {
223 223
         if ( isset( $aSubMenuItem[ 'href' ] ) ) {
224 224
             $this->addSubMenuLink( $aSubMenuItem );
@@ -228,20 +228,20 @@  discard block
 block discarded – undo
228 228
     }
229 229
 
230 230
     /**
231
-    * Adds the given link into the menu on the left sidebar of the administration panel.
232
-    * 
233
-    * @since        2.0.0
234
-    * @since        3.0.0       Changed the scope to public from protected.
235
-    * @since        3.5.0       Changed the scope to public as it was still protected.
236
-    * @param        string      the menu title.
237
-    * @param        string      the URL linked to the menu.
238
-    * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
239
-    * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
240
-    * @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.
241
-    * @access       public
242
-    * @return       void
243
-    * @internal
244
-    */    
231
+     * Adds the given link into the menu on the left sidebar of the administration panel.
232
+     * 
233
+     * @since        2.0.0
234
+     * @since        3.0.0       Changed the scope to public from protected.
235
+     * @since        3.5.0       Changed the scope to public as it was still protected.
236
+     * @param        string      the menu title.
237
+     * @param        string      the URL linked to the menu.
238
+     * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
239
+     * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
240
+     * @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.
241
+     * @access       public
242
+     * @return       void
243
+     * @internal
244
+     */    
245 245
     public function addSubMenuLink( array $aSubMenuLink ) {
246 246
         
247 247
         // If required keys are not set, return.
Please login to merge, or discard this patch.