Feature_Manager
Feature Manager class.
All features default to enabled — a missing settings key means the feature is on, so upgrades see no change in behaviour. Reads the raw settings option directly instead of tptn_get_option(), which would load the admin Settings class on every request; this makes the check safe to call at plugins_loaded.
Namespace: WebberZone\Top_Ten
Since: 4.4.0
Source: includes/class-feature-manager.php line 26
Methods
get_features() static
Get the map of toggleable features.
Since: 4.4.0
Line: 44
static public function get_features( ): array;
Returns: array — Associative array of feature ID => array with ‘setting’ and ‘default’ keys.
is_enabled() static
Whether a feature is enabled.
A feature is enabled when its setting is missing (default) or truthy. Unknown feature IDs are treated as enabled.
Since: 4.4.0
Line: 117
static public function is_enabled( string $feature ): bool;
| Type | Name | Description |
|---|---|---|
string |
$feature |
Feature ID. |
Returns: bool — Whether the feature is enabled.