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

Public Member Functions

 __construct ()
 
 backend_actions ()
 Function to launch admin objects. More...
 

Static Public Member Functions

static add_notice ( $notice=array())
 Add a notice to be displayed in the admin. More...
 
static check_gravityforms ()
 Check if Gravity Forms plugin is active and show notice if not. More...
 
static connected_form_warning ( $form_id=0)
 Display error HTML in Edit View when the form is in the trash or no longer exists in Gravity Forms. More...
 
static get_floaty ()
 Get an image of our intrepid explorer friend. More...
 
static get_notices ()
 Get admin notices. More...
 
static get_plugin_status ( $location='')
 Check if specified plugin is active, inactive or not installed. More...
 
static is_admin_page ( $hook='', $page=NULL)
 Is the current admin page a GravityView-related page? More...
 
static no_views_text ()
 Get text for no views found. More...
 

Private Member Functions

 add_hooks ()
 
 include_required_files ()
 

Detailed Description

Definition at line 3 of file class-admin.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 5 of file class-admin.php.

References add_hooks(), gravityview(), and include_required_files().

Member Function Documentation

◆ add_hooks()

add_hooks ( )
private
Since
1.7.5
Returns
void

Definition at line 37 of file class-admin.php.

Referenced by __construct().

◆ add_notice()

static add_notice (   $notice = array())
static

Add a notice to be displayed in the admin.

Parameters
array$noticeArray with class and message keys. The message is not escaped.

Definition at line 246 of file class-admin.php.

References GravityView_Admin_Notices\add_notice().

◆ backend_actions()

backend_actions ( )

Function to launch admin objects.

Returns
void

"GRAVITYVIEW_DIR" "../"

Runs Actions:
gravityview_include_backend_actions Triggered after all GravityView admin files are loaded

Nice place to insert extensions' backend stuff

Definition at line 120 of file class-admin.php.

References GRAVITYVIEW_DIR.

◆ check_gravityforms()

static check_gravityforms ( )
static

Check if Gravity Forms plugin is active and show notice if not.

See also
GravityView_Compatibility::get_plugin_status()
Returns
boolean True: checks have been passed; GV is fine to run; False: checks have failed, don't continue loading

Definition at line 257 of file class-admin.php.

References GravityView_Compatibility\check_gravityforms().

◆ connected_form_warning()

static connected_form_warning (   $form_id = 0)
static

Display error HTML in Edit View when the form is in the trash or no longer exists in Gravity Forms.

Since
1.19
Parameters
int$form_idGravity Forms
Returns
void

Definition at line 84 of file class-admin.php.

References $form_id, gravityview_get_floaty(), and gravityview_get_link().

◆ get_floaty()

static get_floaty ( )
static

Get an image of our intrepid explorer friend.

Returns
string HTML image tag with floaty's cute mug on it

Definition at line 146 of file class-admin.php.

References GV\$form, $image, $post, gravityview_get_floaty(), gravityview_get_form(), and gravityview_get_form_id().

Referenced by GravityView_Search_WP_Widget\form(), oEmbed\render_admin(), and oEmbed\render_preview_notice().

◆ get_notices()

static get_notices ( )
static

Get admin notices.

Returns
array

Definition at line 237 of file class-admin.php.

References GravityView_Admin_Notices\get_notices().

◆ get_plugin_status()

static get_plugin_status (   $location = '')
static

Check if specified plugin is active, inactive or not installed.

See also
GravityView_Compatibility::get_plugin_status()
Returns
boolean|string True: plugin is active; False: plugin file doesn't exist at path; 'inactive' it's inactive

Definition at line 269 of file class-admin.php.

References GravityView_Compatibility\get_plugin_status().

◆ include_required_files()

include_required_files ( )
private
Since
1.15
Returns
void

Definition at line 22 of file class-admin.php.

References GRAVITYVIEW_DIR.

Referenced by __construct().

◆ is_admin_page()

static is_admin_page (   $hook = '',
  $page = NULL 
)
static

Is the current admin page a GravityView-related page?

Parameters
string$hook
null | string$pageOptional. String return value of page to compare against.
Returns
bool|string If false, not a GravityView page. true if $page is passed and is the same as current page. Otherwise, the name of the page (single, settings, or views)

Definition at line 282 of file class-admin.php.

References gravityview().

◆ no_views_text()

static no_views_text ( )
static

Get text for no views found.

Since
1.18 Moved to GravityView_Admin
Returns
string HTML message with no container tags.

Definition at line 55 of file class-admin.php.

References $image, $output, and GVCommon\has_cap().

Referenced by GravityView_Admin_Add_Shortcode\add_shortcode_popup(), GravityView_Search_WP_Widget\form(), GravityView_Recent_Entries_Widget\form(), and View\register_post_type().


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