>
Download This Plugin | |
Download Elegant Themes | |
Name | Gravity Forms: Post Updates |
Version | 1.2.18 |
Author | jcow |
Rating | 100 |
Last updated | 2015-03-04 07:59:00 |
Downloads |
3510
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Gravity Forms: Post Updates plugin added 5 bytes of resources to the Home page and 6 bytes of resources to the sample Post page.
Gravity Forms: Post Updates plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Gravity Forms: Post Updates plugin ads no tables to your Wordpress blog database.Requires PHP 5.3 or greater
Allows you to use Gravity Forms to update any post on the front end. If you use the "Gravity Forms + Custom Post Types", you can even update custom post types and use custom taxonomies.
[gravityform id="1" update] // Loads current post for editing
[gravityform id="1" update="34"] // Loads post where ID=34 for editing
We worked with Rocketgenius, makers of Gravity Forms, to get a small upgrade added that allows us to extend their shortcode, so now you can simply add the "update" attribute to the normal "gravityform" shortcode. If you only add "update", it will load the current post in to update. If you add an integer to the update attribute, it will use that to load a post by its ID.
do_action('gform_update_post/edit_link');
do_action('gform_update_post/edit_link', array(
'post_id' => $post->ID,
'url' => home_url('/edit_post/'),
) );
Arguments (query string or array)
post_id
(int) (optional) The id of the post you want to edit. Default: global $post->IDurl
(string|int) (optional) Either the full url of the page where your edit form resides, or an id for the page/post where the edit form resides. Default: get_permalink()text
(string) (optional) The link text. Default: "Edit Post"title
(string) (optional) The title attribute of the anchor tag. Default: (text) parameterThis will return a basic edit url
apply_filters('gform_update_post/edit_url', '');
Specify post to edit (post_id) and post that holds the edit form (url)
apply_filters('gform_update_post/edit_url', 1, home_url('/edit_post/'));
[gform_update_post_edit_link]
Specify post to edit (post_id) and post that holds the edit form (url)
[gform_update_post_edit_link post_id=1 url=6]
You can use the action to force a form show a specific post:
do_action('gform_update_post/setup_form');
do_action('gform_update_post/setup_form', $post->ID);
do_action('gform_update_post/setup_form', array('post_id' => $post->ID, 'form_id' => $form_id));
Parameters
post_id
(int|array) (optional) The id of the post you want to edit or an array with post id and/or form id. This allows you to specify the form id, so that update functionality does not get applied to other forms on the page. Default: global $post->ID