Move utils.js to wp-includes and make it available for frontend media
|Reported by:||nacin||Owned by:|
We have user settings for a lot of media items, to remember what the user last did. On a site running something like P2, this is important as the user never really hits the admin. The settings are reset to Medium and Attachment Page every time, and the new setting for whether the user was on Upload or Media Library next is totally thrown off.
In 3.4, we loaded media-upload.php, which allowed utils.js to load and thus we had setUserSetting.
In 3.5, we don't. We should move utils.js to wp-includes/js/wp-cookies.js (or just utils.js) and make it a dependency of media.
It won't save to the DB until an admin hit, but it'll still set and use the cookie.