Title: wonderm's Replies | WordPress.org

---

# wonderm

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Thumbnails Not Showing in Admin](https://wordpress.org/support/topic/thumbnails-not-showing-in-admin/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/thumbnails-not-showing-in-admin/#post-4741860)
 * Thanks Evan. I’m afraid chaning the size is not an option as we have over 350,000
   photos. By having a different size we’ll create another 350k files which we don’t
   need.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Sort by Custom Post & Date](https://wordpress.org/support/topic/sort-by-custom-post-date/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/sort-by-custom-post-date/#post-4643836)
 * Thank you. The function doesn’t sort out the date. I have this function currenlty
   but it is slow:
 *     ```
       add_filter('pre_get_posts', 'sort_my_archive');
       function sort_my_archive($q) {
       if ($q->is_tax || $q->is_archive) {
           add_filter( 'posts_orderby', 'orderby_bad_car' );
       }
       return $q;
       }
       function orderby_bad_car( $order ) {
         $order = "(SELECT meta_value FROM wp_postmeta WHERE meta_key = 'wpcf-bad-car' AND post_id = wp_posts.ID) ASC, wp_posts.post_date desc";
         return $order;
       }
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/page/2/#post-4325213)
 * Hi Karzin, just wanted to know if you had any more thoughts or feedback for us
   regarding this matter?
 *   Forum: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
   
   In reply to: [Safeguard Original Images](https://wordpress.org/support/topic/safeguard-original-images/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/safeguard-original-images/#post-4527169)
 * I wish to keep the originals untouched, the future we may change the logo or 
   watermark.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/page/2/#post-4325211)
 * Hi Karzin,
 * Would $50 donation get it done fast?
 * Fais
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/#post-4325210)
 * Hi Karzin,
 * I am happy to donate, when you be able to make the change we need? If it is months
   or weeks, then I will have to pay someone else to write one for me. We need one
   within 10 days at the latest.
 * We are going live soon and need it done before.
 * Thank you for your effort.
 * Fais
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/#post-4325208)
 * Hi Karzin,
 * Thank you for getting back to us. If I sent you a small donation, can this be
   done by the end of this week?
 * Thanks
 * Fais
 *   Forum: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
   
   In reply to: [Safeguard Original Images](https://wordpress.org/support/topic/safeguard-original-images/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/safeguard-original-images/#post-4527141)
 * I have removed links to the original image in the Theme. Only other sizes are
   shown in the site with a watermark.
 * The original doesn’t have watermarks, therefore i need to ensure no one can access
   it via the URL.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Rename attachment filenames to "attachment ID" on upload](https://wordpress.org/support/topic/rename-attachment-filenames-to-attachment-id-on-upload/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/rename-attachment-filenames-to-attachment-id-on-upload/#post-4412861)
 * Hello,
 * I found this code on the net, how can this be changed to rename the files to 
   attachment ID?
 * Thanks
 * add_action(‘add_attachment’, ‘rename_attacment’);
    function rename_attacment(
   $post_ID){
 *  $post = get_post($post_ID);
    $file = get_attached_file($post_ID); $path = pathinfo(
   $file); //dirname = File Path //basename = Filename.Extension //extension = Extension//
   filename = Filename
 *  $newfilename = “NEW FILE NAME HERE”;
    $newfile = $path[‘dirname’].”/”.$newfilename.”.”.
   $path[‘extension’];
 *  rename($file, $newfile);
    update_attached_file( $post_ID, $newfile );
 * }
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/#post-4325206)
 * Hi Karzin, any feedback would be appericated.
 *   Forum: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
   
   In reply to: [Safeguard Original Images](https://wordpress.org/support/topic/safeguard-original-images/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/safeguard-original-images/#post-4527139)
 * When an image is uploaded, the original is uploaded in the same directory as 
   the one with the different sizes.
 * So maybe a plugin can have all the original in e.g.
    wp-contents/uploads_originals/{
   or a folder you specify so no one would know}
 * the rest of the sizes are in the normal directory
    wp-contents/uploads/
 *   Forum: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
   
   In reply to: [Safeguard Original Images](https://wordpress.org/support/topic/safeguard-original-images/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/safeguard-original-images/#post-4526969)
 * e.g.
    wp-contents/upload/image.jpg would not exist
 * only thumbnails would exist
    wp-contents/upload/image-300×200.jpg would exist
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Thumbnail Upscale] Upscale images](https://wordpress.org/support/topic/upscale-images/)
 *  Thread Starter [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/upscale-images/#post-4526968)
 * khromov, that works perfectly and thank you for your fast support.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/#post-4325195)
 * Hi Karzin, any development on this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Rename Media Files: Improve Your SEO] Change filename to Post ID](https://wordpress.org/support/topic/change-filename-to-post-id/)
 *  [wonderm](https://wordpress.org/support/users/wonderm/)
 * (@wonderm)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/change-filename-to-post-id/#post-4325147)
 * Hi Karzin,
 * Just wondering if you had any more thought on this?
    Thank you
 * Fais

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

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