Skip to content

Instantly share code, notes, and snippets.

@idavinder
Last active September 29, 2023 22:55
Show Gist options
  • Save idavinder/5963575 to your computer and use it in GitHub Desktop.
Save idavinder/5963575 to your computer and use it in GitHub Desktop.
Change attachment display setting defaults for media in WordPress
/** set default settings of attachment media box - basicwp.com */
function attachment_default_settings() {
update_option('image_default_align', 'left' );
update_option('image_default_link_type', 'custom' );
update_option('image_default_size', 'large' );
}
add_action('after_setup_theme', 'attachment_default_settings');
@KareemAdelAwwad
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment