Title: averyl's Replies | WordPress.org

---

# averyl

  [  ](https://wordpress.org/support/users/averyl/)

 *   [Profile](https://wordpress.org/support/users/averyl/)
 *   [Topics Started](https://wordpress.org/support/users/averyl/topics/)
 *   [Replies Created](https://wordpress.org/support/users/averyl/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/averyl/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/averyl/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/averyl/engagements/)
 *   [Favorites](https://wordpress.org/support/users/averyl/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/averyl/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/averyl/replies/page/2/?output_format=md)

 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/image_default_link_type/page/2/#post-3254753)
 * That’s still not working for me… So I use this instead:
 *     ```
       set_user_setting('urlbutton', 'file' );
       set_user_setting('imgsize', 'large' );
       set_user_setting('image_default_link_type', 'file' );
       set_user_setting('align', 'none' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[wpMandrill] High volume mailing](https://wordpress.org/support/topic/high-volume-mailing/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/high-volume-mailing/#post-3347942)
 * Thanks a lot for your reply!
 * It’s no problem if the emails are spread over time, I just need to be sure Mandrill
   gets them all if 200 emails or more are sent it a second. I realise this might
   not be a large amount of emails for Mandrill, it just sounds like a lot to me!
   🙂
 * Thanks again!
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/page/2/#post-3254731)
 *     ```
       set_user_setting('urlbutton', 'file' );
       ```
   
 * sets links the attachment to the file by default. But the author can still change
   it to the attachment page.
 *     ```
       function gg_attachment_redirect() {
       	global $post;
       	if (is_attachment()) {
       		wp_redirect(wp_get_attachment_url( $post->ID ), 301);
       	exit;
       	}
       }
       add_action('template_redirect', 'gg_attachment_redirect', 1);
       ```
   
 * only redirects all the attachment pages to the file, even if it was set to attachment
   page.
 * You just add this code to your functions.php. I’m not sure if it would be useful
   to do his only for a specific group since you can change the default setting 
   anyway and if you redirect, your setting won’t make any difference.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/page/2/#post-3254725)
 * Hmm, the only way to do it is
 *     ```
       .attachment-display-settings .alignment {
       	display: none;
       }
       ```
   
 * but then the label’s still there. Of course it prevents people from setting it
   differently, but it’s not the cleanest solution.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/page/2/#post-3254723)
 * It does? Just add
 *     ```
       .attachment-display-settings {
       	display: none;
       }
       ```
   
 * to your admin.css or whatever you called it.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254721)
 * You can remove these buttons if you create a custom admin.css and add the following:
 *     ```
       #content_justifyleft,
       #content_justifyright,
       #content_justifycenter,
       #content_justifyfull {
       	display: none;
       }
       ```
   
 * To have even more control, add this to function.php:
 *     ```
       function custom_tinymce_options($initArray){
        	$initArray['theme_advanced_buttons1'] = 'styleselect,bold,italic,strikethrough,underline,|,bullist,numlist,blockquote,hr,|,justifyleft,justifycenter,justifyright,justifyfull,|,link,unlink,|,spellchecker';
        	$initArray['theme_advanced_buttons2'] = 'formatselect,forecolor,|,pastetext,pasteword,removeformat,|,charmap,sub,sup,|,outdent,indent,|,undo,redo';
        	return $initArray;
       }
       add_filter('tiny_mce_before_init', 'custom_tinymce_options');
       ```
   
 * Then remove the buttons you don’t want! 🙂
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254719)
 * Oh and if you need all the images to be aligned the same, just don’t add any 
   css. People will still be able to set the alignment, but it won’t do anything.
   Maybe override the editor-style css.css as well so people see that it doesn’t
   work before they post.
    Image default size should also be doable with css, though
   you keep the original size then. That’s a problem for for really big images… 
   There are a lot of plugins to resize the image before upload.
 * Of course, these options were really useful, so I hope we see them again in the
   next version. I also hope there will be an option to totally disable the attachment
   pages, because quite al lot of people don’t seem to use them.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254718)
 * For me the solution Andrew gave works. It sets the option to the media file as
   default, but it doesn’t remove any attachment pages from older post. I don’t 
   think totally disabling them is possible, but you might want to redirect them
   all. I use this:
 *     ```
       set_user_setting('urlbutton', 'file' );
       function gg_attachment_redirect() {
       	global $post;
       	if (is_attachment()) {
       		wp_redirect(wp_get_attachment_url( $post->ID ), 301);
       	exit;
       	}
       }
       add_action('template_redirect', 'gg_attachment_redirect', 1);
       ```
   
 * However, this won’t be a good solution if you need a direct link to the file,
   like for Fancybox for example.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: ["All of this theme’s files are located in" gone?](https://wordpress.org/support/topic/all-of-this-themes-files-are-located-in-gone/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/all-of-this-themes-files-are-located-in-gone/#post-3257915)
 * Oh, ok. It was useful to have it there though.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254708)
 * That works great, thanks!
    I know it just sets a default, but it would be even
   more interesting if there was an option to totally disable attachment pages. 
   Now I’m redirecting them all to the files. But thanks, this is what I was looking
   for!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Database Reset] deleted all users](https://wordpress.org/support/topic/deleted-all-users/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/deleted-all-users/#post-3256280)
 * It just logs you out. So you can’t log in again unless you manually insert a 
   new user in the db. I didn’t check if the post/postmeta was reset.
    That’s ok,
   thanks for your quick reply.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Database Reset] deleted all users](https://wordpress.org/support/topic/deleted-all-users/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/deleted-all-users/#post-3256276)
 * Ok, I just realised I’m running 3.5 RC3… Yes, I’m sure I didn’t select that.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254702)
 * Thanks, I’m glad I’ve been of some help then.
    Kind of annoying though, I’ll 
   try to force it with js or I’ll add a warning to our back end when we update 
   to 3.5. If there’s anyone who knows something that totally disables attachment
   pages (also the drop down?), please let me know 🙂
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254690)
 * Thanks!
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [image_default_link_type](https://wordpress.org/support/topic/image_default_link_type/)
 *  Thread Starter [averyl](https://wordpress.org/support/users/averyl/)
 * (@averyl)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/image_default_link_type/#post-3254688)
 * Yeah it works in 3.4.2. Is there any way to disable attachment pages in 3.5 or
   in general and link straight to the file without a redirect?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/averyl/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/averyl/replies/page/2/?output_format=md)