![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Public Member Functions | |
| activate_product ( $product) | |
| Activates a product. More... | |
| ajax_activate_product (array $payload) | |
| AJAX request wrapper for the activate_product() method. More... | |
| ajax_deactivate_product (array $payload) | |
| AJAX request wrapper for the deactivate_product() method. More... | |
| ajax_get_products_data (array $payload) | |
| AJAX request wrapper for the {. More... | |
| ajax_install_product (array $payload) | |
| AJAX request wrapper for the install_product() method. More... | |
| ajax_update_product (array $payload) | |
| AJAX request wrapper for the update_product() method. More... | |
| configure_ajax_routes (array $routes) | |
| Configures AJAX routes handled by this class. More... | |
| deactivate_product ( $product) | |
| Deactivates a product. More... | |
| display_product_action_links ( $links, $product_path) | |
| Displays action links (e.g., Settings, Support, etc.) for each product in the Plugins page. More... | |
| get_products_data (array $args=[]) | |
| Returns a list of all GravityKit products with associated installation/activation/licensing data. More... | |
| get_remote_products () | |
| Returns a list of all GravityKit products from the API grouped by category (e.g., plugins, extensions, etc.). More... | |
| init () | |
| Initializes the class. More... | |
| install_product (array $product) | |
| Installs a product. More... | |
| is_product_active_in_current_context ( $plugin) | |
| Checks if plugin is activated in the current context (network or site). More... | |
| update_product ( $product_path) | |
| Updates a product. More... | |
| update_submenu_badge_count () | |
| Optionally updates the Licenses submenu badge count if any of the products have newer versions available. More... | |
| validate_product_plugin_dependencies ( $dependencies) | |
| Validates product plugin dependencies. More... | |
| validate_product_system_requirements ( $requirements) | |
| Validates product system requirements. More... | |
Static Public Member Functions | |
| static | get_instance () |
| Returns class instance. More... | |
Data Fields | |
| const | EDD_PRODUCTS_API_ENDPOINT = 'https://www.gravitykit.com/edd-api/products/' |
| const | EDD_PRODUCTS_API_KEY = 'e4c7321c4dcf342c9cb078e27bf4ba97' |
| const | EDD_PRODUCTS_API_TOKEN = 'e031fd350b03bc223b10f04d8b5dde42' |
Static Private Attributes | |
| static | $_instance |
Definition at line 20 of file ProductManager.php.
| activate_product | ( | $product | ) |
Activates a product.
| string | $product |
| Exception |
Definition at line 243 of file ProductManager.php.
References ProductManager\is_product_active_in_current_context().
Referenced by ProductManager\ajax_activate_product(), ProductManager\install_product(), and ProductManager\update_product().
| ajax_activate_product | ( | array | $payload | ) |
AJAX request wrapper for the activate_product() method.
| array | $payload |
| Exception |
Definition at line 220 of file ProductManager.php.
References ProductManager\activate_product(), and Framework\get_instance().
| ajax_deactivate_product | ( | array | $payload | ) |
AJAX request wrapper for the deactivate_product() method.
| array | $payload |
| Exception |
Definition at line 271 of file ProductManager.php.
References ProductManager\deactivate_product(), and Framework\get_instance().
| ajax_get_products_data | ( | array | $payload | ) |
AJAX request wrapper for the {.
| array | $payload |
| Exception |
Definition at line 510 of file ProductManager.php.
References Encryption\get_instance(), Framework\get_instance(), ProductManager\get_products_data(), and Core\get_request_unique_string().
| ajax_install_product | ( | array | $payload | ) |
AJAX request wrapper for the install_product() method.
| array | $payload |
| Exception |
Definition at line 104 of file ProductManager.php.
References Framework\get_instance(), and ProductManager\install_product().
| ajax_update_product | ( | array | $payload | ) |
AJAX request wrapper for the update_product() method.
| array | $payload |
| Exception |
Definition at line 322 of file ProductManager.php.
References Framework\get_instance(), and ProductManager\update_product().
| configure_ajax_routes | ( | array | $routes | ) |
Configures AJAX routes handled by this class.
| array | $routes | AJAX action to class method map. |
Definition at line 83 of file ProductManager.php.
| deactivate_product | ( | $product | ) |
Deactivates a product.
| string | $product |
| Exception |
Definition at line 294 of file ProductManager.php.
References ProductManager\is_product_active_in_current_context().
Referenced by ProductManager\ajax_deactivate_product().
| display_product_action_links | ( | $links, | |
| $product_path | |||
| ) |
Displays action links (e.g., Settings, Support, etc.) for each product in the Plugins page.
| array | $links | Links associated with the product. |
| string | $product_path | Product path. |
gk/foundation/products/{$product_slug}/action-links Sets product action links in the Plugins page.| array | $links | Combined GravityKit and original action links. |
| array | $gk_links | GravityKit-added action links. |
| array | $link | Original action links. |
Definition at line 762 of file ProductManager.php.
References ProductManager\get_products_data().
|
static |
Returns class instance.
Definition at line 41 of file ProductManager.php.
Referenced by Framework\ajax_get_app_data(), EDD\check_for_product_updates(), LicenseManager\display_license_info_on_plugins_page(), EDD\display_product_information(), Framework\init(), and LicenseManager\update_submenu_badge_count().
| get_products_data | ( | array | $args = [] | ) |
Returns a list of all GravityKit products with associated installation/activation/licensing data.
| array | $args | (optional) Additional arguments. Default: ['skip_cache' => false, 'group_by_category' => false, 'key_by' => 'path']. |
| Exception |
gk/foundation/settings/{$product_slug}/settings-url Sets link to the product settings page.| string | $settings_url | URL to the product settings page. |
gk/foundation/products/data Modifies products data object.| array | $products | Products data. |
| array | $args | Additional arguments passed to the get_products_data() method. |
Definition at line 552 of file ProductManager.php.
References $args, LicenseManager\get_instance(), ProductManager\get_remote_products(), Framework\ID, ProductManager\validate_product_plugin_dependencies(), and ProductManager\validate_product_system_requirements().
Referenced by ProductManager\ajax_get_products_data(), ProductManager\display_product_action_links(), ProductManager\update_product(), and ProductManager\update_submenu_badge_count().
| get_remote_products | ( | ) |
Returns a list of all GravityKit products from the API grouped by category (e.g., plugins, extensions, etc.).
| Exception |
Definition at line 417 of file ProductManager.php.
References Arr\get(), and Helpers\query_api().
Referenced by ProductManager\get_products_data().
| init | ( | ) |
Initializes the class.
Definition at line 56 of file ProductManager.php.
References Framework\AJAX_ROUTER, and ProductManager\update_submenu_badge_count().
| install_product | ( | array | $product | ) |
Installs a product.
| array | $product |
| Exception |
Definition at line 129 of file ProductManager.php.
References ProductManager\activate_product(), and LicenseManager\get_instance().
Referenced by ProductManager\ajax_install_product().
| is_product_active_in_current_context | ( | $plugin | ) |
Checks if plugin is activated in the current context (network or site).
Definition at line 647 of file ProductManager.php.
Referenced by ProductManager\activate_product(), and ProductManager\deactivate_product().
| update_product | ( | $product_path | ) |
Updates a product.
| string | $product_path |
| Exception |
Definition at line 345 of file ProductManager.php.
References $args, $url, ProductManager\activate_product(), EDD\get_instance(), and ProductManager\get_products_data().
Referenced by ProductManager\ajax_update_product().
| update_submenu_badge_count | ( | ) |
Optionally updates the Licenses submenu badge count if any of the products have newer versions available.
Definition at line 658 of file ProductManager.php.
References $update_count, Framework\get_instance(), ProductManager\get_products_data(), and Framework\ID.
Referenced by ProductManager\init().
| validate_product_plugin_dependencies | ( | $dependencies | ) |
Validates product plugin dependencies.
| array | $dependencies |
Definition at line 732 of file ProductManager.php.
Referenced by ProductManager\get_products_data().
| validate_product_system_requirements | ( | $requirements | ) |
Validates product system requirements.
| array | $requirements |
Definition at line 696 of file ProductManager.php.
Referenced by ProductManager\get_products_data().
|
staticprivate |
Definition at line 32 of file ProductManager.php.
| const EDD_PRODUCTS_API_ENDPOINT = 'https://www.gravitykit.com/edd-api/products/' |
Definition at line 21 of file ProductManager.php.
| const EDD_PRODUCTS_API_KEY = 'e4c7321c4dcf342c9cb078e27bf4ba97' |
Definition at line 23 of file ProductManager.php.
| const EDD_PRODUCTS_API_TOKEN = 'e031fd350b03bc223b10f04d8b5dde42' |
Definition at line 25 of file ProductManager.php.