-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status Report Page #3130
Merged
Merged
Status Report Page #3130
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
180b6ba
Make info "not-private" and adjust add_filter call
felipeelia a84973c
Add notice to sync and install page re- too many fields
felipeelia 8626a1e
Status report page
felipeelia a6953f2
Add some simple style
felipeelia d8395ac
allow var_export
felipeelia 4e55b03
Basic ES info
felipeelia 76b1bb1
sort keys + support to PHP 7
felipeelia 2a7aa89
Improve output hierarchy + more info
felipeelia 5d2e0c5
WordPress Info
felipeelia d02dc51
Copy and paste functionality
felipeelia 68cfd0e
Move StatusReport to Screen
felipeelia 0f21577
Improve readability
felipeelia 58d1759
Status Report intro
felipeelia 2788d29
Move style enqueue to the StatusReport class
felipeelia 5b9fbb4
Limited count of post meta
felipeelia d143b9a
Minor adjustments
felipeelia 0de1e2c
Add more info
felipeelia 0b1cad7
Move autosuggest report
felipeelia 1ccdecc
Cache total fields limit
felipeelia 8fa4a62
Lint
felipeelia a61930e
Remove transients on uninstall
felipeelia 562d4dd
New ep_status_report_reports filter
felipeelia 1d24c9a
Remove duplicated entry
felipeelia bcd162b
small cleanup
felipeelia 03f2e10
Alignment
felipeelia 8b839f1
Unit tests
felipeelia fc8cd02
Only add sku variations if it is really a product
felipeelia ba92554
Take ep_prepare_meta_data into account
felipeelia 2012ee3
Status report refinements.
JakePT d22f944
Merge branch 'feature/addl-debug-info' of github.com:10up/ElasticPres…
JakePT 59eef8b
Merge branch 'develop' into feature/addl-debug-info
felipeelia 46d3383
Add unit tests for get_distinct_meta_field_keys_db
felipeelia 55585d4
Unit tests for get_distinct_meta_field_keys_db_per_post_type
felipeelia 32985ee
More unit tests
felipeelia 8d05abe
Do not recalculate the number of objects found
felipeelia c41b1cb
Update the number of searchable post types
felipeelia 4c3da44
Unit tests for get_index_total_fields_limit
felipeelia 0d46ba2
Fix filter name
felipeelia 9dc62fd
Update aria-controls
felipeelia 65c58de
Cache get_distinct_meta_field_keys_db_per_post_type results
felipeelia 00a3d56
Only allow calls from a specific page
felipeelia 0e72515
Fix e2e test
felipeelia b396cbe
Expand messages a bit
felipeelia 73a5cef
Fix lint
felipeelia 9073aea
remove test code
felipeelia 3dee764
Check all websites
felipeelia 96ec317
EP also needs to be network activated
felipeelia 016e3a6
Refactor multisite check
felipeelia 19066f8
Fix errors when data missing.
JakePT 20b504e
Fix error if indices are missing.
JakePT 8ce3ad0
Add indexable content report.
JakePT 7554b22
Adjust multisite check
felipeelia 7de0e36
Output all keys
felipeelia 4258eda
Make sure the method always return an array
felipeelia 87405b8
Add a notice about limited results (to be reviewed)
felipeelia e746a52
Make sure the transient will be under the limit
felipeelia dda9d0f
Rename ES report and add timeouts
felipeelia a0e6612
dockblocks
felipeelia 09308a2
Restore notice for limited meta key reports.
JakePT f539255
Merge branch 'feature/addl-debug-info' of github.com:10up/ElasticPres…
JakePT c9683e3
Adjust _n calls
felipeelia 9c19731
Cache ep_post_meta_keys_db
felipeelia ee70c03
Cache clear mechanism
felipeelia 02aef0d
Copy adjustments
felipeelia f2a416b
Add Instant Results template to status report.
JakePT a61e0bf
Rename Autosuggest report class.
JakePT 255a2fe
Adjust "use" statements
felipeelia fb80648
Delete ep_meta_field_keys on uninstall
felipeelia 05bde14
New filters + tests
felipeelia 279a0dd
Skip nonce verification for GET
felipeelia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Improve output hierarchy + more info
- Loading branch information
commit 2a7aa89990f926717dc7599b1186c244a0d7100d
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* Feature report class | ||
* | ||
* @since 4.4.0 | ||
* @package elasticpress | ||
*/ | ||
|
||
namespace ElasticPress\StatusReport; | ||
|
||
use \ElasticPress\Features as EP_Features; | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
/** | ||
* Feature report class | ||
* | ||
* @package ElasticPress | ||
*/ | ||
class Features extends Report { | ||
|
||
/** | ||
* Return the report title | ||
* | ||
* @return string | ||
*/ | ||
public function get_title() : string { | ||
return __( 'Features', 'elasticpress' ); | ||
} | ||
|
||
/** | ||
* Return the report fields | ||
* | ||
* @return array | ||
*/ | ||
public function get_groups() : array { | ||
$features_settings = \ElasticPress\Utils\get_option( 'ep_feature_settings', [] ); | ||
|
||
$features = array_filter( | ||
EP_Features::factory()->registered_features, | ||
function( $feature ) { | ||
return $feature->is_active(); | ||
} | ||
); | ||
$features = wp_list_sort( $features, 'title' ); | ||
|
||
$groups = []; | ||
foreach ( $features as $feature ) { | ||
$feature_settings = $features_settings[ $feature->slug ] ?? []; | ||
|
||
$fields = []; | ||
foreach ( $feature_settings as $feature_setting => $value ) { | ||
$fields[ $feature_setting ] = [ | ||
'label' => $feature_setting, | ||
'value' => $value, | ||
]; | ||
} | ||
ksort( $fields ); | ||
|
||
$groups[] = [ | ||
'title' => $feature->title, | ||
'fields' => $fields, | ||
]; | ||
} | ||
|
||
return $groups; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might need some more error handling and casting to ensure it is not causing any errors in case of unexpected results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Casting added in 4258eda. Regarding error handling, do you have any specific scenario in mind @tott? So far, I'm relying on the underlying functions:
$response
is an error, wp_remote_retrieve_body will return an empty stringjson_decode
fails, it will return nullThanks!