Horje
toolset forms post status Code Example
toolset forms post status
add_action('cred_save_data', 'change_post_status',10,2);
function change_post_status($post_id, $form_data) {
 
if ($form_data['id']==9999){
$my_post['ID'] = $post_id;
$my_post['post_status'] = $_REQUEST['post_status'];
// Update the post into the database
wp_update_post( $my_post );
}
}
Source: toolset.com
toolset forms post status
[cred-generic-field field="post_status" type="select" class=""]
{
"required":0,
"validate_format":0,
"default":["publish"],
"options":[
{"value":"draft","label":"draft"},
{"value":"publish","label":"publish"}
]
}
Source: toolset.com




Whatever

Related
library ratapay Code Example library ratapay Code Example
genemark fungi models gmhmm Code Example genemark fungi models gmhmm Code Example
ow Code Example ow Code Example
dpkg: error processing package newrelic-infra (--configure): Code Example dpkg: error processing package newrelic-infra (--configure): Code Example
paul graham ycombinator twitter Code Example paul graham ycombinator twitter Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7