public_html/wp-content/plugins/wp-statistics/wp-statistics.php
// This function loads the optimization page code.
This function loads the optimization page code.
This function loads the optimization page code .
function wp_statistics_optimization() {
		GLOBAL $wpdb, $WP_Statistics;
		if (!current_user_can(wp_statistics_validate_capability($WP_Statistics->get_option('manage_capability', 'manage_options')))) {
			wp_die(__('You do not have sufficient permissions to access this page.'));
		}
		$WP_Statistics->load_user_options();
		wp_register_style("jquery-ui-css", plugin_dir_url(__FILE__) . 'assets/css/jquery-ui-1.10.4.custom' . WP_STATISTICS_MIN_EXT . '.css');
		wp_enqueue_style("jquery-ui-css");
		wp_enqueue_script('jquery-ui-core');
		wp_enqueue_script('jquery-ui-tabs');
		if( is_rtl() ) {
			wp_enqueue_style('rtl-css', plugin_dir_url(__FILE__) . 'assets/css/rtl' . WP_STATISTICS_MIN_EXT . '.css', true, '1.1');
		}
		$result['useronline'] = $wpdb->get_var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_useronline`");
		$result['visit'] = $wpdb->get_var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_visit`");
		$result['visitor'] = $wpdb->get_var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_visitor`");
		$result['exclusions'] = $wpdb->get_var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_exclusions`");
		$result['pages'] = $wpdb->get_var("SELECT COUNT(uri) FROM `{$wpdb->prefix}statistics_pages`");
		$result['historical'] = $wpdb->get_Var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_historical`");
		$result['search'] = $wpdb->get_Var("SELECT COUNT(ID) FROM `{$wpdb->prefix}statistics_search`");
		include_once dirname( __FILE__ ) . "/includes/optimization/wps-optimization.php";
	}
function wp_statistics_optimization ( ) { GLOBAL $ wpdb , $ WP_Statistics ; if ( ! current_user_can ( wp_statistics_validate_capability ( $ WP_Statistics -> get_option ( 'manage_capability' , 'manage_options' ) ) ) ) { wp_die ( __ ( 'You do not have sufficient permissions to access this page.' ) ) ; } $ WP_Statistics -> load_user_options ( ) ; wp_register_style ( " jquery-ui-css " , plugin_dir_url ( __FILE__ ) . 'assets/css/jquery-ui-1.10.4.custom' . WP_STATISTICS_MIN_EXT . '.css' ) ; wp_enqueue_style ( " jquery-ui-css " ) ; wp_enqueue_script ( 'jquery-ui-core' ) ; wp_enqueue_script ( 'jquery-ui-tabs' ) ; if ( is_rtl ( ) ) { wp_enqueue_style ( 'rtl-css' , plugin_dir_url ( __FILE__ ) . 'assets/css/rtl' . WP_STATISTICS_MIN_EXT . '.css' , true , '1.1' ) ; } $ result [ 'useronline' ] = $ wpdb -> get_var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_useronline` " ) ; $ result [ 'visit' ] = $ wpdb -> get_var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_visit` " ) ; $ result [ 'visitor' ] = $ wpdb -> get_var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_visitor` " ) ; $ result [ 'exclusions' ] = $ wpdb -> get_var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_exclusions` " ) ; $ result [ 'pages' ] = $ wpdb -> get_var ( " SELECT COUNT(uri) FROM ` { $ wpdb -> prefix } statistics_pages` " ) ; $ result [ 'historical' ] = $ wpdb -> get_Var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_historical` " ) ; $ result [ 'search' ] = $ wpdb -> get_Var ( " SELECT COUNT(ID) FROM ` { $ wpdb -> prefix } statistics_search` " ) ; include_once dirname ( __FILE__ ) . " /includes/optimization/wps-optimization.php " ; }
This function loads the optimization page code.
This function loads the optimization page code .
// Check the current user has the rights to be here. // When we create $WP_Statistics the user has not been authenticated yet so we cannot load the user preferences // during the creation of the class.  Instead load them now that the user exists. // Load the jQuery UI code to create the tabs. // Get the row count for each of the tables, we'll use this later on in the wps_optimization.php file.