PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | includes/classes/StatusReport/IndexableContent.php +9 -7 5.0.05.3.5 View file →
@@ -16,9 +16,9 @@
16 16 * IndexableContent report class
17 17 *
18 18 * @package ElasticPress
19 19 */
20 -class IndexableContent extends Report {
20 +class IndexableContent extends AjaxReport {
21 21
22 22 /**
23 23 * Return the report title
24 24 *
@@ -23,9 +23,9 @@
23 23 * Return the report title
24 24 *
25 25 * @return string
26 26 */
27 - public function get_title() : string {
27 + public function get_title(): string {
28 28 return __( 'Indexable Content', 'elasticpress' );
29 29 }
30 30
31 31 /**
@@ -32,9 +32,9 @@
32 32 * Return the report fields
33 33 *
34 34 * @return array
35 35 */
36 - public function get_groups() : array {
36 + public function get_groups_ajax(): array {
37 37 return $this->get_indexable_content_groups();
38 38 }
39 39
40 40 /**
@@ -41,9 +41,9 @@
41 41 * Process the indexable content for all sites.
42 42 *
43 43 * @return array
44 44 */
45 - protected function get_indexable_content_groups() : array {
45 + protected function get_indexable_content_groups(): array {
46 46 $groups = [];
47 47
48 48 if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) {
49 49 $sites = Utils\get_sites( 0, true );
@@ -65,9 +65,9 @@
65 65 * Process the indexable content.
66 66 *
67 67 * @return array
68 68 */
69 - protected function get_indexable_content_group() : array {
69 + protected function get_indexable_content_group(): array {
70 70 $post_counts = $this->get_post_count_group();
71 71 $meta_counts = $this->get_post_meta_fields();
72 72
73 73 $fields = array_merge( $post_counts, $meta_counts );
@@ -87,13 +87,14 @@
87 87 * Process the count of all indexable post types and status
88 88 *
89 89 * @return array
90 90 */
91 - protected function get_post_count_group() : array {
91 + protected function get_post_count_group(): array {
92 92 $post_indexable = \ElasticPress\Indexables::factory()->get( 'post' );
93 93 $post_types = $post_indexable->get_indexable_post_types();
94 94
95 95 $post_stati = $post_indexable->get_indexable_post_status();
96 + $fields = [];
96 97
97 98 foreach ( $post_types as $post_type ) {
98 99 $post_type_obj = get_post_type_object( $post_type );
99 100 $post_type_label = $post_type_obj ? $post_type_obj->labels->name : $post_type;
@@ -124,9 +125,9 @@
124 125 * Process the count of meta keys.
125 126 *
126 127 * @return array
127 128 */
128 - protected function get_post_meta_fields() : array {
129 + protected function get_post_meta_fields(): array {
129 130 $post_indexable = \ElasticPress\Indexables::factory()->get( 'post' );
130 131 $post_types = $post_indexable->get_indexable_post_types();
131 132
132 133 $force_refresh = ! empty( $_GET['force_refresh'] ); // phpcs:ignore WordPress.Security.NonceVerification
@@ -133,8 +134,9 @@
133 134
134 135 $fields = [];
135 136 $all_keys = [];
136 137 $post_count_limit = 88000;
138 + $limited = false;
137 139
138 140 foreach ( $post_types as $post_type ) {
139 141 $post_type_obj = get_post_type_object( $post_type );
140 142