/**
  * Loads the scripts for the backend.
  *
  * @since  1.1
  * @access public
  * @return void
  */
 public function admin_scripts()
 {
     global $wp_query, $post;
     $screen = get_current_screen();
     $wpcm_screen_id = strtolower(__('WPClubManager', 'wp-club-manager'));
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     // Register scripts
     wp_register_script('wpclubmanager_admin', WPCM()->plugin_url() . '/assets/js/admin/wpclubmanager_admin' . $suffix . '.js', array('jquery', 'jquery-ui-widget', 'jquery-ui-core', 'jquery-tiptip', 'jquery-ui-sortable'), WPCM_VERSION);
     wp_register_script('jquery-tiptip', WPCM()->plugin_url() . '/assets/js/jquery-tiptip/jquery.tipTip' . $suffix . '.js', array('jquery'), WPCM_VERSION, true);
     wp_register_script('wpclubmanager_admin_meta_boxes', WPCM()->plugin_url() . '/assets/js/admin/meta-boxes' . $suffix . '.js', array('jquery'), WPCM_VERSION);
     wp_register_script('ajax-chosen', WPCM()->plugin_url() . '/assets/js/jquery-chosen/ajax-chosen.jquery' . $suffix . '.js', array('jquery', 'chosen'), WPCM_VERSION);
     wp_register_script('chosen', WPCM()->plugin_url() . '/assets/js/jquery-chosen/chosen.jquery' . $suffix . '.js', array('jquery'), WPCM_VERSION);
     // WPlubManager admin pages
     if (in_array($screen->id, wpcm_get_screen_ids())) {
         wp_enqueue_script('jquery');
         wp_enqueue_script('ajax-chosen');
         wp_enqueue_script('chosen');
         wp_enqueue_script('wpclubmanager_admin');
     }
     if (in_array($screen->id, array('wpcm_player', 'wpcm_club', 'wpcm_staff', 'wpcm_sponsor', 'wpcm_match', 'edit-wpcm_player', 'edit-wpcm_club', 'edit-wpcm_staff', 'edit-wpcm_sponsor', 'edit-wpcm_match'))) {
         wp_enqueue_script('wpclubmanager_admin_meta_boxes');
         wp_enqueue_script('ajax-chosen');
         wp_enqueue_script('chosen');
     }
     // System status
     if ('club-manager_page_wpcm-status' === $screen->id) {
         wp_enqueue_script('zeroclipboard', WPCM()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array('jquery'), WPCM_VERSION);
     }
 }
 /**
  * Add rating links to the admin dashboard
  *
  * @since	    1.3.2
  * @param       string $footer_text
  * @return      string
  */
 public function wpclubmanager_admin_rate_us($footer_text)
 {
     if (!current_user_can('manage_wpclubmanager')) {
         return;
     }
     $current_screen = get_current_screen();
     $wpcm_pages = wpcm_get_screen_ids();
     if (isset($current_screen->id) && apply_filters('wpclubmanager_display_admin_footer_text', in_array($current_screen->id, $wpcm_pages))) {
         if (!get_option('wpclubmanager_admin_footer_text_rated')) {
             $footer_text = sprintf(__('If you like <strong>WP Club Manager</strong> please leave us a %s&#9733;&#9733;&#9733;&#9733;&#9733;%s rating. A huge thank you in advance!', 'wp-club-manager'), '<a href="https://wordpress.org/support/view/plugin-reviews/wp-club-manager?filter=5#postform" target="_blank" class="wpcm-rating-link" data-rated="' . esc_attr__('Many thanks :)', 'wp-club-manager') . '">', '</a>');
             wpclubmanager_enqueue_js("\n\t\t\t\t\tjQuery( 'a.wpcm-rating-link' ).click( function() {\n\t\t\t\t\t\tjQuery.post( '" . WPCM()->ajax_url() . "', { action: 'wpclubmanager_rated' } );\n\t\t\t\t\t\tjQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );\n\t\t\t\t\t});\n\t\t\t\t");
         } else {
             $footer_text = __('Thank you for managing your club with WP Club Manager, your support is much appreciated.', 'wp-club-manager');
         }
     }
     return $footer_text;
 }