7
7
8
8
namespace Automattic \Jetpack \Stats_Admin ;
9
9
10
+ use Automattic \Jetpack \Connection \Manager as Connection_Manager ;
11
+ use Automattic \Jetpack \Redirect ;
12
+ use Automattic \Jetpack \Stats \Options as Stats_Options ;
13
+ use Automattic \Jetpack \Stats \WPCOM_Stats ;
14
+ use Automattic \Jetpack \Status \Host ;
15
+
10
16
/**
11
17
* Add a Stats column in the post and page lists.
12
18
*/
@@ -58,7 +64,7 @@ public function add_stats_post_table_cell( $column, $post_id ) {
58
64
);
59
65
} else {
60
66
// Link to the wp-admin stats page.
61
- $ stats_post_url = admin_url ( sprintf ( 'admin.php?page=stats#!/stats/post/%d/%d ' , $ post_id , Jetpack_Options::get_option ( 'id ' , 0 ) ) );
67
+ $ stats_post_url = admin_url ( sprintf ( 'admin.php?page=stats#!/stats/post/%d/%d ' , $ post_id , \ Jetpack_Options::get_option ( 'id ' , 0 ) ) );
62
68
// Unless the user is on a Default style WOA site, in which case link to Calypso.
63
69
if ( ( new Host () )->is_woa_site () && Stats_Options::get_option ( 'enable_odyssey_stats ' ) && 'wp-admin ' !== get_option ( 'wpcom_admin_interface ' ) ) {
64
70
$ stats_post_url = Redirect::get_url (
@@ -93,11 +99,11 @@ public function add_stats_post_table_cell( $column, $post_id ) {
93
99
$ compact_decimal_short = 14 ;
94
100
95
101
try {
96
- $ formatter = new NumberFormatter ( $ current_locale , $ compact_decimal_short );
97
- $ formatter ->setAttribute ( NumberFormatter::MAX_FRACTION_DIGITS , 1 );
102
+ $ formatter = new \ NumberFormatter ( $ current_locale , $ compact_decimal_short );
103
+ $ formatter ->setAttribute ( \ NumberFormatter::MAX_FRACTION_DIGITS , 1 );
98
104
} catch ( \Exception $ e ) {
99
105
// Fallback to decimal if for some reason it fails to work.
100
- $ formatter = new NumberFormatter ( $ current_locale , NumberFormatter::DECIMAL );
106
+ $ formatter = new \ NumberFormatter ( $ current_locale , \ NumberFormatter::DECIMAL );
101
107
}
102
108
103
109
?>
@@ -116,8 +122,6 @@ class="dashicons dashicons-visibility"></span> <span><?php echo $views ? es
116
122
*
117
123
* @param array $columns An array of column names.
118
124
*
119
- * @since 4.7.0
120
- *
121
125
* @return mixed
122
126
*/
123
127
public function add_stats_post_table ( $ columns ) {
0 commit comments