Skip to content

Commit

Permalink
Merge pull request #3149 from 10up/feature/instant-results-network-no…
Browse files Browse the repository at this point in the history
…tice

Add a notice for Instant Results in network mode.
  • Loading branch information
felipeelia committed Nov 23, 2022
2 parents 723f0db + f943a47 commit d46c7d5
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions includes/classes/Feature/InstantResults/InstantResults.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public function output_feature_box_long() {
<?php
printf(
/* translators: %s: ElasticPress.io link. */
esc_html__( 'WordPress search forms will display results instantly. When the search query is submitted, a modal will open that populates results by querying ElasticPress directly, bypassing WordPress. As the user refines their search, results are refreshed. Requires an %s to function.', 'elasticpress' ),
esc_html__( 'WordPress search forms will display results instantly. When the search query is submitted, a modal will open that populates results by querying ElasticPress directly, bypassing WordPress. As the user refines their search, results are refreshed. Requires an %s or a custom proxy to function.', 'elasticpress' ),
sprintf(
'<a href=%1$s target="_blank">%2$s</a>',
'<a href="%1$s" target="_blank">%2$s</a>',
'https://www.elasticpress.io/',
esc_html__( 'ElasticPress.io plan', 'elasticpress' )
)
Expand Down Expand Up @@ -218,6 +218,22 @@ public function requirements_status() {
$status->message[] = wp_kses_post( __( "To use this feature you need to be an <a href='https://elasticpress.io'>ElasticPress.io</a> customer or implement a <a href='https://github.com/10up/elasticpress-proxy'>custom proxy</a>.", 'elasticpress' ) );
}

/**
* Display a warning if ElasticPress is network activated.
*/
if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) {
$status->message[] = wp_kses_post(
sprintf(
/* translators: Article URL */
__(
'ElasticPress is network activated. Additional steps are required to ensure Instant Results works for all sites on the network. See our article on <a href="%s" target="_blank">running ElasticPress in network mode</a> for more details.',
'elasticpress'
),
'https://elasticpress.zendesk.com/hc/en-us/articles/10841087797901-Running-ElasticPress-in-a-WordPress-Multisite-Network-Mode-'
)
);
}

return $status;
}

Expand Down

0 comments on commit d46c7d5

Please sign in to comment.