Allow Empty “What’s New” Activity Update
-
We want to allow people to post an empty “what’s new” activity.
I believe that it uses the built-in wordpress “post” function.
Therefore I tried this to allow empty posts:
add_filter('pre_post_title', 'wpse28021_mask_empty'); add_filter('pre_post_content', 'wpse28021_mask_empty'); function wpse28021_mask_empty($value) { if ( empty($value) ) { return ' '; } return $value; } add_filter('wp_insert_post_data', 'wpse28021_unmask_empty'); function wpse28021_unmask_empty($data) { if ( ' ' == $data['post_title'] ) { $data['post_title'] = ''; } if ( ' ' == $data['post_content'] ) { $data['post_content'] = ''; } return $data; }
Anyone have any ideas?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Allow Empty “What’s New” Activity Update’ is closed to new replies.