GravityView  1.19.4
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...
 
static plugin_action_links ($links)
 Modify plugin action links at plugins screen. More...
 

Private Member Functions

 add_hooks ()
 
 include_required_files ()
 

Detailed Description

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

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

add_hooks ( )
private
Since
1.7.5
Returns
void

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

References GRAVITYVIEW_FILE.

Referenced by __construct().

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 282 of file class-admin.php.

References GravityView_Admin_Notices\add_notice().

backend_actions ( )

Function to launch admin objects.

public

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 133 of file class-admin.php.

References GRAVITYVIEW_DIR.

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 293 of file class-admin.php.

References GravityView_Compatibility\check_gravityforms().

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 98 of file class-admin.php.

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

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 182 of file class-admin.php.

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

Referenced by GravityView_Search_WP_Widget\form(), GravityView_oEmbed\generate_preview_notice(), and GravityView_oEmbed\render_admin().

static get_notices ( )
static

Get admin notices.

Returns
array

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

References GravityView_Admin_Notices\get_notices().

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 305 of file class-admin.php.

References GravityView_Compatibility\get_plugin_status().

include_required_files ( )
private
Since
1.15
Returns
void
Since
1.15
1.6
1.17

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

References GRAVITYVIEW_DIR.

Referenced by __construct().

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|void 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)
Runs Filter:
gravityview_is_admin_page Is the current admin page a GravityView-related page?
Parameters
[in,out]string | bool$is_pageIf false, no. If string, the name of the page (single, settings, or views)
[in]string$hookThe name of the page to check against. Is passed to the method.

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

References $post.

Referenced by GravityView_Theme_Hooks_Elegant_Themes\add_hooks_admin_init(), and gravityview_is_admin_page().

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 69 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(), GravityView_Post_Types\init_post_types(), and View\register_post_type().

static plugin_action_links (   $links)
static

Modify plugin action links at plugins screen.

Since
1.15 Added check for gravityview_view_settings and gravityview_support_port capabilities public
Parameters
array$linksArray of action links under GravityView on the plugin page
Returns
array Action links with Settings and Support included, if the user has the appropriate caps

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

References GVCommon\has_cap().


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