Skip to content

Commit

Permalink
Update Stats link for Atomic Classic sites (#38013)
Browse files Browse the repository at this point in the history
* Point posts stats link to wp-admin

* Take into account for wpcom_admin_interface

---------

Co-authored-by: Candy Tsai <candy02058912@gmail.com>
  • Loading branch information
DustyReagan and candy02058912 committed Jun 25, 2024
1 parent c5b595d commit 1f1cc10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-posts-stats-link
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Point posts stats icon to wp-admin
2 changes: 1 addition & 1 deletion projects/plugins/jetpack/modules/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ function jetpack_stats_post_table_cell( $column, $post_id ) {
esc_html__( 'No stats', 'jetpack' )
);
} else {
$stats_post_url = ! ( new Host() )->is_woa_site() && Stats_Options::get_option( 'enable_odyssey_stats' )
$stats_post_url = 'wp-admin' === get_option( 'wpcom_admin_interface' )
? admin_url( sprintf( 'admin.php?page=stats#!/stats/post/%d/%d', $post_id, Jetpack_Options::get_option( 'id', 0 ) ) )
: Redirect::get_url(
'calypso-stats-post',
Expand Down

0 comments on commit 1f1cc10

Please sign in to comment.