Skip to content

Commit

Permalink
Utilize the Admin UI package for handling the Akismet menu (#32911)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj authored Sep 7, 2023
1 parent c0d4059 commit ab2467a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-dedupe-antispam
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

Utilize the Jetpack Admin UI package for handling the Akismet menu
10 changes: 3 additions & 7 deletions projects/plugins/jetpack/class.jetpack-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @package automattic/jetpack
*/

use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Current_Plan as Jetpack_Plan;
use Automattic\Jetpack\Partner_Coupon as Jetpack_Partner_Coupon;
use Automattic\Jetpack\Status;
Expand Down Expand Up @@ -91,13 +92,8 @@ function () {
4
);

// Add an Anti-spam menu item for Jetpack.
add_action(
'jetpack_admin_menu',
function () {
add_submenu_page( 'jetpack', __( 'Anti-Spam', 'jetpack' ), __( 'Anti-Spam', 'jetpack' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
}
);
// Add an Anti-spam menu item for Jetpack. This is handled automatically by the Admin_Menu as long as it has been initialized.
Admin_Menu::init();
add_action( 'admin_enqueue_scripts', array( $this, 'akismet_logo_replacement_styles' ) );
}
}
Expand Down
1 change: 1 addition & 0 deletions projects/plugins/jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"automattic/jetpack-a8c-mc-stats": "@dev",
"automattic/jetpack-abtest": "@dev",
"automattic/jetpack-action-bar": "@dev",
"automattic/jetpack-admin-ui": "@dev",
"automattic/jetpack-assets": "@dev",
"automattic/jetpack-autoloader": "@dev",
"automattic/jetpack-backup": "@dev",
Expand Down
3 changes: 2 additions & 1 deletion projects/plugins/jetpack/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ab2467a

Please sign in to comment.