14 * DAY_IN_SECONDS ) { $show_floatbar = true; } else { $show_floatbar = false; } wp_send_json( array( 'show' => $show_floatbar, ) ); } add_action( 'wp_ajax_monsterinsights_get_floatbar', 'monsterinsights_get_floatbar' ); /** * Admin menu tooltip. */ function monsterinsights_get_admin_menu_tooltip() { $show_tooltip = get_option( 'monsterinsights_admin_menu_tooltip', 0 ); $activated = get_option( 'monsterinsights_over_time', array() ); $ua_code = monsterinsights_get_ua(); if ( monsterinsights_is_reports_page() || monsterinsights_is_settings_page() ) { // Don't show on MI pages. return; } if ( ! current_user_can( 'monsterinsights_save_settings' ) ) { return; } if ( $show_tooltip && $show_tooltip + 30 * DAY_IN_SECONDS > time() ) { // Dismissed less than 30 days ago. return; } if ( empty( $activated['installed_date'] ) || ( $activated['installed_date'] + 30 * DAY_IN_SECONDS > time() ) || empty( $ua_code ) ) { return; } // More than 30 days since it was installed & is tracking. $url = monsterinsights_get_upgrade_link( 'menu-tooltip', 'upgrade' ); ?>