Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( class_exists( 'Autoremove_Attachments' ) ) {
- function autoremove_attachments_accept_restrictions() {
- $autoremove_attachments = get_option( 'autoremove_attachments' );
- if ( ! isset( $autoremove_attachments['usage-restrictions'] ) || ( isset( $autoremove_attachments['usage-restrictions'] ) && $autoremove_attachments['usage-restrictions'] != 'accept' ) ) {
- $autoremove_attachments['usage-restrictions'] = 'accept';
- update_option( 'autoremove_attachments', $autoremove_attachments );
- }
- }
- add_action( 'admin_init', 'autoremove_attachments_accept_restrictions' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement