public_html/wp-content/plugins/wp-statistics/widget.php
/**
		 * Outputs the content of the widget
		 *
		 * @param array $args
		 * @param array $instance
		 */
Outputs the content of the widget
@param array $args
@param array $instance
Outputs the content of the widget @param array $args @param array $instance
public function widget( $args, $instance ) {
			GLOBAL $WP_Statistics;
			extract( $args );
			$widget_options = $WP_Statistics->get_option( 'widget' );
			echo $before_widget;
			echo $before_title . $widget_options['name_widget'] . $after_title;
			echo '<ul>';
			if( $widget_options['useronline_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Users Online', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_useronline() );
				echo '</li>';
			}
			if( $widget_options['tvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Todays Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'today' ) );
				echo '</li>';
			}
			if( $widget_options['tvisitor_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Todays Visitors', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visitor( 'today', null, true ) );
				echo '</li>';
			}
			if( $widget_options['yvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Yesterdays Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'yesterday' ) );
				echo '</li>';
			}
			if( $widget_options['yvisitor_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Yesterdays Visitors', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visitor( 'yesterday', null, true ) );
				echo '</li>';
			}
			if( $widget_options['wvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Last 7 Days Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'week' ) );
				echo '</li>';
			}
			if( $widget_options['mvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Last 30 Days Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'month' ) );
				echo '</li>';
			}
			if( $widget_options['ysvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Last 365 Days Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'year' ) );
				echo '</li>';
			}
			if( $widget_options['ttvisit_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Visits', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visit( 'total' ) );
				echo '</li>';
			}
			if( $widget_options['ttvisitor_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Visitors', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_visitor( 'total', null, true ) );
				echo '</li>';
			}
			if( $widget_options['tpviews_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Page Views', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_pages( 'total' ) );
				echo '</li>';
			}
			if( $widget_options['ser_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Search Engine referrals', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_searchengine( $widget_options['select_se'] ) );
				echo '</li>';
			}
			if( $widget_options['tp_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Posts', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_countposts() );
				echo '</li>';
			}
			if( $widget_options['tpg_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Pages', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_countpages() );
				echo '</li>';
			}
			if( $widget_options['tc_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Comments', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_countcomment() );
				echo '</li>';
			}
			if( $widget_options['ts_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Spams', 'wp_statistics' ) . ': </label>';
					echo wp_statistics_countspam();
				echo '</li>';
			}
			if( $widget_options['tu_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Total Users', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_countusers() );
				echo '</li>';
			}
			if( $widget_options['ap_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Average Posts', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_average_post() );
				echo '</li>';
			}
			if( $widget_options['ac_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Average Comments', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_average_comment() );
				echo '</li>';
			}
			if( $widget_options['au_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Average Users', 'wp_statistics' ) . ': </label>';
					echo number_format_i18n( wp_statistics_average_registeruser() );
				echo '</li>';
			}
			if( $widget_options['lpd_widget'] ) {
				echo '<li>';
					echo '<label>' . __( 'Last Post Date', 'wp_statistics' ) . ': </label>';
					echo wp_statistics_lastpostdate();
				echo '</li>';
			}
			echo '</ul>';
			echo $after_widget;
		}
public function widget ( $ args , $ instance ) { GLOBAL $ WP_Statistics ; extract ( $ args ) ; $ widget_options = $ WP_Statistics -> get_option ( 'widget' ) ; echo $ before_widget ; echo $ before_title . $ widget_options [ 'name_widget' ] . $ after_title ; echo '<ul>' ; if ( $ widget_options [ 'useronline_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Users Online' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_useronline ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Todays Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'today' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tvisitor_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Todays Visitors' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visitor ( 'today' , null , true ) ) ; echo '</li>' ; } if ( $ widget_options [ 'yvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Yesterdays Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'yesterday' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'yvisitor_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Yesterdays Visitors' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visitor ( 'yesterday' , null , true ) ) ; echo '</li>' ; } if ( $ widget_options [ 'wvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Last 7 Days Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'week' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'mvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Last 30 Days Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'month' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ysvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Last 365 Days Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'year' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ttvisit_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Visits' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visit ( 'total' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ttvisitor_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Visitors' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_visitor ( 'total' , null , true ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tpviews_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Page Views' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_pages ( 'total' ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ser_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Search Engine referrals' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_searchengine ( $ widget_options [ 'select_se' ] ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tp_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Posts' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_countposts ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tpg_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Pages' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_countpages ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'tc_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Comments' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_countcomment ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ts_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Spams' , 'wp_statistics' ) . ': </label>' ; echo wp_statistics_countspam ( ) ; echo '</li>' ; } if ( $ widget_options [ 'tu_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Total Users' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_countusers ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ap_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Average Posts' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_average_post ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'ac_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Average Comments' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_average_comment ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'au_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Average Users' , 'wp_statistics' ) . ': </label>' ; echo number_format_i18n ( wp_statistics_average_registeruser ( ) ) ; echo '</li>' ; } if ( $ widget_options [ 'lpd_widget' ] ) { echo '<li>' ; echo '<label>' . __ ( 'Last Post Date' , 'wp_statistics' ) . ': </label>' ; echo wp_statistics_lastpostdate ( ) ; echo '</li>' ; } echo '</ul>' ; echo $ after_widget ; }
Outputs the content of the widget
 @param array $args
 @param array $instance
Outputs the content of the widget @param array $args @param array $instance