wphooks.info - mu_menu_items

mu_menu_items

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-admin/network/settings.php:
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
			 *
			 * Adding options for specific menus here hinges on the appropriate checks and capabilities
			 * being in place in the site dashboard on the other side. For instance, when the single
			 * default option, 'plugins' is enabled, site administrators are granted access to the Plugins
			 * screen in their individual sites' dashboards.
			 *
			 * @since MU (3.0.0)
			 *
			 * @param string[] $admin_menus Associative array of the menu items available.
			 */
			$menu_items   = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
			$fieldset_end = '';
			if ( count( (array) $menu_items ) > 1 ) {
				echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
				$fieldset_end = '</fieldset>';
			}
			foreach ( (array) $menu_items as $key => $val ) {
				echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . ' /> ' . esc_html( $val ) . '</label><br/>';
			}
			echo $fieldset_end;