From a2107ccf3eeba52d34f9ce41373cac3a4c378c18 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Wed, 8 Jul 2020 16:31:24 +0300 Subject: [PATCH 1/2] See https://github.com/WPTT/WPThemeReview/issues/254 --- WPThemeReview/Sniffs/PluginTerritory/NoAddAdminPagesSniff.php | 4 ---- .../Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc | 4 ---- 2 files changed, 8 deletions(-) diff --git a/WPThemeReview/Sniffs/PluginTerritory/NoAddAdminPagesSniff.php b/WPThemeReview/Sniffs/PluginTerritory/NoAddAdminPagesSniff.php index 323cfa3e..56f0d0c0 100644 --- a/WPThemeReview/Sniffs/PluginTerritory/NoAddAdminPagesSniff.php +++ b/WPThemeReview/Sniffs/PluginTerritory/NoAddAdminPagesSniff.php @@ -40,13 +40,9 @@ public function getGroups() { 'message' => 'Themes should use add_theme_page() for adding admin pages. Found %s.', 'functions' => [ // Menu Pages. - 'add_menu_page', 'add_object_page', 'add_utility_page', - // SubMenu Pages. - 'add_submenu_page', - // WordPress Administration Menus. 'add_dashboard_page', 'add_posts_page', diff --git a/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc b/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc index 8bbe770e..3545c964 100644 --- a/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc +++ b/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc @@ -1,13 +1,9 @@ Date: Tue, 28 Jul 2020 19:30:23 +0300 Subject: [PATCH 2/2] Fix tests for #254 --- .../Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc | 4 ++++ .../Tests/PluginTerritory/NoAddAdminPagesUnitTest.php | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc b/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc index 3545c964..32158af8 100644 --- a/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc +++ b/WPThemeReview/Tests/PluginTerritory/NoAddAdminPagesUnitTest.inc @@ -1,9 +1,13 @@ 1, 5 => 1, 6 => 1, - 9 => 1, 12 => 1, 13 => 1, 14 => 1,