From c6e7e3fc28fdf6ce74bf9768fa4101cf3a163d1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 23 Mar 2011 09:16:19 -0400 Subject: [PATCH] Widget: Deprecated use of metadata plugin. Fixes #7191 - Widget: Deprecate use of metadata. --- ui/jquery.ui.widget.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index 7c8567ced..09c680ec3 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -178,9 +178,7 @@ $.Widget.prototype = { this._trigger( "create" ); this._init(); }, - _getCreateOptions: function() { - return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; - }, + _getCreateOptions: $.noop, _create: $.noop, _init: $.noop, @@ -340,4 +338,11 @@ $.Widget.prototype = { } }; +// DEPRECATED +if ( $.uiBackCompat !== false ) { + $.Widget.prototype._getCreateOptions = function() { + return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ]; + } +} + })( jQuery ); -- 2.39.5