![]() |
GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
Public Member Functions | |
| __construct () | |
| connected_form_links ( $links=array(), $form=array()) | |
| Add Duplicate View link to the Data Source metabox. More... | |
| copy_view_meta_info ( $new_id, $post) | |
| Copy the meta information of a post to another View. More... | |
| make_duplicate_link_row ( $actions, $post) | |
| Add the link to action list for post_row_actions. More... | |
| save_as_new_view ( $status='') | |
| This function calls the creation of a new copy of the selected post (by default preserving the original publish status) then redirects to the post list. More... | |
| save_as_new_view_draft () | |
| This function calls the creation of a new copy of the selected post (as a draft) then redirects to the edit post screen. More... | |
Private Member Functions | |
| add_hooks () | |
| Add actions & filters. More... | |
| create_duplicate ( $post, $status='') | |
| Create a duplicate from a View $post. More... | |
| current_user_can_copy ( $post) | |
| Test if the user is allowed to copy Views. More... | |
| get_clone_view_link ( $id=0, $context='display', $draft=true) | |
| Retrieve duplicate post link for post. More... | |
| is_all_views_page () | |
| Is the current screen the All Views screen? More... | |
Definition at line 12 of file class-gravityview-admin-duplicate-view.php.
| __construct | ( | ) |
Definition at line 15 of file class-gravityview-admin-duplicate-view.php.
References add_hooks().
|
private |
Add actions & filters.
Connect actions to functions
Definition at line 35 of file class-gravityview-admin-duplicate-view.php.
Referenced by __construct().
| connected_form_links | ( | $links = array(), |
|
$form = array() |
|||
| ) |
Add Duplicate View link to the Data Source metabox.
| array | $links | Array of link HTML to display in the Data Source metabox |
| array | $form | Gravity Forms form array |
WP_Post $post
Definition at line 58 of file class-gravityview-admin-duplicate-view.php.
References $post, is_all_views_page(), and make_duplicate_link_row().
| copy_view_meta_info | ( | $new_id, | |
| $post | |||
| ) |
Copy the meta information of a post to another View.
| int | $new_view_id | The ID of the newly created View |
| WP_Post | $post | The View that was just cloned |
Definition at line 207 of file class-gravityview-admin-duplicate-view.php.
References $post.
|
private |
Create a duplicate from a View $post.
| WP_Post | $post | |
| string | $status | The post status |
gravityview/duplicate-view/status Modify the default status for a new View. Return empty for the new View to inherit existing View status | string|null | If string, the status to set for the new View. If empty, use existing View status. | |
| WP_Post | $post | View being cloned |
gravityview/duplicate-view/copy-date When copying a View, should the date also be copied? | boolean | $copy_date | Whether the copy the date from the existing View. Default: false |
| WP_Post | $post | View being cloned |
gravityview/duplicate-view/new-view Modify View configuration before creating the duplicated View. | array | $new_view | Array of settings to be passed to wp_insert_post() |
| WP_Post | $post | View being cloned |
gv_duplicate_view After a View is duplicated, perform an action | int | $new_view_id | The ID of the newly created View |
| WP_Post | $post | The View that was just cloned |
Definition at line 111 of file class-gravityview-admin-duplicate-view.php.
References $post.
Referenced by save_as_new_view().
|
private |
Test if the user is allowed to copy Views.
| WP_Post|int | Post ID or Post object |
Definition at line 95 of file class-gravityview-admin-duplicate-view.php.
References $post, and GVCommon\has_cap().
Referenced by get_clone_view_link(), make_duplicate_link_row(), and save_as_new_view().
|
private |
Retrieve duplicate post link for post.
| int | $id | Optional. Post ID. |
| string | $context | Optional, default to display. How to write the '&', defaults to '&'. |
| string | $draft | Optional, default to true |
If there's no gravityview post type for some reason, abort!
gravityview/duplicate-view/get_clone_view_link Modify the Clone View URL that is generated | string | $clone_view_link | Link with admin_url("admin.php"), plus the action query string |
| int | $view_id | View ID |
| string | $context | How to display the link. If "display", the URL is run through esc_html(). Default: display |
Definition at line 266 of file class-gravityview-admin-duplicate-view.php.
References current_user_can_copy(), and gravityview().
Referenced by make_duplicate_link_row().
|
private |
Is the current screen the All Views screen?
Definition at line 80 of file class-gravityview-admin-duplicate-view.php.
Referenced by connected_form_links(), and make_duplicate_link_row().
| make_duplicate_link_row | ( | $actions, | |
| $post | |||
| ) |
Add the link to action list for post_row_actions.
| array | $actions | Row action links. Defaults are 'Edit', 'Quick Edit', 'Restore, 'Trash', 'Delete Permanently', 'Preview', and 'View' |
| WP_Post | $post |
Definition at line 235 of file class-gravityview-admin-duplicate-view.php.
References $post, current_user_can_copy(), get_clone_view_link(), gravityview_get_link(), and is_all_views_page().
Referenced by connected_form_links().
| save_as_new_view | ( | $status = '' | ) |
This function calls the creation of a new copy of the selected post (by default preserving the original publish status) then redirects to the post list.
| string | $status | The status to set for the new View |
Definition at line 326 of file class-gravityview-admin-duplicate-view.php.
References $post, create_duplicate(), and current_user_can_copy().
Referenced by save_as_new_view_draft().
| save_as_new_view_draft | ( | ) |
This function calls the creation of a new copy of the selected post (as a draft) then redirects to the edit post screen.
Definition at line 314 of file class-gravityview-admin-duplicate-view.php.
References save_as_new_view().