The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
24 views

wp_trash_post retrashes already trashed comments?

I have a few mail- and update_user_meta functions that fires when a post, comment or child comment gets thrashed. So when I trash a comment with trash_comment, a mail get sent to the author: "Hey, ...
0
votes
1answer
26 views

transition_comment_status gets called when untrashing comments

I can't seem to figure out why untrashing a comment, calls my "approve_comment_callback"-action. Any ideas? I just don't want it to send two emails at the same time, when I untrash a comment. Here ...
0
votes
1answer
25 views

Dynamically create/remove terms in taxonomy when custom post type is published/trashed

Am struggling a bit with creating & removing terms based on when a custom post type is published and trashed. Ideally, I would like to create a new term in my custom taxonomy when a custom post ...
0
votes
1answer
43 views

Trash a post, send associated comments into the trash bin (change status)

When trashing a post, all comments associated with this post get the status "post-trashed". They do not end up in the trash bin. In my theme the author gets a point for posting a post or a comment. ...
0
votes
0answers
25 views

Hook into trash_post_comments, update_user_meta

I have a theme where the author get points for posting posts and comments. When I trash a post, the user get 1 point removed from their score. This works fine with this function: However... When I ...
1
vote
1answer
77 views

When trashing a post, also trash related comments

As it is now, when I trash a post, the related comments get deleted at once. Is this standard? Instead I'd like them to be moved to the trash bin, when I trash the post. How can I achieve this? I ...
0
votes
0answers
12 views

Trashed “comment replies” still visible?

When I send a "comment reply" to the trash bin it's still visible on the site. It only disappears after you've deleted it permanently. Is there a way to fix this?
1
vote
1answer
32 views

Deleting the attached “comment replies” when trashing a comment

When sending a comment to the bin, the attached "comment replies" does not get trashed or deleted. How can you configure wordpress so that when you trash a comment, the comment replies automatically ...
0
votes
1answer
29 views

Conditionally process comments while ignoring replies

I use a WordPress theme that awards users points (kept track of in user meta-data) for posting comments. However, they are not awarded points for replying to a comment. When I move a comment to the ...
0
votes
1answer
19 views

What's the difference with trash_comment and wp_trash_comment?

I don't understand when I'm suppose to use trash_comment over wp_trash_comment. What's the difference?
0
votes
1answer
34 views

get_option('sticky_posts') returns stickies that are in trash

The value of get_option('sticky_posts') includes those that are in the trash. How can I get a value minus stickies that are in the trash? var $stickies = count(get_option('sticky_posts'));
0
votes
1answer
20 views

WP Posts Not Adding Up

My WP is hosted at Yahoo I am running WP 3.5.2 and the Posts Page does not add up All (4,356) | Published (629) | Sticky (1) | Drafts (265) | Private (88) WP seems to have an extra 3373 posts. I ...
0
votes
0answers
36 views

How to hook in to bulk trash posts

I am trying to hook into the trash post function in the bulk menu. I've managed to hook into an item when I trash it by it self by using the wp_trash_post hook, but this does not work when doing it ...
1
vote
1answer
119 views

How to use update_post_meta inside wp_trash_post

I have some metadata on my post edit page that saves perfectly using the hook and function below: add_action('save_post', 'save_meta_data'); function save_meta_data($post_id){ ...
2
votes
1answer
72 views

wp_trash_post not firing

I want to call a function when a post is placed into the trash. I want to do something more complicated than the following, but have simplified to what's below just to see if it'll work and it ...
0
votes
1answer
302 views

Add frontend “Restore” link

I am using get_delete_posts_link($postid) to let users send their posts to the trash from the frontend. Now I'm trying to replicate the same functionality for them to "untrash" or restore the posts as ...
0
votes
1answer
88 views

Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins

I'm trying to adjust the comments screen for non admins to my project. Right now I'd like to disable Quick Edit | Edit | History | Spam under any comment left for any post created by the user. ...
0
votes
1answer
85 views

How to restore all items from trash

I have accidentally deleted a WP user. By deleting it, WP removed all the media files, pages etc. I could retrieve pages and posts from trash. But I could not restore media items. Is there a way to ...
2
votes
2answers
62 views

Is there an action that is called when a post is restored from the trash?

I'm looking at the wordpress list of actions and trying to find an action that is called when a post is restored from the trash but cannot find one. Does anyone know if it exists?
1
vote
1answer
108 views

Restrict access to the Trash folder in Posts

I want to restrict users from deleting posts permanently. How do I restrict access to the Trash folder in Posts? This is the only page were the users can delete their posts permanently. The only ...
10
votes
1answer
229 views

How do I programatically empty trash?

I need to create an "Empty Trash" button inside my plugin. How would I do it using PHP code?
1
vote
1answer
1k views

How to use wp_nonce_url() in a link?

I am creating a plugin to display all posts from all custom post type. It is something like in edit.php, but instead of displaying single post type,I would like to display all posts in one page from ...
0
votes
1answer
239 views

Problem deleting posts from trash

My clients has recently had a problem with spam posts being added to their blog, under various usernames. The users have been deleted, but Wordpress is not able to remove the posts from the trash. ...
0
votes
1answer
242 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
2
votes
1answer
340 views

How to change redirect after moving a page to trash?

How could I change the redirect location after a user trashes a page? Right now they go to all pages here:....wp-admin/edit.php?post_type=page I want them to go ...
3
votes
2answers
1k views

trash_post action with Custom Post Type

I have a Custom Post Type "empresa" and would like to send email when a post type is deleted (moved to trash). I have this function below for my POSTS, How can I use with my Post Type "empresa"? ...
2
votes
0answers
242 views

Posts mysteriously disappearing/deleted [closed]

I'm looking for help about this issue I've been having on one of my client's sites (http://revistero.mx it's in spanish) The problem is that somehow, every once in a while the last published posts ...
0
votes
1answer
76 views

Conditional tag-like function to tell if post is in trash?

What could I put in my theme to tell if a post is in the trash or not? For example: <?php if (is_trash) echo 'This post is in the trash!' ?>
1
vote
2answers
1k views

Turn Off Automatic Trash Deletion?

I have a client who wants to use the trash feature, but keep items in there indefinitely (I have no idea why, but they insist on it). From reading this codex article on the trash status, I see that ...
1
vote
1answer
377 views

Comment Spammed vs Trashed

What's the difference between marking a comment as spam and trashing it?