Skip to content

Commit

Permalink
Improve the lazy instantiation of the 'wp' JavaScript variable. props…
Browse files Browse the repository at this point in the history
… evansolomon, fixes #22113.

git-svn-id: http://core.svn.wordpress.org/trunk@22126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
koop committed Oct 6, 2012
1 parent 4220ed4 commit 1baac22
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions wp-includes/js/customize-base.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

(function( exports, $ ){
var api, extend, ctor, inherits,
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/js/customize-loader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

(function( exports, $ ){
var api = wp.customize,
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/js/mce-view.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Ensure the global `wp` object exists.
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

// HTML utility functions
// ----------------------
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/js/media-models.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

(function($){
var Attachment, Attachments, Query, compare;
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/js/plupload/wp-plupload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

(function( exports, $ ) {
var Uploader;
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/js/shortcode.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Utility functions for parsing and handling shortcodes in Javascript.

// Ensure the global `wp` object exists.
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};

(function(){
wp.shortcode = {
Expand Down

0 comments on commit 1baac22

Please sign in to comment.