x-team/wordpress-develop — pull request #9 by westonruter (2014-04-08 05:12:41+00:00)
Title: 27451: Improve WidgetCollection model searching for availableWidgets

**DO NOT MERGE.** For review only.

Update a `search_matched` property on the `WidgetModel` instead of filtering out widgets from `availableWidgets`; otherwise, the incremented `multi_number` gets lost, and only one instance of a multi-widget can be added. This also fixes a bug with a widget area losing its sortability after adding a widget via a search.

Also, don't equate an empty array with an error when the instance is passed to the `update_widget` Ajax request