Ticket #13821: 13821-2.2.diff
File 13821-2.2.diff, 2.3 KB (added by , 14 years ago) |
---|
-
var/www/html/wordpress-trunk/trunk/wp-admin/includes/post.php
167 167 $post_data['post_password'] = ''; 168 168 break; 169 169 case 'password' : 170 // if password is not set, revert post status to what it was 171 $post_data['post_password'] = trim($post_data['post_password']); 172 if( empty( $post_data['post_password'] ) ) { 173 $post_data['post_status'] = $post_data['hidden_post_status']; 174 } 170 175 unset( $post_data['sticky'] ); 171 176 break; 172 177 case 'private' : -
var/www/html/wordpress-trunk/trunk/wp-admin/js/post.dev.js
453 453 }); 454 454 455 455 $('.save-post-visibility', '#post-visibility-select').click(function () { // crazyhorse - multiple ok cancels 456 // hack - check if "Password protected" is checked but password is not set 457 var post_password = jQuery.trim($('#post_password').val()); 458 if ( $("#visibility-radio-password").attr('checked') && post_password == '' ) { 459 // trim-fix 460 $('#post_password').val(''); 461 $('#post_password').addClass('form-invalid'); 462 // if password is blank, the slide-up event won't happen and so, the post visibility won't be updated... 463 return false; 464 } else { 465 $('#post_password').removeClass('form-invalid'); 466 } 456 467 var pvSelect = $('#post-visibility-select'); 457 468 458 469 pvSelect.slideUp("normal");