12 if ( ! defined(
'WPINC' ) ) {
32 add_filter(
'gravityview_entry_default_fields', array( $this,
'add_default_field' ), 10, 3 );
35 add_filter(
'gravityview_field_visibility_caps', array( $this,
'modify_visibility_caps' ), 10, 5 );
38 add_filter(
'gravityview_template_edit_link_options', array( $this,
'edit_link_field_options' ), 10, 5 );
41 add_filter(
'gravityview/metaboxes/tooltips', array( $this,
'tooltips') );
44 add_filter(
'gravityview_template_field_options', array( $this,
'field_options' ), 10, 6 );
47 add_action(
'gravityview/metaboxes/edit_entry', array( $this,
'view_settings_metabox' ) );
84 if( $zone !==
'edit' ) {
86 $entry_default_fields[
'edit_link'] = array(
87 'label' => __(
'Link to Edit Entry',
'gk-gravityview'),
88 'type' =>
'edit_link',
89 'desc' => __(
'A link to edit the entry. Visible based on View settings.',
'gk-gravityview'),
90 'icon' =>
'dashicons-welcome-write-blog',
95 return $entry_default_fields;
111 $caps = $visibility_caps;
114 if( $context ===
'edit' ) {
117 unset( $caps[
'publish_posts'], $caps[
'gravityforms_view_entries'], $caps[
'delete_others_posts'] );
119 $caps[
'read'] = _x(
'Entry Creator',
'User capability',
'gk-gravityview');
139 unset( $field_options[
'show_as_link'], $field_options[
'search_filter'] );
142 unset( $field_options[
'only_loggedin'], $field_options[
'only_loggedin_cap'] );
144 $add_option[
'edit_link'] = array(
146 'label' => __(
'Edit Link Text',
'gk-gravityview' ),
148 'value' => __(
'Edit Entry',
'gk-gravityview'),
149 'merge_tags' =>
true,
152 $add_option[
'new_window'] = array(
153 'type' =>
'checkbox',
154 'label' => __(
'Open link in a new tab or window?',
'gk-gravityview' ),
156 'group' =>
'display',
160 return array_merge( $add_option, $field_options );
172 $return[
'allow_edit_cap'] = array(
173 'title' => __(
'Limiting Edit Access',
'gk-gravityview'),
174 'value' => __(
'Change this setting if you don\'t want the user who created the entry to be able to edit this field.',
'gk-gravityview'),
195 if(
'edit' !== $context ) {
196 return $field_options;
200 unset( $field_options[
'only_loggedin'], $field_options[
'only_loggedin_cap'] );
202 $add_options = array(
203 'allow_edit_cap' => array(
205 'label' => __(
'Make field editable to:',
'gk-gravityview' ),
207 'tooltip' =>
'allow_edit_cap',
208 'class' =>
'widefat',
210 'group' =>
'visibility',
214 return array_merge( $field_options, $add_options );
edit_link_field_options( $field_options, $template_id, $field_id, $context, $input_type)
Add "Edit Link Text" setting to the edit_link field settings.
tooltips( $tooltips)
Add tooltips.
static render_setting_row( $key='', $current_settings=array(), $override_input=null, $name='template_settings[%s]', $id='gravityview_se_%s')
Output a table row for view settings.
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
Add "Edit Link Text" setting to the edit_link field settings.
if(gravityview() ->plugin->is_GF_25()) $form
view_settings_metabox( $current_settings)
Render Edit Entry View metabox settings.
if(empty( $created_by)) $form_id
static get_cap_choices( $template_id='', $field_id='', $context='', $input_type='')
Get capabilities options for GravityView.
modify_visibility_caps( $visibility_caps=array(), $template_id='', $field_id='', $context='', $input_type='')
Change wording for the Edit context to read Entry Creator.
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
add_default_field( $entry_default_fields, $form=array(), $zone='')
Add Edit Link as a default field, outside those set in the Gravity Form form.
__construct(GravityView_Edit_Entry $loader)