GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Static Public Member Functions
Core Class Reference

Static Public Member Functions

static get_assets_path ( $file='')
 Returns path to UI assets. More...
 
static get_assets_url ( $file='')
 Returns URL to UI assets. More...
 
static get_installed_plugin_by_text_domain ( $text_domains_str)
 Searches installed plugin by text domain(s) and returns its data. More...
 
static get_installed_plugins ()
 Returns a list of installed products keyed by text domain. More...
 
static get_plugin_data ( $plugin_file, $markup=true, $translate=true)
 Wrapper for WP's get_plugin_data() function. More...
 
static get_plugins ()
 Wrapper for WP's get_plugins() function. More...
 
static is_callable_class_method ( $value)
 Checks if value is a callable class method. More...
 
static is_callable_function ( $value)
 Checks if value is a callable function. More...
 
static is_main_network_site ()
 Checks if the current page is a main network site, but not the network admin area. More...
 
static is_network_admin ()
 Checks if the current page is a network admin area. More...
 
static is_not_main_network_site ()
 Checks if the current page is not a main network site. More...
 
static process_return ( $return_object=true)
 Processes return object based on the request type (e.g., AJAX) and status. More...
 

Detailed Description

Definition at line 14 of file Helpers/Core.php.

Member Function Documentation

◆ get_assets_path()

static get_assets_path (   $file = '')
static

Returns path to UI assets.

Since
1.0.0
Parameters
string$file(optional) File name to append to path.
Returns
string

Definition at line 61 of file Helpers/Core.php.

◆ get_assets_url()

static get_assets_url (   $file = '')
static

Returns URL to UI assets.

Since
1.0.0
Parameters
string$file(optional) File name to append to URL.
Returns
string

Definition at line 76 of file Helpers/Core.php.

References $url.

◆ get_installed_plugin_by_text_domain()

static get_installed_plugin_by_text_domain (   $text_domains_str)
static

Searches installed plugin by text domain(s) and returns its data.

Since
1.0.0
1.0.4 Moved from GravityKit to GravityKit.
Parameters
string$text_domains_strText domain(s). Optionally pipe-separated (e.g. 'gravityview|gk-gravtiyview').
Returns
array|null An array with plugin data or null if not installed.

Definition at line 179 of file Helpers/Core.php.

◆ get_installed_plugins()

static get_installed_plugins ( )
static

Returns a list of installed products keyed by text domain.

Since
1.0.0
1.0.4 Moved from GravityKit to GravityKit.
Returns
array{name:string, path: string, plugin_file:string, version: string, text_domain: string, active: bool, network_active?: bool}

Definition at line 143 of file Helpers/Core.php.

◆ get_plugin_data()

static get_plugin_data (   $plugin_file,
  $markup = true,
  $translate = true 
)
static

Wrapper for WP's get_plugin_data() function.

See also
https://github.com/WordPress/wordpress-develop/blob/2bb5679d666474d024352fa53f07344affef7e69/src/wp-admin/includes/plugin.php#L72-L118
Since
1.0.0
Parameters
string$plugin_fileAbsolute path to the main plugin file.
bool$markup(optional) If the returned data should have HTML markup applied. Default is true.
bool$translate(optional) If the returned data should be translated. Default is true.
Returns
array[]

Definition at line 206 of file Helpers/Core.php.

Referenced by GravityKit\GravityView\Foundation\is_disabled_via_url(), and GravityKit\GravityView\Foundation\meets_min_php_version_requirement().

◆ get_plugins()

static get_plugins ( )
static

◆ is_callable_class_method()

static is_callable_class_method (   $value)
static

Checks if value is a callable class method.

Since
1.0.0
Parameters
array | mixed$valueValue to check.
Returns
bool

Definition at line 237 of file Helpers/Core.php.

References $value.

◆ is_callable_function()

static is_callable_function (   $value)
static

Checks if value is a callable function.

Since
1.0.0
Parameters
string | mixed$valueValue to check.
Returns
bool

Definition at line 223 of file Helpers/Core.php.

References $value.

◆ is_main_network_site()

static is_main_network_site ( )
static

Checks if the current page is a main network site, but not the network admin area.

Since
1.0.4
Returns
bool

Definition at line 103 of file Helpers/Core.php.

◆ is_network_admin()

static is_network_admin ( )
static

Checks if the current page is a network admin area.

The AJAX check is not to be fully relied upon as the referer can be changed.

Since
1.0.0
Returns
bool

Definition at line 90 of file Helpers/Core.php.

◆ is_not_main_network_site()

static is_not_main_network_site ( )
static

Checks if the current page is not a main network site.

Since
1.0.4
Returns
bool

Definition at line 114 of file Helpers/Core.php.

◆ process_return()

static process_return (   $return_object = true)
static

Processes return object based on the request type (e.g., AJAX) and status.

Since
1.0.0
Parameters
mixed | Exception$return_objectReturn object (default: 'true').
Exceptions
Exception
Returns
void|mixed Send JSON response if an AJAX request or return the response as is.

Definition at line 26 of file Helpers/Core.php.


The documentation for this class was generated from the following file: