Title: s1de7's Replies | WordPress.org

---

# s1de7

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP STAGING - WordPress Backup, Restore & Migration] Plugin should obey filtered upload_dir](https://wordpress.org/support/topic/plugin-should-obey-filtered-upload_dir/)
 *  Thread Starter [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/plugin-should-obey-filtered-upload_dir/#post-17922391)
 * I add the filter to the upload_dir hook in the functions.php of the theme. This
   is working for media files and as returned by wp_upload_dir().
 * I just tested adding the filter as a mu-pluging and now it is working. This means
   your plugin is calling wp_upload_dir() before the theme is loaded.
    -  This reply was modified 1 year, 9 months ago by [s1de7](https://wordpress.org/support/users/side777/).
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WordPress 4.2.1 pre_get_comments doesn't work after update](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/#post-6074174)
 * ok, it seems that’s where the query alteration belongs. it doesn’t make sense
   anymore to use `pre_get_comments` for this…
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WordPress 4.2.1 pre_get_comments doesn't work after update](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/#post-6074171)
 * for opening the ticket, i was to lazy…
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WordPress 4.2.1 pre_get_comments doesn't work after update](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/#post-6074169)
 * and already fixed. thanks!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [WordPress 4.2.1 pre_get_comments doesn't work after update](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/wordpress-421-pre_get_comments-doesnt-work-after-update/#post-6074167)
 * thanks! but **altering the clauses may actually be a bad idea because it breaks
   caching**. it doesn’t matter in your case but on frontend the comments query 
   is cached using a unique key based on the query string. if you dynamically alter
   the clauses and use a persistant cache it returns the same cache for the same
   query string and possibly different clauses.
 * i ended up using the `comments_array` which doesn’t break the cache but is not
   so ideal performance-wise. would be nice if `pre_get_comments` would work again
   as expected…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] The latest beta from GitHub is good for testing – Thank You!](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/page/2/#post-5698678)
 * i think this is not a good approach anyway – in worst case you query 1000s of
   comments WITH the corresponding posts, PLUS filtering the post content –
 * i wrote my own solution a while ago… i think it’s way more effective to save 
   the current language to a comment meta when the comment is saved. this way you
   can easily query comments by meta.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] The latest beta from GitHub is good for testing – Thank You!](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/page/2/#post-5698676)
 * this one is new since one of the latest dev versions:
    `add_filter('comments_clauses','
   qtranxf_excludeUntranslatedPostComments',10,2)` this function doesn’t even exist
   in earlier versions.
 * i get a `WordPress database error Unknown column 'wp_posts.post_content' in '
   where clause' for query SELECT * FROM wp_comments` […]
    but only on some sites
   of my multisite network. still investigating.
 * unfortunately i could not reproduce the error with a clean 2015 – BUT `get_comments()`
   still returns an empty array! the 2015 recent comment widget DOES return the 
   comments, but ALL, also for untranslated posts, though.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] incompatibility with 'PS Disable Auto Formatting'](https://wordpress.org/support/topic/incompatibility-with-ps-disable-auto-formatting/)
 *  Thread Starter [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/incompatibility-with-ps-disable-auto-formatting/#post-5775658)
 * i think this should be in the hands of plugin authors to handle it if they manipulate/
   duplicate core functions.
 * will you add this to the plugin? otherwise i would have to use this as a patch…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] excerpt field in backend editor](https://wordpress.org/support/topic/excerpt-field-in-backend-editor/)
 *  Thread Starter [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/excerpt-field-in-backend-editor/#post-5775499)
 * thanks, [@gunu](https://wordpress.org/support/users/gunu/)! that was easy…
 * this should be default, though. the excerpt is also part of the revision page
   and it IS filtered there…! (the title is not, btw.) [@john](https://wordpress.org/support/users/john/)?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] The latest beta from GitHub is good for testing – Thank You!](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/page/2/#post-5698672)
 * **[@john](https://wordpress.org/support/users/john/): there’s a serious bug in
   qtranslate_frontend.php line 356**
 * i don’t know what you are trying to do with the comments query? if you alter 
   the query that way it breaks any call of `get_comments()` outside of the loop
   where ‘where’ doesn’t contain ‘comment_post_ID’ – this is very likely happening
   with ‘recent comments’ widgets.
 * what are you trying to achieve anyway? is this a typo and you were going for ‘
   comment_content’ instead of ‘post_content’? why are you filtering the comments?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] The latest beta from GitHub is good for testing – Thank You!](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/page/2/#post-5698671)
 * [@john](https://wordpress.org/support/users/john/): i am still investigating 
   the database error. i’ll get back to you asap, in the next few hours.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate X] The latest beta from GitHub is good for testing – Thank You!](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/the-latest-beta-from-github-is-good-for-testing-thank-you/#post-5698667)
 * i get lots of database errors with the latest dev version.
 * and are excerpts supposed to work in the editor?? because the lang switch doesn’t
   affect the excerpt field…
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Why not just login automatically when user is activated?](https://wordpress.org/support/topic/why-not-just-login-automatically-when-user-is-activated/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/why-not-just-login-automatically-when-user-is-activated/#post-3649038)
 * well, the hook would be ‘wpmu_activate_user’ and – of course – i added an action
   to it with the snippet above. (slightly changed.) i did
 * **NOT EDIT ANY CORE FILES!! **
 * this is absolutely not recommended and i am sorry that i wasn’t clear about this
   before.
 * **this is the code i used:**
 *     ```
       function custom_login_new_user( $user_id, $email, $meta ) {
       	$user = new WP_User( (int) $user_id );
       	$creds = array();
       	$creds['user_login'] = $user->user_login;
       	$creds['user_password'] = $meta['user_pass'];
       	$creds['remember'] = true;
       	$user = wp_signon( $creds, false );
       	wp_set_current_user($user->ID);
       	if ( is_wp_error($user) ) {
       		echo $user->get_error_message();
       	} else {
       		// safe redirect to actually login the user - otherwise they would need to manually refresh the page
       		// PLUS: this clears the activation confirmation page with the plain text password printed on screen
       		wp_safe_redirect( get_home_url() );
       		exit;
       	}
       }
       add_action( 'wpmu_activate_user', 'custom_login_new_user', 10, 3 );
       ```
   
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Why not just login automatically when user is activated?](https://wordpress.org/support/topic/why-not-just-login-automatically-when-user-is-activated/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/why-not-just-login-automatically-when-user-is-activated/#post-3649036)
 * **thanks for this snippet!** i use it in my network now.
 * this is WAY better than showing the password – in plain text – on the screen 
   in the browser after activation! (which is very far away from secure…)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Insert Title To Link] Multisite](https://wordpress.org/support/topic/multisite-115/)
 *  [s1de7](https://wordpress.org/support/users/side777/)
 * (@side777)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/multisite-115/#post-4102362)
 * As a workaround, you can edit the plugin and remove the line
 * `* Network: true`
 * You can than activate it individually and it works fine. 🙂

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

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