Skip to content

Commit

Permalink
Merge pull request #2570 from ampproject/remove/validation-stats-from…
Browse files Browse the repository at this point in the history
…-at-a-glance

Omit validation results from At a Glance if Website not enabled
  • Loading branch information
westonruter authored Jun 11, 2019
2 parents f6f1162 + 442e571 commit 13114be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/validation/class-amp-validated-url-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ public static function should_show_in_menu() {
public static function add_admin_hooks() {
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_post_list_screen_scripts' ) );

add_filter( 'dashboard_glance_items', array( __CLASS__, 'filter_dashboard_glance_items' ) );
add_action( 'rightnow_end', array( __CLASS__, 'print_dashboard_glance_styles' ) );
if ( AMP_Options_Manager::is_website_experience_enabled() ) {
add_filter( 'dashboard_glance_items', array( __CLASS__, 'filter_dashboard_glance_items' ) );
add_action( 'rightnow_end', array( __CLASS__, 'print_dashboard_glance_styles' ) );
}

// Edit post screen hooks.
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_edit_post_screen_scripts' ) );
Expand Down

0 comments on commit 13114be

Please sign in to comment.