Changeset 1242929
- Timestamp:
- 09/11/2015 01:25:55 AM (11 years ago)
- Location:
- storyform/trunk
- Files:
-
- 2 edited
-
class-storyform-admin-meta-box.php (modified) (1 diff)
-
class-storyform-editor-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
storyform/trunk/class-storyform-admin-meta-box.php
r1237746 r1242929 89 89 if( $post['post_status'] === 'publish' ){ 90 90 $array = array_values( wp_get_post_revisions( $post_id ) ); 91 $revision = $array[0]->to_array(); 92 if( strtotime( $revision['post_date'] ) > strtotime( $post['post_modified'] ) ){ 93 $unpublished_changes = true; 91 if( count( $array ) ){ 92 $revision = $array[0]->to_array(); 93 if( strtotime( $revision['post_date'] ) > strtotime( $post['post_modified'] ) ){ 94 $unpublished_changes = true; 95 } 94 96 } 95 97 $status = 'published'; -
storyform/trunk/class-storyform-editor-page.php
r1239252 r1242929 135 135 if( $post['post_status'] === 'publish' ){ 136 136 $array = array_values( wp_get_post_revisions( $id ) ); 137 $revision = $array[0]->to_array(); 138 $post['post_content'] = $revision['post_content']; 139 $post['post_title'] = $revision['post_title']; 140 $post['post_excerpt'] = $revision['post_excerpt']; 141 $post['unpublished_changes'] = true; 137 138 if( count( $array ) ){ 139 $revision = $array[0]->to_array(); 140 $post['post_content'] = $revision['post_content']; 141 $post['post_title'] = $revision['post_title']; 142 $post['post_excerpt'] = $revision['post_excerpt']; 143 $post['unpublished_changes'] = true; 144 } 142 145 } 143 146
Note: See TracChangeset
for help on using the changeset viewer.