Skip to content

Commit

Permalink
Merge pull request #2312 from 10up/fix/indexing-button-health-page
Browse files Browse the repository at this point in the history
Fix indexing button on health screen
  • Loading branch information
felipeelia authored Aug 19, 2021
2 parents 35bffb8 + 8b043d9 commit e326f15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ function action_admin_enqueue_dashboard_scripts() {
wp_enqueue_script( 'ep_admin_sites_scripts', EP_URL . 'dist/js/admin-script.min.js', [ 'jquery' ], EP_VERSION, true );
}

if ( in_array( Screen::factory()->get_current_screen(), [ 'dashboard', 'settings' ], true ) ) {
if ( in_array( Screen::factory()->get_current_screen(), [ 'dashboard', 'settings', 'health' ], true ) ) {
wp_enqueue_script( 'ep_dashboard_scripts', EP_URL . 'dist/js/dashboard-script.min.js', [ 'jquery', 'wp-color-picker' ], EP_VERSION, true );

$data = array( 'nonce' => wp_create_nonce( 'ep_dashboard_nonce' ) );
Expand Down
8 changes: 8 additions & 0 deletions includes/partials/stats-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@

require_once __DIR__ . '/header.php';

if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) {
$index_meta = get_site_option( 'ep_index_meta', false );
} else {
$index_meta = get_option( 'ep_index_meta', false );
}

Stats::factory()->build_stats();

$index_health = Stats::factory()->get_health();
$totals = Stats::factory()->get_totals();
?>

<div class="error-overlay <?php if ( ! empty( $index_meta ) ) : ?>syncing<?php endif; ?>"></div>
<div class="wrap metabox-holder">
<h1><?php esc_html_e( 'Index Health', 'elasticpress' ); ?></h1>

Expand Down

0 comments on commit e326f15

Please sign in to comment.