public_html/wp-content/plugins/wp-statistics/wp-statistics.php
// This function displays the HTML for the settings page.
This function displays the HTML for the settings page.
This function displays the HTML for the settings page .
function wp_statistics_settings() {
		GLOBAL $WP_Statistics;
		if (!current_user_can(wp_statistics_validate_capability($WP_Statistics->get_option('read_capability', 'manage_options')))) {
			wp_die(__('You do not have sufficient permissions to access this page.'));
		}
		$WP_Statistics->load_user_options();
		wp_enqueue_style('log-css', plugin_dir_url(__FILE__) . 'assets/css/style' . WP_STATISTICS_MIN_EXT . '.css', true, '1.0');
		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');
		}
		if( $WP_Statistics->get_option('update_geoip') == true ) {
			echo wp_statistics_download_geoip();
		}
		include_once dirname( __FILE__ ) . "/includes/settings/wps-settings.php";
	}
function wp_statistics_settings ( ) { GLOBAL $ WP_Statistics ; if ( ! current_user_can ( wp_statistics_validate_capability ( $ WP_Statistics -> get_option ( 'read_capability' , 'manage_options' ) ) ) ) { wp_die ( __ ( 'You do not have sufficient permissions to access this page.' ) ) ; } $ WP_Statistics -> load_user_options ( ) ; wp_enqueue_style ( 'log-css' , plugin_dir_url ( __FILE__ ) . 'assets/css/style' . WP_STATISTICS_MIN_EXT . '.css' , true , '1.0' ) ; 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' ) ; } if ( $ WP_Statistics -> get_option ( 'update_geoip' ) == true ) { echo wp_statistics_download_geoip ( ) ; } include_once dirname ( __FILE__ ) . " /includes/settings/wps-settings.php " ; }
This function displays the HTML for the settings page.
This function displays the HTML for the settings page .
// 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 our CSS to be used. // Load the jQuery UI code to create the tabs. // We could let the download happen at the end of the page, but this way we get to give some // feedback to the users about the result.