GravityKit\GravityView\Core\Plugin
The GravityView WordPress plugin class.
Since:
2.03.0.0(Migrated to GravityKit\GravityView\Core namespace.)
Source: src/Core/Plugin.php:48
Details
- Kind:
class - Namespace:
GravityKit\GravityView\Core
Properties
| Property | Type | Description |
|---|---|---|
$version | string | The plugin version. |
$min_gf_version | string | Minimum Gravity Forms version. GravityView requires at least this version of Gravity Forms to function properly. |
$settings | \GV\Plugin_Settings | The plugin settings. |
Methods
| Method | Description |
|---|---|
get() | Get the global instance of Plugin. |
load_settings() | Initialize plugin settings. |
is_GF_25() | Check whether Gravity Forms is v2.5-beta or newer |
is_network_activated() | Check whether GravityView `is network activated. |
include_legacy_frontend() | Include more legacy stuff. |
include_legacy_core() | Load legacy core files and instantiate side-effect classes. |
register_activation_hooks() | Register hooks that are fired when the plugin is activated and deactivated. |
dir() | Retrieve an absolute path within the GravityView plugin directory. |
relpath() | Retrieve a relative path to the GravityView plugin directory from the WordPress plugin directory |
url() | Retrieve a URL within the GravityView plugin directory. |
is_compatible() | Is everything compatible with this version of GravityView? |
is_compatible_future_php() | Is this version of GravityView compatible with the future required version of PHP? |
is_compatible_wordpress() | Is this version of GravityView compatible with the current version of WordPress? |
is_compatible_future_wordpress() | Is this version of GravityView compatible with the future version of WordPress? |
is_compatible_gravityforms() | Is this version of GravityView compatible with the current version of Gravity Forms? |
is_compatible_future_gravityforms() | Is this version of GravityView compatible with the future version of Gravity Forms? |
supports() | Feature support detection. |
uninstall() | Delete GravityView Views, settings, roles, caps, etc. |
uninstall_hook() | Plugin uninstall hook callback. |
setup_gravitykit_admin_menu_redirects() | Redirects GravityKit's GravityView submenu pages to the appropriate custom post endpoints. |
get_link_to_new_view() | Returns the URL to the "New View" page. |
get_link_to_all_views() | Returns the URL to the "All Views" page. |
add_to_gravitykit_admin_menu() | Adds "All Views" and "New View" as submenus to the GravityKit menu. |
Method Reference
get()
public static function get()
Get the global instance of Plugin.
Returns
- \GravityKit\GravityView\Core\Plugin — The global instance of GravityView Plugin.
Source: src/Core/Plugin.php:134
load_settings()
public function load_settings()
Initialize plugin settings.
Since:
2.03.0.0(Removed direct file loading in favor of Composer autoloading.)
Source: src/Core/Plugin.php:166
is_GF_25()
public function is_GF_25()
Check whether Gravity Forms is v2.5-beta or newer
Returns
bool
Source: src/Core/Plugin.php:177
is_network_activated()
public static function is_network_activated()
Check whether GravityView `is network activated.
Returns
bool— Whether it's network activated or not.
Source: src/Core/Plugin.php:187
include_legacy_frontend()
public function include_legacy_frontend( $force=false )
Include more legacy stuff.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$force | boolean | false | Whether to force the includes. |
Returns
void
Since:
2.03.0.0(Removed direct file loading in favor of Composer autoloading.)
Deprecated: 3.0.0 (Direct file loading removed; classes now resolve via Composer autoloading.)
Source: src/Core/Plugin.php:205
include_legacy_core()
public function include_legacy_core()
Load legacy core files and instantiate side-effect classes.
Class files are resolved via Composer autoloading (PSR-4 and classmap). Only non-class registration scripts are explicitly included here.
Returns
void
Since:
2.03.0.0(Removed direct class file loading in favor of Composer autoloading.)
Deprecated: 3.0.0 (Direct file loading removed; classes now resolve via Composer autoloading.)
Source: src/Core/Plugin.php:241
register_activation_hooks()
public function register_activation_hooks()
Register hooks that are fired when the plugin is activated and deactivated.
Returns
void
Source: src/Core/Plugin.php:298
dir()
public function dir( $path='' )
Retrieve an absolute path within the GravityView plugin directory.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$path | string | '' | Optional. Append this extra path component. |
Returns
string— The absolute path to the plugin directory.
Since: 2.0
Source: src/Core/Plugin.php:363
relpath()
public function relpath( $path='' )
Retrieve a relative path to the GravityView plugin directory from the WordPress plugin directory
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$path | string | '' | Optional. Append this extra path component. |
Returns
string— The relative path to the plugin directory from the plugin directory.
Since: 2.2.3
Source: src/Core/Plugin.php:377
url()
public function url( $path='/' )
Retrieve a URL within the GravityView plugin directory.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$path | string | '/' | Optional. Extra path appended to the URL. |
Returns
string— The URL to this plugin, with trailing slash.
Since: 2.0
Source: src/Core/Plugin.php:393
is_compatible()
public function is_compatible()
Is everything compatible with this version of GravityView?
Returns
bool
Since: 2.0
Source: src/Core/Plugin.php:406
is_compatible_future_php()
public function is_compatible_future_php(): bool
Is this version of GravityView compatible with the future required version of PHP?