Improve the lazy instantiation of the 'wp' JavaScript variable. props evansolomon, fixes #22113.

git-svn-id: http://core.svn.wordpress.org/trunk@22126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-10-06 00:43:36 +00:00
parent 4220ed466a
commit 1baac22e9d
6 changed files with 6 additions and 12 deletions

View File

@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};
(function( exports, $ ){
var api, extend, ctor, inherits,

View File

@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};
(function( exports, $ ){
var api = wp.customize,

View File

@ -1,6 +1,5 @@
// Ensure the global `wp` object exists.
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};
// HTML utility functions
// ----------------------

View File

@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};
(function($){
var Attachment, Attachments, Query, compare;

View File

@ -1,5 +1,4 @@
if ( typeof wp === 'undefined' )
var wp = {};
window.wp = window.wp || {};
(function( exports, $ ) {
var Uploader;

View File

@ -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 = {