GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
The class for a metabox tab in the GravityView View Settings metabox. More...
Public Member Functions | |
__construct ( $id, $title='', $file='', $icon_class_name='', $callback='', $callback_args=array()) | |
Create a new metabox tab. More... | |
parse_icon_class_name ( $icon_class_name='') | |
If the name of the CSS class has dashicon in it, add the dashicons prefix. More... | |
render ( $post) | |
Render the tab. More... | |
Data Fields | |
$icon_class_name = '' | |
$id = '' | |
String for use in the 'id' attribute of tags. More... | |
$title = '' | |
Title of the meta box. More... | |
Protected Attributes | |
$callback = '' | |
Function that fills the box with the desired content. More... | |
$callback_args = array() | |
Optional. More... | |
$context = 'advanced' | |
Optional. More... | |
$priority = '' | |
Optional. More... | |
$render_template_file = '' | |
$screen = '' | |
Optional. More... | |
Private Attributes | |
$prefix = 'gravityview_' | |
The class for a metabox tab in the GravityView View Settings metabox.
Definition at line 10 of file class-gravityview-metabox-tab.php.
__construct | ( | $id, | |
$title = '' , |
|||
$file = '' , |
|||
$icon_class_name = '' , |
|||
$callback = '' , |
|||
$callback_args = array() |
|||
) |
Create a new metabox tab.
$id | string Metabox HTML ID, without gravityview_ prefix | |
string | $title | Name of the metabox. Shown in the tab. |
string | $file | The file name of a file stored in the /gravityview/includes/admin/metaboxes/views/ directory to render the metabox output, or the full path to a file. If defined, callback is not used. |
string | $icon_class_name | Icon class used in vertical tabs. Supports non-dashicon. If dashicons, no need for dashicons prefix |
string | $callback | Function to render the metabox, if $file is not defined. |
array | $callback_args | Arguments passed to the callback |
Definition at line 100 of file class-gravityview-metabox-tab.php.
References $callback, $callback_args, $icon_class_name, $title, and parse_icon_class_name().
parse_icon_class_name | ( | $icon_class_name = '' | ) |
If the name of the CSS class has dashicon in it, add the dashicons
prefix.
string | $icon_class_name | Passed class name |
Definition at line 119 of file class-gravityview-metabox-tab.php.
References $icon_class_name.
Referenced by __construct().
render | ( | $post | ) |
Render the tab.
If the $file parameter was passed when registering a new GravityView_Metabox_Tab, then the file is included.
The include checks for a full file path first, and if a file exists, use that file. If the file doesn't exist, then the code looks inside the [gravityview]/includes/admin/metaboxes/views/ dir.
Finally, if there's no file specified, but there's a $callback parameter specified, use the callback.
WP_Post | $post | Currently edited post object |
Definition at line 143 of file class-gravityview-metabox-tab.php.
References $post, $render_template_file, gravityview(), and GRAVITYVIEW_DIR.
|
protected |
Function that fills the box with the desired content.
The function should echo its output.
callback |
Definition at line 38 of file class-gravityview-metabox-tab.php.
Referenced by __construct().
|
protected |
Optional.
Data that should be set as the $args property of the box array (which is the second parameter passed to your callback). Default null.
array |
Definition at line 71 of file class-gravityview-metabox-tab.php.
Referenced by __construct().
|
protected |
Optional.
The context within the screen where the boxes should display. Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global default is 'advanced'.
string |
Definition at line 57 of file class-gravityview-metabox-tab.php.
$icon_class_name = '' |
Definition at line 85 of file class-gravityview-metabox-tab.php.
Referenced by __construct(), and parse_icon_class_name().
$id = '' |
String for use in the 'id' attribute of tags.
string |
Definition at line 24 of file class-gravityview-metabox-tab.php.
|
private |
Definition at line 17 of file class-gravityview-metabox-tab.php.
|
protected |
Optional.
The priority within the context where the boxes should show ('high', 'low'). Default 'default'.
string |
Definition at line 64 of file class-gravityview-metabox-tab.php.
|
protected |
Definition at line 78 of file class-gravityview-metabox-tab.php.
Referenced by render().
|
protected |
Optional.
The screen on which to show the box (like a post type, 'link', or 'comment'). Default is the current screen.
string|WP_Screen |
Definition at line 46 of file class-gravityview-metabox-tab.php.
$title = '' |
Title of the meta box.
string |
Definition at line 31 of file class-gravityview-metabox-tab.php.
Referenced by __construct().