GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
If this file is called directly, abort. More...
Static Public Member Functions | |
static | get_action ( $value_or_key) |
Get the label for a specific approval value. More... | |
static | get_all () |
Return array of status options. More... | |
static | get_key ( $value) |
Get the status key for a value. More... | |
static | get_label ( $value_or_key) |
Get the label for a specific approval value. More... | |
static | get_labels () |
Get the labels for the status choices. More... | |
static | get_string ( $value_or_key, $string_key='') |
Get the label for a specific approval value. More... | |
static | get_title_attr ( $value_or_key) |
Get the label for a specific approval value. More... | |
static | get_values () |
Get the status values as an array. More... | |
static | is_approved ( $status) |
static | is_disapproved ( $status) |
static | is_unapproved ( $status) |
static | is_valid ( $value=NULL) |
Check whether the passed value is one of the defined values for entry approval. More... | |
static | maybe_convert_status ( $old_value='') |
Convert previously-used values to the current values, for backward compatibility. More... | |
Data Fields | |
const | APPROVED = 1 |
const | DISAPPROVED = 2 |
const | UNAPPROVED = 3 |
Private Member Functions | |
__construct () | |
GravityView_Entry_Approval_Status constructor. More... | |
Static Private Member Functions | |
static | choice_pluck ( $status, $attr_key='') |
Pluck a certain field value from a status array. More... | |
static | get_choices () |
Match values to the labels. More... | |
If this file is called directly, abort.
There are specific values of entry approval that are valid. This class holds them and manages access to them.
Definition at line 23 of file class-gravityview-entry-approval-status.php.
|
private |
GravityView_Entry_Approval_Status constructor.
Definition at line 43 of file class-gravityview-entry-approval-status.php.
|
staticprivate |
Pluck a certain field value from a status array.
Examples:
self::choice_pluck( 'disapproved', 'value' ); // Returns
2
self::choice_pluck( 'approved', 'label' ); // Returns Approved
int | string | $status | Valid status value or key (1 or "approved") |
string | $attr_key | Key name for the "value", "label", "action", "title". If "key", returns the matched key instead of value. |
Definition at line 246 of file class-gravityview-entry-approval-status.php.
|
static |
Get the label for a specific approval value.
int | string | $value_or_key | Valid status value or key (1 or "approved") |
Definition at line 286 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval_Merge_Tags\replace_merge_tag().
|
static |
Return array of status options.
Definition at line 83 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Field_Entry_Approval\enqueue_and_localize_script(), GravityView_Widget_Search\get_is_approved_choices(), and GravityView_Entry_Approval\get_popover_template().
|
staticprivate |
Match values to the labels.
Definition at line 52 of file class-gravityview-entry-approval-status.php.
|
static |
Get the status key for a value.
int | $value | Status value (1, 2, 3) |
Definition at line 323 of file class-gravityview-entry-approval-status.php.
References $value.
Referenced by GravityView_Entry_Approval_Merge_Tags\get_approval_status(), GravityView_Field_Entry_Approval\get_css_class(), GravityView_Field_Is_Approved\get_output(), and GravityView_Entry_Approval\update_approved_meta().
|
static |
Get the label for a specific approval value.
int | string | $value_or_key | Valid status value or key (1 or "approved") |
Definition at line 273 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Field_Is_Approved\field_options(), GravityView_Admin_ApproveEntries\filter_links_entry_list(), GravityView_Entry_Approval\get_entry_status(), GravityView_Field_Is_Approved\get_output(), and GravityView_Entry_Approval_Merge_Tags\maybe_show_approval_notice().
|
static |
Get the labels for the status choices.
Definition at line 219 of file class-gravityview-entry-approval-status.php.
References $labels.
|
static |
Get the label for a specific approval value.
int | string | $value_or_key | Valid status value or key (1 or "approved") |
Definition at line 299 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Field_Entry_Approval\get_anchor_text(), GravityView_Bulk_Actions\get_bulk_actions(), and GravityView_Field_Entry_Approval\get_title_attr().
|
static |
Get the label for a specific approval value.
int | string | $value_or_key | Valid status value or key (1 or "approved") |
Definition at line 312 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Admin_ApproveEntries\add_scripts_and_styles().
|
static |
Get the status values as an array.
Definition at line 94 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval_Merge_Tags\get_approval_status().
|
static |
mixed | $status | Value to check approval of |
Definition at line 177 of file class-gravityview-entry-approval-status.php.
Referenced by gvfield\callback(), gravityview\callback(), View\content(), Views_Route\get_sub_item_permissions_check(), GravityView_frontend\is_entry_approved(), and oEmbed\render_frontend().
|
static |
mixed | $status | Value to check approval of |
Definition at line 191 of file class-gravityview-entry-approval-status.php.
|
static |
mixed | $status | Value to check approval of |
Definition at line 205 of file class-gravityview-entry-approval-status.php.
|
static |
Check whether the passed value is one of the defined values for entry approval.
mixed | $value |
Definition at line 159 of file class-gravityview-entry-approval-status.php.
References $value.
Referenced by GravityView_Entry_Approval\add_approval_status_updated_note(), GravityView_Entry_Approval\after_submission(), GravityView_Entry_Approval\ajax_update_approved(), GravityView_Entry_Approval\autounapprove(), GravityView_Entry_Approval_Merge_Tags\maybe_update_approved(), GravityView_Entry_Approval\update_approved(), GravityView_Entry_Approval\update_approved_meta(), and GravityView_Entry_Approval\update_bulk().
|
static |
Convert previously-used values to the current values, for backward compatibility.
string | $old_value | The status |
Definition at line 112 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval\add_approval_status_updated_note(), GravityView_Entry_Approval\get_entry_status(), GravityView_Field_Is_Approved\get_output(), GravityView_Entry_Approval\update_approved(), and GravityView_Entry_Approval\update_approved_meta().
const APPROVED = 1 |
Definition at line 28 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval\add_approval_status_updated_note(), GravityView_Admin_ApproveEntries\add_scripts_and_styles(), GravityView_Entry_Approval\after_update_entry_update_approved_meta(), GravityView_Admin_ApproveEntries\filter_links_entry_list(), View\get_entries(), Renderer\maybe_print_entry_approval_notice(), GravityView_Bulk_Actions\process_bulk_action(), GravityView_frontend\process_search_only_approved(), and GravityView_Migrate\update_approved_meta().
const DISAPPROVED = 2 |
Definition at line 33 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval\add_approval_status_updated_note(), GravityView_Admin_ApproveEntries\add_scripts_and_styles(), GravityView_Entry_Approval\after_update_entry_update_approved_meta(), GravityView_Admin_ApproveEntries\filter_links_entry_list(), GravityView_Bulk_Actions\process_bulk_action(), and GravityView_Migrate\update_approved_meta().
const UNAPPROVED = 3 |
Definition at line 38 of file class-gravityview-entry-approval-status.php.
Referenced by GravityView_Entry_Approval\add_approval_status_updated_note(), GravityView_Admin_ApproveEntries\add_scripts_and_styles(), GravityView_Entry_Approval\after_submission(), GravityView_Entry_Approval\autounapprove(), GravityView_Admin_ApproveEntries\filter_links_entry_list(), GravityView_Widget_Search\gf_query_filter(), GravityView_Edit_Entry_Render\prevent_update_unapproved_meta(), and GravityView_Bulk_Actions\process_bulk_action().