GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
field-entry_approval-html.php
Go to the documentation of this file.
1 <?php
2 /**
3  * The default entry approval field output template.
4  *
5  * This field will only render for users with the `gravityview_moderate_entries` capability.
6  *
7  * @package GravityView
8  * @subpackage GravityView/templates/fields
9  * @since 1.19
10  *
11  * @global \GV\Template_Context $gravityview
12  * @since 2.0
13  */
14 
15 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
16  gravityview()->log->error( '{file} template loaded without context', array( 'file' => __FILE__ ) );
17  return;
18 }
19 
20 $entry = $gravityview->entry->as_entry();
21 
22 /**
23  * @action `gravityview/field/approval/load_scripts` Trigger loading the field approval javascript
24  * @see GravityView_Field_Approval::enqueue_and_localize_script
25  * @since 1.19
26  * @since 2.0 Updated second param to use \GV\Template_Context
27  *
28  * @param \GV\Template_Context The $gravityview field template context object.
29  */
30 do_action( 'gravityview/field/approval/load_scripts', $gravityview );
31 
37 
38 ?><a href="#" aria-role="button" aria-live="polite" aria-busy="false" class="gv-approval-toggle selected <?php echo $class; ?>" title="<?php echo esc_attr( $title ); ?>" data-current-status="<?php echo esc_attr( $current_status ); ?>" data-entry-slug="<?php echo esc_attr( $entry_slug ); ?>" data-form-id="<?php echo esc_attr( $entry['form_id'] ); ?>"><span class="screen-reader-text"><?php echo $anchor; ?></span></a><?php
$anchor
$class
$current_status
$title
static get_title_attr( $approved_status)
Get the title attribute for a link, based on the current status.
if(! isset( $gravityview)||empty( $gravityview->template)) $entry
$entry_slug
static get_css_class( $approved_status)
Get the CSS class for a link, based on the current status.
static get_anchor_text( $approved_status='')
Get the anchor text for a link, based on the current status.
static get_entry_status( $entry, $value_or_label='label')
Get the approval status for an entry.
static get_entry_slug( $id_or_string, $entry=array())
Get the entry slug for the entry.
Definition: class-api.php:550
gravityview()
The main GravityView wrapper function.