Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 5. add 1 to wpcf-radio field if drama, movie or special added to subtitle project
- add_action('cred_save_data', 'check_parents_data_action', 10, 2 );
- function check_parents_data_action($post_id, $form_data){
- if ($form_data['id']==41833){
- if( isset($_POST['related-drama'])){
- update_post_meta( $_POST['related-drama'], 'wpcf-is-there-sp', 1 );
- }
- if( isset($_POST['related-movie'])){
- update_post_meta( $_POST['related-movie'], 'wpcf-is-there-sp', 1 );
- }
- if( isset($_POST['related-special'])){
- update_post_meta( $_POST['related-special'], 'wpcf-is-there-sp', 1 );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement