![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Public Member Functions | |
| add_gk_submenu_item () | |
| Adds Settings submenu to the GravityKit top-level admin menu. More... | |
| are_setting_requirements_met ( $plugin_setting, $settings) | |
| Determines if a setting's requirements are met based on the value(s) of other setting(s). More... | |
| configure_ajax_routes (array $routes) | |
| Configures AJAX routes handled by this class. More... | |
| enqueue_assets ( $page) | |
| Enqueues UI assets. More... | |
| get_all_settings ( $site_id=null) | |
| Gets settings for all GravityKit plugins. More... | |
| get_default_settings ( $plugin_id=null) | |
| Returns default settings for a plugin all plugins. More... | |
| get_plugin_setting ( $plugin, $plugin_setting_name, $default=null, $site_id=null) | |
| Gets a single setting for a GravityKit plugin. More... | |
| get_plugin_settings ( $plugin, $site_id=null) | |
| Get all settings for a GravityKit plugin. More... | |
| get_plugin_settings_url ( $plugin_id) | |
| Returns link to the plugin settings page. More... | |
| get_plugins_settings_data () | |
| Returns settings data object for all plugins. More... | |
| init () | |
| Initializes Settings framework. More... | |
| save_all_settings (array $settings, $site_id=null) | |
| Saves settings for all GravityKit plugins. More... | |
| save_plugin_setting ( $plugin, $plugin_setting_name, $plugin_setting_value, $site_id=null) | |
| Saves a single setting for a GravityKit plugin. More... | |
| save_plugin_settings ( $plugin, array $plugin_settings, $site_id=null) | |
| Saves all settings for a GravityKit plugin. More... | |
| save_ui_settings (array $settings_data) | |
| Saves UI settings. More... | |
Static Public Member Functions | |
| static | get_instance () |
| Returns class instance. More... | |
Data Fields | |
| const | AJAX_ROUTER = 'settings' |
| const | ID = 'gk_settings' |
Private Member Functions | |
| __construct () | |
Private Attributes | |
| $_capability = 'manage_options' | |
| $_settings_data = [] | |
| $_validator | |
Static Private Attributes | |
| static | $_instance |
Definition at line 19 of file Settings/Framework.php.
|
private |
gk/foundation/settings/capability Modifies capability to access GravityKit Settings.| string | $capability | Capability. |
Definition at line 54 of file Settings/Framework.php.
| add_gk_submenu_item | ( | ) |
Adds Settings submenu to the GravityKit top-level admin menu.
Definition at line 341 of file Settings/Framework.php.
References AdminMenu\add_submenu_item().
Referenced by Framework\init().
| are_setting_requirements_met | ( | $plugin_setting, | |
| $settings | |||
| ) |
Determines if a setting's requirements are met based on the value(s) of other setting(s).
| array | $plugin_setting | Individual plugin setting as configured using the gk/foundation/settings/data/plugins filter. |
| array | $settings | Setting ID:value pairs. |
Definition at line 582 of file Settings/Framework.php.
References $settings, and Helpers\compare_values().
Referenced by Framework\save_ui_settings().
| configure_ajax_routes | ( | array | $routes | ) |
Configures AJAX routes handled by this class.
| array | $routes | AJAX route to class method map. |
Definition at line 121 of file Settings/Framework.php.
| enqueue_assets | ( | $page | ) |
Enqueues UI assets.
| string | $page | Current page. |
gk/foundation/settings/data/config Modifies global settings configuration.| array | $config | Configuration. |
Definition at line 379 of file Settings/Framework.php.
References Framework\get_plugin_settings_url(), Framework\get_plugins_settings_data(), Arr\pluck(), and AdminMenu\remove_submenu_item().
| get_all_settings | ( | $site_id = null | ) |
Gets settings for all GravityKit plugins.
| int | null | $site_id | (optional) Site ID for which to get settings. Default is null (i.e, current site ID). |
Definition at line 136 of file Settings/Framework.php.
References Framework\get_default_settings(), and Framework\get_plugins_settings_data().
Referenced by Framework\get_plugin_settings(), and Framework\save_plugin_settings().
| get_default_settings | ( | $plugin_id = null | ) |
Returns default settings for a plugin all plugins.
Default settings are defined in the plugin's settings object under the defaults key.
| $plugin_id |
Definition at line 199 of file Settings/Framework.php.
References Arr\get(), and Framework\get_plugins_settings_data().
Referenced by Framework\get_all_settings().
|
static |
Returns class instance.
Definition at line 74 of file Settings/Framework.php.
| get_plugin_setting | ( | $plugin, | |
| $plugin_setting_name, | |||
$default = null, |
|||
$site_id = null |
|||
| ) |
Gets a single setting for a GravityKit plugin.
| string | $plugin | Plugin ID as specified in the settings object. |
| string | $plugin_setting_name | Setting name as specified in the settings object. |
| null | array | mixed | $default | (optional) Default value to return if the setting is not found. Default is null. |
| int | null | $site_id | (optional) Site ID for which to get settings. Default is null (i.e., current site ID). * |
Definition at line 245 of file Settings/Framework.php.
References Framework\get_plugin_settings().
| get_plugin_settings | ( | $plugin, | |
$site_id = null |
|||
| ) |
Get all settings for a GravityKit plugin.
| string | $plugin | |
| int | null | $site_id | (optional) Site ID for which to get settings. Default is null (i.e., current site ID). |
Definition at line 294 of file Settings/Framework.php.
References $settings, and Framework\get_all_settings().
Referenced by Framework\get_plugin_setting(), and Framework\save_plugin_setting().
| get_plugin_settings_url | ( | $plugin_id | ) |
Returns link to the plugin settings page.
| string | $plugin_id |
Definition at line 363 of file Settings/Framework.php.
Referenced by Framework\enqueue_assets().
| get_plugins_settings_data | ( | ) |
Returns settings data object for all plugins.
gk/foundation/settings/data/plugins Modifies plugins' settings.| array | $plugins_data | Plugins data. |
Definition at line 169 of file Settings/Framework.php.
Referenced by Framework\enqueue_assets(), Framework\get_all_settings(), Framework\get_default_settings(), and Framework\save_ui_settings().
| init | ( | ) |
Initializes Settings framework.
gk/foundation/settings/initialized Fires when the class has finished initializing.| $this |
Definition at line 89 of file Settings/Framework.php.
References Framework\add_gk_submenu_item().
| save_all_settings | ( | array | $settings, |
$site_id = null |
|||
| ) |
Saves settings for all GravityKit plugins.
| array | $settings | |
| int | null | $site_id | (optional) Site ID for which to save settings. Default is null (i.e., current site ID). |
Definition at line 225 of file Settings/Framework.php.
References $settings.
Referenced by Framework\save_plugin_settings().
| save_plugin_setting | ( | $plugin, | |
| $plugin_setting_name, | |||
| $plugin_setting_value, | |||
$site_id = null |
|||
| ) |
Saves a single setting for a GravityKit plugin.
| string | $plugin | |
| string | $plugin_setting_name | |
| mixed | $plugin_setting_value | |
| int | null | $site_id | (optional) Site ID for which to save settings. Default is null (i.e., current site ID). |
Definition at line 274 of file Settings/Framework.php.
References Framework\get_plugin_settings(), and Framework\save_plugin_settings().
| save_plugin_settings | ( | $plugin, | |
| array | $plugin_settings, | ||
$site_id = null |
|||
| ) |
Saves all settings for a GravityKit plugin.
| string | $plugin | |
| array | $plugin_settings | |
| int | null | $site_id | (optional) Site ID for which to save settings. Default is null (i.e, current site ID). |
gk/foundation/settings/{plugin}/save/before Modifies plugin settings object before saving.| array | $settings | Plugin settings. |
Definition at line 313 of file Settings/Framework.php.
References Framework\get_all_settings(), and Framework\save_all_settings().
Referenced by Framework\save_plugin_setting(), and Framework\save_ui_settings().
| save_ui_settings | ( | array | $settings_data | ) |
Saves UI settings.
| array | $settings_data |
| Exception |
gk/foundation/settings/${plugin}/validation/before Modifies plugin settings object before validation.| array | $ui_settings | Settings. |
gk/foundation/settings/${plugin}/validation/after Modifies plugin settings object after validation.| array | $ui_settings | Settings. |
Definition at line 470 of file Settings/Framework.php.
References $value, Framework\are_setting_requirements_met(), Framework\get_plugins_settings_data(), and Framework\save_plugin_settings().
|
private |
Definition at line 38 of file Settings/Framework.php.
|
staticprivate |
Definition at line 31 of file Settings/Framework.php.
|
private |
Definition at line 52 of file Settings/Framework.php.
|
private |
Definition at line 45 of file Settings/Framework.php.
| const AJAX_ROUTER = 'settings' |
Definition at line 22 of file Settings/Framework.php.
| const ID = 'gk_settings' |
Definition at line 20 of file Settings/Framework.php.