Skip to main content

Questions tagged [threading]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
872 views

Does WordPress handle concurrency and atomicity properly?

Take a look at this pseudo code: $b = SELECT balance FROM accounts WHERE user='john' $b -= 10 UPDATE account SET balance=$b WHERE user='john' The code draws 10 dollars from John's bank account. But ...
zomega's user avatar
  • 121
2 votes
2 answers
188 views

Threaded commenting: how to show threads by last active first?

Hi all and happy holidays! I have a page on which I enabled threaded commenting. At present, the comments are ordered new to old by when the thread started: -Comment 3 -Comment 2 -Comment 5 -Comment ...
jberculo's user avatar
  • 153
1 vote
0 answers
598 views

How wp-cron can run in background if PHP is single threaded?

I read that wp-cron runs when a page load request comes. So, if PHP is single threaded how can all the cron jobs run as a separate task? If that's not the case, may anyone please help to understand ...
learning_13's user avatar
0 votes
1 answer
505 views

Can I run a slow action in a seperate thread?

I have a really slow-running action (30-45 seconds) that loops over each user in my DB and syncs the data with some off-site database. I want this to happen once or twice daily, so I have a WP-Cron ...
Ahrengot's user avatar
  • 442
1 vote
1 answer
297 views

Count comment threads, not total comments in a post

For a post I'd like to count the comment threads and not include nested replys in the count. Currently I'm using a simple comment count, comments_number( $zero, $one, $more ); What would be the best ...
Jon Laba's user avatar
8 votes
1 answer
533 views

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' ); $...
Greeso's user avatar
  • 2,204
5 votes
1 answer
2k views

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 ...
User's user avatar
  • 341
1 vote
3 answers
455 views

Filtering Comment Reply Links (comment_reply_link_args) for "infinite replies" in nested comments

UPDATE: I'm going to update this one up at the top, because the solution I've found was with a differing filter hook. I'm going to look again at reply_link-specific hooks now that I better understand ...
CK MacLeod's user avatar
  • 1,857
0 votes
1 answer
344 views

How to enable reply button on mostly deeply-nested comments? [closed]

I have a blog on wordpress.com, using the Twenty Twelve theme. Background In my experience, on wordpress blogs with nested comments, the reply buttons only show on individual comments when their ...
ratamacue0's user avatar
0 votes
1 answer
54 views

Trigger function without awaiting response?

I'm running an e-commerce solution for a client and have to upload a .txt file to an FTP for each order. I need to trigger the function I wrote to do this every time an order comes in, but I'm not ...
dhelm's user avatar
  • 1
0 votes
0 answers
201 views

Removing a line from a WP core function (comment_template.php) - filter or other technique?

a The effect I want to achieve - at least at this point - is simply to have the comment reply link continue to appear below comments even after "max_depth" for threaded comments has been reached. ...
CK MacLeod's user avatar
  • 1,857
0 votes
0 answers
37 views

How to force users to nest their comments

I am trying to figure out how to force commenters to use threaded comments (and not the general comment box at the bottom of the post) on one particular post. I want only admins to be able to post new ...
R. Durham's user avatar
  • 101
0 votes
1 answer
153 views

different levels of nested comments per page

I am working on a wordpress site that usually allows three levels of nested comments. But I would like for (at least) one specific page to allow only one level of comments => no nesting. How can I do ...
dexBerlin's user avatar
  • 125
4 votes
1 answer
744 views

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 ...
anu's user avatar
  • 9,562
2 votes
1 answer
1k views

Get threaded comments number

I'm using Greg's Threaded Comment Numbering plugin to number the comments. Actually I'm displaying a number beside of each parent comment (no threaded comments numbers). I have 2 problems that I have ...
Andycap's user avatar
  • 585
2 votes
1 answer
1k views

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 ...
Andycap's user avatar
  • 585
2 votes
1 answer
3k views

Last comment page first with full number of comments?

I use paged and threaded comments with: 10 comments per page the last comment page first the newest comments first If there are 21 comments total, the first page only contain 1 comment - the newest. ...
Richard B's user avatar
  • 398
1 vote
1 answer
424 views

Any insights into Transient API locking, cron and threading?

How does one go about locking down transient API requests for multiple threading? Has anything done some benchmarking, just how much can the transient API handle for multiple concurrent requests? It ...
Wyck's user avatar
  • 18k