Make WordPress Core

Ticket #49031: editor.js.patch

File editor.js.patch, 774 bytes (added by ankitmaru, 5 years ago)
  • src/js/_enqueues/wp/media/editor.js

     
    164164                        var shortcode, html, extension;
    165165
    166166                        props = wp.media.string.props( props, attachment );
    167                         if ( props.link !== 'embed' )
     167                        if ( props.link !== 'embed' ) {
    168168                                return wp.media.string.link( props );
     169                        }
    169170
    170171                        shortcode = {};
    171172
     
    444445
    445446                                if ( attrs._orderbyRandom ) {
    446447                                        attrs.orderby = 'rand';
    447                                 } else if ( attrs._orderByField && attrs._orderByField != 'rand' ) {
     448                                } else if ( attrs._orderByField && attrs._orderByField !== 'rand' ) {
    448449                                        attrs.orderby = attrs._orderByField;
    449450                                }
    450451