Created
April 18, 2016 19:41
-
-
Save sbruner/ff36c8c6810274baa0fa32f2c029dc78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| // Set the Post Title to "Order #" plus post ID: | |
| function set_post_title_to_order_number($data, $post_array) | |
| { | |
| if ($post_array['post_type'] == 'MY-POST-TYPE') | |
| { | |
| return 'Order #' . $post_array['ID']; | |
| } | |
| else | |
| { | |
| return $data; | |
| } | |
| } | |
| add_filter('piklist_empty_post_title', 'set_post_title_to_order_number', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment