14 * DAY_IN_SECONDS ) { $show_floatbar = true; } else { $show_floatbar = false; } wp_send_json( array( 'show' => $show_floatbar, ) ); } add_action( 'wp_ajax_exactmetrics_get_floatbar', 'exactmetrics_get_floatbar' ); /** * Admin menu tooltip. */ function exactmetrics_get_admin_menu_tooltip() { $show_tooltip = get_option( 'exactmetrics_admin_menu_tooltip', 0 ); $activated = get_option( 'exactmetrics_over_time', array() ); $ua_code = exactmetrics_get_ua(); if ( exactmetrics_is_reports_page() || exactmetrics_is_settings_page() ) { // Don't show on MI pages. return; } if ( ! current_user_can( 'exactmetrics_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 = exactmetrics_get_upgrade_link( 'menu-tooltip', 'upgrade' ); ?>

', '' ); ?>