Changeset 12523 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php
- Timestamp:
- 03/31/2023 04:37:30 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/tools/class-stats-report.php
r12507 r12523 25 25 private function __construct() { 26 26 add_action( 'admin_menu', array( $this, 'add_to_menu' ) ); 27 add_action( 'admin_page_access_denied', array( $this, 'admin_page_access_denied' ) ); 27 28 } 28 29 … … 39 40 array( $this, 'show_stats' ) 40 41 ); 42 } 43 44 /** 45 * Redirect the old location. 46 */ 47 public function admin_page_access_denied() { 48 global $pagenow, $plugin_page; 49 if ( 50 isset( $pagenow, $plugin_page ) && 51 'tools.php' === $pagenow && 52 'statsreport' === $plugin_page 53 ) { 54 wp_safe_redirect( admin_url( "admin.php?page={$plugin_page}" ) ); 55 exit; 56 } 41 57 } 42 58
Note: See TracChangeset
for help on using the changeset viewer.