Skip to content

Commit c6e7e3f

Browse files
committed
Widget: Deprecated use of metadata plugin. Fixes #7191 - Widget: Deprecate use of metadata.
1 parent 79c0fb7 commit c6e7e3f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ui/jquery.ui.widget.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ $.Widget.prototype = {
178178
this._trigger( "create" );
179179
this._init();
180180
},
181-
_getCreateOptions: function() {
182-
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
183-
},
181+
_getCreateOptions: $.noop,
184182
_create: $.noop,
185183
_init: $.noop,
186184

@@ -340,4 +338,11 @@ $.Widget.prototype = {
340338
}
341339
};
342340

341+
// DEPRECATED
342+
if ( $.uiBackCompat !== false ) {
343+
$.Widget.prototype._getCreateOptions = function() {
344+
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
345+
}
346+
}
347+
343348
})( jQuery );

0 commit comments

Comments
 (0)