Permalink
Browse files

Change redirection method in donate menu

  • Loading branch information...
mostafasoufi committed Jul 2, 2017
1 parent 584f9d7 commit 20f7e562cb0dfa7b6f778d5e074da1d2b8e2e596
Showing with 2 additions and 4 deletions.
  1. +2 −4 wp-statistics.php
View
@@ -517,7 +517,7 @@ function wp_statistics_menu() {
$WP_Statistics->menu_slugs['optimize'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Optimization', 'wp_statistics' ), __( 'Optimization', 'wp_statistics' ), $manage_cap, WP_STATISTICS_OPTIMIZATION_PAGE, 'wp_statistics_optimization' );
$WP_Statistics->menu_slugs['settings'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Settings', 'wp_statistics' ), __( 'Settings', 'wp_statistics' ), $read_cap, WP_STATISTICS_SETTINGS_PAGE, 'wp_statistics_settings' );
$WP_Statistics->menu_slugs['donate'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Donate', 'wp_statistics' ), __( 'Donate', 'wp_statistics' ), $read_cap, WP_STATISTICS_DONATE_PAGE, 'wp_statistics_donate' );
$WP_Statistics->menu_slugs['donate'] = add_submenu_page( WP_STATISTICS_OVERVIEW_PAGE, __( 'Donate', 'wp_statistics' ), '<span style="color:#459605">' . __( 'Donate', 'wp_statistics' ) . '</span>', $read_cap, WP_STATISTICS_DONATE_PAGE, 'wp_statistics_donate' );
// Add action to load the meta boxes to the overview page.
add_action( 'load-' . $WP_Statistics->menu_slugs['overview'], 'wp_statistics_load_overview_page' );
@@ -683,9 +683,7 @@ function wp_statistics_goto_network_blog() {
}
function wp_statistics_donate() {
$url = get_admin_url() . "/admin.php?page=" . WP_STATISTICS_SETTINGS_PAGE . "&tab=about";
echo "<script>window.open('http://wp-statistics.com/donate','_blank'); window.location.href = '$url';</script>";
echo "<script>window.location.href='http://wp-statistics.com/donate';</script>";
}
// This function adds the menu icon to the top level menu. WordPress 3.8 changed the style of the menu a bit and so a different css file is loaded.

0 comments on commit 20f7e56

Please sign in to comment.