Ticket #13821: 13821-2.diff
File 13821-2.diff, 2.5 KB (added by , 14 years ago) |
---|
-
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 if ( $("#visibility-radio-password").attr('checked') && $('#post_password').val() == '' ) { 458 $('#post_password').addClass('form-invalid'); 459 // if password is blank, the slide-up event won't happen and so, the post visibility won't be updated... 460 $('#publish').val( postL10n.update ); 461 postStatus = $('#post_status'); 462 optPublish = $('option[value=publish]', postStatus); 463 if ( optPublish.length == 0 ) { 464 postStatus.append('<option value="publish">' + postL10n.privatelyPublished + '</option>'); 465 } else { 466 optPublish.html( postL10n.privatelyPublished ); 467 } 468 $('option[value=publish]', postStatus).attr('selected', true); 469 return false; 470 } else { 471 $('#post_password').removeClass('form-invalid'); 472 } 456 473 var pvSelect = $('#post-visibility-select'); 457 474 458 475 pvSelect.slideUp("normal"); -
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 if( empty( $post_data['post_password'] ) ) { 172 $post_data['post_status'] = $post_data['hidden_post_status']; 173 } 170 174 unset( $post_data['sticky'] ); 171 175 break; 172 176 case 'private' :