PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-premium-analytics/src/widget-modules.php +8 -4 16.2 → 16.3-beta View file →
@@ -29,12 +29,13 @@
29 29 );
30 30 }
31 31
32 32 /**
33 - * Load and hydrate the widget type registry, once.
33 + * Load the widget type API and the build manifest, once, ahead of the registry's first read.
34 34 *
35 35 * Deferred to the registry's only two readers rather than run at boot: on Simple this file's
36 - * registration runs on every WPCOM public-api request, and most never read the registry.
36 + * registration runs on every WPCOM public-api request, and most never read the registry. The
37 + * registry hydrates itself on that read, from the registration action.
37 38 *
38 39 * @return void
39 40 */
40 41 function ensure_widget_registry_ready() {
@@ -52,10 +53,8 @@
52 53 $widgets_manifest = Analytics::widget_manifest_path();
53 54 if ( file_exists( $widgets_manifest ) ) {
54 55 require_once $widgets_manifest;
55 56 }
56 -
57 - bootstrap_widget_types();
58 57 }
59 58
60 59 /**
61 60 * Build the REST response: one record per available widget type.
@@ -76,9 +75,14 @@
76 75 'category' => $widget_type->category,
77 76 'title' => $widget_type->title,
78 77 'description' => $widget_type->description,
79 78 'help' => $widget_type->help,
79 + 'icon' => $widget_type->icon,
80 + 'actions' => $widget_type->actions,
80 81 'keywords' => $widget_type->keywords,
82 + 'textdomain' => $widget_type->textdomain,
83 + 'i18n_manifest' => $widget_type->i18n_manifest,
84 + 'former_names' => $widget_type->former_names,
81 85 );
82 86 }
83 87
84 88 return rest_ensure_response( $records );