Make WordPress Core

Ticket #39946: 39946.patch

File 39946.patch, 738 bytes (added by imath, 8 years ago)
  • src/wp-admin/js/inline-edit-post.js

    diff --git src/wp-admin/js/inline-edit-post.js src/wp-admin/js/inline-edit-post.js
    index 84ffd78..1b3fa80 100644
    inlineEditPost = { 
    6262
    6363                $('select[name="_status"] option[value="future"]', bulkRow).remove();
    6464
     65                // Disable sticky when the status is set to Private.
     66                $( '#bulk-edit' ).on( 'change', '[name="_status"]', function( e ) {
     67                        if ( 'private' === $( e.currentTarget ).val() ) {
     68                                $( e.delegateTarget ).find( '[name="sticky"]' ).prop( 'disabled', true );
     69                        } else {
     70                                $( e.delegateTarget ).find( '[name="sticky"]' ).prop( 'disabled', false );
     71                        }
     72                } )
     73
    6574                $('#doaction, #doaction2').click(function(e){
    6675                        var n;
    6776