PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.2
WebberZone Top 10 — Popular Posts v4.5.2
4.5.2 4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 All 118 releases
← All changes | includes/class-feature-manager.php +24 -9 4.4.3 → 4.5.2 View file →
@@ -15,18 +15,13 @@
15 15
16 16 /**
17 17 * Feature Manager class.
18 18 *
19 - * Reads the raw settings option to determine whether an optional feature
20 - * should be instantiated. All features default to enabled - a missing
21 - * settings key means the feature is on, so upgrades see no change in
22 - * behaviour.
19 + * All features default to enabled — a missing settings key means the feature is on, so
20 + * upgrades see no change in behaviour. Reads the raw settings option directly instead
21 + * of tptn_get_option(), which would load the admin Settings class on every request;
22 + * this makes the check safe to call at plugins_loaded.
23 23 *
24 - * This class intentionally does not use tptn_get_option(): that function
25 - * falls back to the registered settings defaults, which would load the
26 - * admin Settings class on every request. It is safe to call at
27 - * plugins_loaded.
28 - *
29 24 * @since 4.4.0
30 25 */
31 26 class Feature_Manager {
32 27
@@ -59,8 +54,16 @@
59 54 'legacy_widgets' => array(
60 55 'setting' => 'enable_legacy_widgets',
61 56 'default' => true,
62 57 ),
58 + 'rest_api' => array(
59 + 'setting' => 'enable_rest_api',
60 + 'default' => true,
61 + ),
62 + 'lazy_load' => array(
63 + 'setting' => 'enable_lazy_load',
64 + 'default' => true,
65 + ),
63 66 'query_block' => array(
64 67 'setting' => 'enable_query_block',
65 68 'default' => true,
66 69 ),
@@ -81,8 +84,20 @@
81 84 'default' => true,
82 85 ),
83 86 'popular_authors' => array(
84 87 'setting' => 'enable_popular_authors',
88 + 'default' => true,
89 + ),
90 + 'page_builders' => array(
91 + 'setting' => 'enable_page_builders',
92 + 'default' => true,
93 + ),
94 + 'sitewide_tracking' => array(
95 + 'setting' => 'enable_sitewide_tracking',
96 + 'default' => true,
97 + ),
98 + 'daily_table_rollup' => array(
99 + 'setting' => 'enable_daily_table_rollup',
85 100 'default' => true,
86 101 ),
87 102 );
88 103