GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Add Entry Notes. More...
Public Member Functions | |
__construct () | |
add_entry_default_field ( $entry_default_fields, $form, $zone) | |
Add Entry Notes to the Add Field picker in Edit View. More... | |
add_template_path ( $file_paths) | |
Include this extension templates path. More... | |
enqueue_scripts () | |
Enqueue, localize field scripts and styles. More... | |
field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
maybe_add_note () | |
Verify permissions, check if $_POST is set and as expected. More... | |
maybe_delete_notes () | |
Possibly delete notes, if request is proper. More... | |
process_delete_notes ( $data) | |
register_scripts () | |
Register scripts and styles used by the Notes field. More... | |
Public Member Functions inherited from GravityView_Field | |
__construct () | |
GravityView_Field constructor. More... | |
_filter_gform_custom_merge_tags ( $custom_merge_tags=array(), $form_id=0, $fields=array(), $element_id='') | |
Add custom merge tags to merge tag options. More... | |
_filter_gform_replace_merge_tags ( $text, $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
Match the merge tag in replacement text for the field. More... | |
_filter_sortable_fields ( $not_sortable) | |
Use field settings to modify whether a field is sortable. More... | |
add_entry_meta ( $entry_meta) | |
Add the custom entry meta key to make it searchable and sortable. More... | |
add_field_support ( $key, &$field_options) | |
add_sortable_field ( $fields) | |
Add the field to the Filter & Sort available fields. More... | |
as_array () | |
Returns the field as an array to be used in field pickers. More... | |
field_options ( $field_options, $template_id, $field_id, $context, $input_type, $form_id) | |
Tap in here to modify field options. More... | |
replace_merge_tag ( $matches=array(), $text='', $form=array(), $entry=array(), $url_encode=false, $esc_html=false) | |
Run GravityView filters when using GFCommon::replace_variables() More... | |
set_default_search_label ( $label='', $gf_field=null, $field=array()) | |
Allow setting a default search label for search fields based on the field type. More... | |
Static Public Member Functions | |
static | display_note ( $note, $show_delete=false, $context=null) |
Generate HTML output for a single note. More... | |
static | get_add_note_part ( $atts, $context=null) |
Get the Add Note form HTML. More... | |
static | strings ( $key='') |
Get strings used by the Entry Notes field. More... | |
Data Fields | |
$icon = 'dashicons-admin-comments' | |
$name = 'notes' | |
Data Fields inherited from GravityView_Field | |
$_gf_field_class_name | |
$contexts = array( 'single', 'multiple', 'edit', 'export' ) | |
$default_search_label | |
$description | |
$entry_meta_is_default_column = false | |
$entry_meta_key = null | |
$entry_meta_update_callback = null | |
$group | |
standard , advanced , post , pricing , meta , gravityview , or add-ons More... | |
$icon = 'dashicons-admin-generic' | |
$is_numeric | |
boolean Is field content number-based? More... | |
$is_searchable = true | |
$is_sortable = true | |
boolean Can the field be sorted in search? More... | |
$label | |
$name | |
$search_operators | |
Static Public Attributes | |
static | $file |
static | $path |
Private Member Functions | |
add_hooks () | |
Add AJAX hooks, [gv_note_add] shortcode, and template loading paths. More... | |
add_note ( $entry, $data) | |
Add a note. More... | |
get_email_footer ( $email_footer='', $is_html=true, $email_data=array()) | |
Get the footer for Entry Note emails. More... | |
maybe_send_entry_notes ( $note=false, $entry=array(), $data=array()) | |
If note has an email to send, and the user has the right caps, send it. More... | |
process_add_note ( $data) | |
Static Private Member Functions | |
static | get_note_email_fields ( $entry_slug='') |
Generate a HTML dropdown of email values based on email fields from the current form. More... | |
static | get_note_emails_array () |
Get array of emails addresses from the stored entry. More... | |
Private Attributes | |
$doing_ajax = false | |
Additional Inherited Members | |
Protected Member Functions inherited from GravityView_Field | |
custom_merge_tags ( $form=array(), $fields=array()) | |
Add custom Merge Tags to Merge Tag options, if custom Merge Tags exist. More... | |
is_choice_value_enabled () | |
Check whether the enableChoiceValue flag is set for a GF field. More... | |
Protected Attributes inherited from GravityView_Field | |
$_custom_merge_tag = false | |
$_field_id = '' | |
$_field_options = array() | |
__construct | ( | ) |
Definition at line 45 of file class-gravityview-field-notes.php.
References add_hooks().
add_entry_default_field | ( | $entry_default_fields, | |
$form, | |||
$zone | |||
) |
Add Entry Notes to the Add Field picker in Edit View.
array | $entry_default_fields | Fields configured to show in the picker |
array | $form | Gravity Forms form array |
string | $zone | Current context: directory , single , edit |
Definition at line 100 of file class-gravityview-field-notes.php.
|
private |
Add AJAX hooks, [gv_note_add] shortcode, and template loading paths.
Definition at line 64 of file class-gravityview-field-notes.php.
Referenced by __construct().
|
private |
Add a note.
array | $entry | |
array | $data | Note details array |
Definition at line 549 of file class-gravityview-field-notes.php.
References $entry, and GravityView_Entry_Notes\add_note().
Referenced by process_add_note().
add_template_path | ( | $file_paths | ) |
Include this extension templates path.
array | $file_paths | List of template paths ordered |
./
and ./partials/
paths added Definition at line 357 of file class-gravityview-field-notes.php.
|
static |
Generate HTML output for a single note.
object | $note | Note object with id, user_id, date_created, value, note_type, user_name, user_email vars |
bool | $show_delete | Whether to show the bulk delete inputs |
\GV\Template_Context | $context | The context. |
gravityview/field/notes/content
Modify the note content before rendering in the template array | $note_content | Array of note content that will be replaced in template files |
object | $note | Note object with id, user_id, date_created, value, note_type, user_name, user_email vars |
boolean | $show_delete | True: Notes are editable. False: no editing notes. |
\GV\Template_Context | $context | The context. |
Definition at line 465 of file class-gravityview-field-notes.php.
References $output, $show_delete, $value, GravityView_View\getInstance(), gravityview_strip_whitespace(), and GVCommon\has_cap().
enqueue_scripts | ( | ) |
Enqueue, localize field scripts and styles.
Definition at line 134 of file class-gravityview-field-notes.php.
References $strings.
field_options | ( | $field_options, | |
$template_id, | |||
$field_id, | |||
$context, | |||
$input_type, | |||
$form_id | |||
) |
Definition at line 365 of file class-gravityview-field-notes.php.
|
static |
Get the Add Note form HTML.
array | $atts | Shortcode attributes for entry ID |
\GV\Template_Context | $context | The context, when called outside of a shortcode |
gravityview_add_entry_notes
cap Definition at line 576 of file class-gravityview-field-notes.php.
References $entry, $entry_slug, $gravityview_view, $visibility_settings, GF_Entry\from_entry(), GravityView_View\getInstance(), gravityview(), gravityview_strip_whitespace(), and GVCommon\has_cap().
|
private |
Get the footer for Entry Note emails.
{url}
is replaced by the URL of the page where the note form was embedded
string | $email_footer | The message footer value |
bool | $is_html | True: Email is being sent as HTML; False: sent as text |
Definition at line 848 of file class-gravityview-field-notes.php.
References $content, $output, $url, and Utils\get().
Referenced by maybe_send_entry_notes().
|
staticprivate |
Generate a HTML dropdown of email values based on email fields from the current form.
get_note_emails_array
int | string | $entry_slug | Current entry unique ID |
gravityview/field/notes/custom-email
Whether to include a Custom Email option for users to define a custom email to mail notes to bool | $include_custom | Default: true |
Definition at line 680 of file class-gravityview-field-notes.php.
References $entry_slug, $strings, gravityview(), and GVCommon\has_cap().
|
staticprivate |
Get array of emails addresses from the stored entry.
gravityview/field/notes/emails
Modify the dropdown values displayed in the "Also email note to" dropdown array | $note_emails | Array of email addresses connected to the entry |
array | $entry | Current entry |
Definition at line 641 of file class-gravityview-field-notes.php.
References $entry, $gravityview_view, and GravityView_View\getInstance().
maybe_add_note | ( | ) |
Verify permissions, check if $_POST is set and as expected.
If so, use process_add_note
Definition at line 168 of file class-gravityview-field-notes.php.
References $post, gravityview(), GVCommon\has_cap(), and process_add_note().
maybe_delete_notes | ( | ) |
Possibly delete notes, if request is proper.
Verify permissions. Check expected $_POST. Parse args, then send to process_delete_notes
Definition at line 282 of file class-gravityview-field-notes.php.
References $post, GVCommon\has_cap(), and process_delete_notes().
|
private |
If note has an email to send, and the user has the right caps, send it.
false | object | $note | If note was created, object. Otherwise, false. |
array | $entry | Entry data. |
array | $data | $_POST data. |
gform_after_email
action if you want a return result from sending the email. Documented in get_note_email_fields
gravityview/field/notes/email_content
Modify the values passed when sending a note email array | $email_settings | Values being passed to the GVCommon::send_email() method: 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'entry', 'email_footer' |
gravityview/field/notes/wpautop_email
Should the message content have paragraphs added automatically, if using HTML message format bool | $wpautop_email | True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true) |
Definition at line 745 of file class-gravityview-field-notes.php.
References $entry, GV\$form, get_email_footer(), gravityview(), GVCommon\has_cap(), and GVCommon\send_email().
Referenced by process_add_note().
|
private |
Definition at line 208 of file class-gravityview-field-notes.php.
References $entry, add_note(), GravityView_Entry_Notes\get_note(), gravityview(), gravityview_get_entry(), GVCommon\has_cap(), and maybe_send_entry_notes().
Referenced by maybe_add_note().
process_delete_notes | ( | $data | ) |
Definition at line 321 of file class-gravityview-field-notes.php.
References GravityView_Entry_Notes\delete_notes(), and GVCommon\has_cap().
Referenced by maybe_delete_notes().
register_scripts | ( | ) |
Register scripts and styles used by the Notes field.
Definition at line 121 of file class-gravityview-field-notes.php.
References $file, $path, gravityview_css_url(), and GV_PLUGIN_VERSION.
|
static |
Get strings used by the Entry Notes field.
Use gravityview/field/notes/strings
filter to modify the strings
string | $key | If set, return the string with the key of $key |
gravityview/field/notes/strings
Modify the text used in the Entry Notes field. Sanitized by esc_html
after return. array | $strings | Text in key => value pairs |
Definition at line 411 of file class-gravityview-field-notes.php.
References $strings, and gv_map_deep().
|
private |
Definition at line 35 of file class-gravityview-field-notes.php.
|
static |
Definition at line 23 of file class-gravityview-field-notes.php.
Referenced by register_scripts().
$icon = 'dashicons-admin-comments' |
Definition at line 43 of file class-gravityview-field-notes.php.
$name = 'notes' |
Definition at line 41 of file class-gravityview-field-notes.php.
|
static |
Definition at line 29 of file class-gravityview-field-notes.php.
Referenced by register_scripts().