Last active
March 23, 2020 12:56
-
-
Save svenl77/145756e476b23202646675f6e625e9bc to your computer and use it in GitHub Desktop.
This is an example function on how to add any kind of value to the title. In this case we use the post id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'buddyforms_update_form_title', 'buddyforms_add_id_to_subject', 9999 , 3 ); | |
function buddyforms_add_id_to_subject( $default_post_title, $form_slug, $post_id ){ | |
if($form_slug != 'simple-post-form'){ | |
return $default_post_title; | |
} | |
return $default_post_title . '-' . $post_id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment