WordPress/wp-admin/js/media-gallery.min.js
whyisjake 9138d6e6ca General: WordPress updates
* XML-RPC: Improve error messages for unprivileged users.
* External Libraries: Disable deserialization in Requests_Utility_FilteredIterator
* Embeds: Disable embeds on deactivated Multisite sites.
* Coding standards: Modify escaping functions to avoid potential false positives.
* XML-RPC: Return error message if attachment ID is incorrect.
* Upgrade/install: Improve logic check when determining installation status.
* Meta: Sanitize meta key before checking protection status.
* Themes: Ensure that only privileged users can set a background image when a theme is using the deprecated custom background page.

Brings the changes from [49380,49382-49388] to the 5.3 branch.

Props xknown, zieladam, peterwilsoncc, whyisjake, desrosj, dd32.

Built from https://develop.svn.wordpress.org/branches/5.3@49393


git-svn-id: http://core.svn.wordpress.org/branches/5.3@49152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 18:44:12 +00:00

1 line
580 B
JavaScript

jQuery(function(r){r("body").bind("click.wp-gallery",function(a){var e,t,n,o=r(a.target);o.hasClass("wp-set-header")?((window.dialogArguments||opener||parent||top).location.href=o.data("location"),a.preventDefault()):o.hasClass("wp-set-background")&&(e=o.data("attachment-id"),t=r('input[name="attachments['+e+'][image-size]"]:checked').val(),n=r("#_wpnonce").val()&&"",jQuery.post(ajaxurl,{action:"set-background-image",attachment_id:e,_ajax_nonce:n,size:t},function(){var a=window.dialogArguments||opener||parent||top;a.tb_remove(),a.location.reload()}),a.preventDefault())})});