updated plugin Jetpack Protect version 4.0.0

This commit is contained in:
2025-04-29 21:19:56 +00:00
committed by Gitium
parent eb9181b250
commit ebd40ef928
265 changed files with 11864 additions and 3987 deletions

View File

@ -13,7 +13,7 @@ namespace Automattic\Jetpack\Admin_UI;
*/
class Admin_Menu {
const PACKAGE_VERSION = '0.4.5';
const PACKAGE_VERSION = '0.5.7';
/**
* Whether this class has been initialized
@ -173,6 +173,26 @@ class Admin_Menu {
return 'jetpack_page_' . $menu_slug;
}
/**
* Removes an already added submenu
*
* @param string $menu_slug The slug of the submenu to remove.
*
* @return array|false The removed submenu on success, false if not found.
*/
public static function remove_menu( $menu_slug ) {
foreach ( self::$menu_items as $index => $menu_item ) {
if ( $menu_item['menu_slug'] === $menu_slug ) {
unset( self::$menu_items[ $index ] );
return $menu_item;
}
}
return false;
}
/**
* Gets the slug for the first item under the Jetpack top level menu
*