Skip to content

Commit

Permalink
AMP support: No need to run Comment Likes frontend so early.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereksmart committed Jan 3, 2019
1 parent d20c68e commit b4565df
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/comment-likes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private function __construct() {
$this->url_parts = parse_url( $this->url );
$this->domain = $this->url_parts['host'];

add_action( 'init', array( $this, 'frontend_init' ) );
add_action( 'template_redirect', array( $this, 'frontend_init' ) );
add_action( 'admin_init', array( $this, 'admin_init' ) );

if ( ! Jetpack::is_module_active( 'likes' ) ) {
Expand Down Expand Up @@ -117,10 +117,6 @@ public function add_like_count_column( $columns ) {
}

public function frontend_init() {
if ( is_admin() ) {
return;
}

if ( Jetpack_AMP_Support::is_amp_request() ) {
return;
}
Expand Down

0 comments on commit b4565df

Please sign in to comment.