Changeset 1956151
- Timestamp:
- 10/13/2018 04:21:31 AM (7 years ago)
- Location:
- revisionize/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
revisionize.php (modified) (3 diffs)
-
settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
revisionize/trunk/readme.txt
r1944336 r1956151 19 19 Visit [revisionize.pro](https://revisionize.pro) to add functionality that makes Revisionize even more powerful. 20 20 21 22 21 23 = Compatible with = 22 24 … … 37 39 38 40 == Changelog == 41 42 = 2.3.0 = 43 * New. Setting to preserve original author or overwrite it with author who is revisionizing. 39 44 40 45 = 2.2.8 = -
revisionize/trunk/revisionize.php
r1944336 r1956151 4 4 Plugin URI: https://revisionize.pro 5 5 Description: Draft up revisions of live, published content. The live content doesn't change until you publish the revision manually or with the scheduling system. 6 Version: 2. 2.86 Version: 2.3.0 7 7 Author: Jamie Chong 8 8 Author URI: https://revisionize.pro … … 183 183 $post_status = $post->post_status; 184 184 185 if ($to) { 185 if (!$to) { 186 $post_status = $status; 187 } 188 189 if ($to && is_original_author_preserved($to->ID)) { 186 190 $author_id = $to->post_author; // maintain original author. 187 191 } else { 188 $post_status = $status;189 192 $author = wp_get_current_user(); 190 193 … … 464 467 } 465 468 469 function is_original_author_preserved($id) { 470 return apply_filters('revisionize_preserve_author', true, $id) === true; 471 } 472 466 473 function show_dashboard_widget() { 467 474 return apply_filters('revisionize_show_dashboard_widget', false); -
revisionize/trunk/settings.php
r1944336 r1956151 34 34 add_filter('revisionize_keep_original_on_publish', __NAMESPACE__.'\\filter_keep_backup'); 35 35 add_filter('revisionize_preserve_post_date', __NAMESPACE__.'\\filter_preserve_date'); 36 add_filter('revisionize_preserve_author', __NAMESPACE__.'\\filter_preserve_author'); 36 37 } 37 38 … … 181 182 182 183 input_setting('checkbox', 'Preserve Date', 'preserve_date', "The date of the original post will be maintained even if the revisionized post date changes. In particular, a scheduled revision won't modify the post date once it's published.", true, 'revisionize_section_basic'); 184 185 input_setting('checkbox', 'Preserve Author', 'preserve_author', "The author of the original post will be maintained even if the author of the revisionized post differs.", true, 'revisionize_section_basic'); 183 186 } 184 187 … … 447 450 } 448 451 452 function filter_preserve_author($b) { 453 return is_checkbox_checked('preserve_author', $b); 454 } 455 449 456 // basic inputs for now 450 457 // $type: text|email|number|checkbox
Note: See TracChangeset
for help on using the changeset viewer.