Created
February 5, 2016 22:14
-
-
Save jordanmaslyn/b1cd3bb713e4af53244a to your computer and use it in GitHub Desktop.
Set Wordpress default media options that WON'T get overridden by user cookies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'admin_head-post.php', '_my_reset_image_insert_settings' ); | |
| add_action( 'admin_head-post-new.php', '_my_reset_image_insert_settings' ); | |
| function _my_reset_image_insert_settings() { | |
| ?> | |
| <script> | |
| if ( typeof setUserSetting !== 'undefined' ) { | |
| setUserSetting( 'align', 'none' ); // none || left || center || right | |
| setUserSetting( 'imgsize', 'medium' ); // thumbnail || medium || large || full | |
| setUserSetting( 'urlbutton', 'none' ); // none || file || post | |
| } | |
| </script> | |
| <?php | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment