Toggle nested comments

I am trying to find a solution to toggle (hide/show) threaded comments. I need to see only comments 1,2,3 etc… and hide 1.1,1.2,1.3 etc… Clicking “show comments” will toggle and display the thread of comments. example: 1 — —–clicking “show more comments” shows —– 1.1 —– 1.2 —– 1.3 —– … 2 — —–clicking “show … Read more

Threaded comments – deleting parent comment leads to orphan comments

Got an issue on a site where deleting a comment with replies (where threaded commenting is activated), leads to the child comments being orphaned, causing unexpected behaviour (such as the orphaned comments attaching themselves to the latest comment). I haven’t looked into this yet, but before I do, is this a known problem with threaded … Read more

WordPress and multithreading

I’m working on a plugin. I’ve created an API that reads and writes to a custom table in the DB. This API can be called potentially from N clients simultaneously (and it really happens). I noticed that in this case problems arise. To give a specific example: if (is_null($wpdb->get_var(“SELECT column FROM my_table_name WHERE condition”))) { … Read more

Alternative to get_posts() due to multithreading cache crash

I am using pthreads to creat multiple threads. Each of those threads at one point tries to use get_posts() as follows: $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘any’ ); $posts_list = get_posts($args); However I end up with the following crash: HP Fatal error: Call to a member function get() on a non-object in … Read more