| 7 | |
| 8 | Here is my code from the functions.php file: |
| 9 | |
| 10 | {{{#!php |
| 11 | <?php |
| 12 | /** |
| 13 | * Set the Attachment Display Settings "Link To" default |
| 14 | * |
| 15 | * This function is attached to the 'after_setup_theme' action hook. |
| 16 | */ |
| 17 | function default_attachment_display_settings() { |
| 18 | update_option( 'image_default_align', 'right' ); |
| 19 | update_option( 'image_default_link_type', 'file' ); |
| 20 | update_option( 'image_default_size', 'medium' ); |
| 21 | } |
| 22 | add_action( 'after_setup_theme', 'default_attachment_display_settings' ); |
| 23 | }}} |
| 24 | |
| 25 | Indeed, neither "image_default_link_type" nor "image_default_align" nor "image_default_size" are defaulting correctly, but are always set (in edit pages) to whatever it was last changed to. |
| 26 | |
| 27 | |