WordPress.org

Make WordPress Core

Ticket #12829: post.dev.js.2.diff

File post.dev.js.2.diff, 788 bytes (added by duck_, 11 years ago)

var post only used in updateText(), declaring it there probably makes more sense

  • wp-admin/js/post.dev.js

     
    362362                }
    363363
    364364                function updateText() {
    365                         var attemptedDate, originalDate, currentDate, publishOn, postStatus = $('#post_status'),
    366                                 optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(),
     365                        var attemptedDate, originalDate, currentDate, publishOn, page = 'page' == pagenow || 'page-new' == pagenow,
     366                                postStatus = $('#post_status'), optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(),
    367367                                mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val();
    368368
    369369                        attemptedDate = new Date( aa, mm - 1, jj, hh, mn );