1
vote
1answer
13 views

How to add a checkbox inside the “Publish post” widget?

I'm building post to email plugin and I need to add a checkbox to the publish post widget like this one: My idea is to add a checkbox that says "Send this by email", and get that info inside the ...
0
votes
1answer
34 views

How can I get the user that publishes a post?

I have multiple users. Some are writers, others are editors. Is there a way to get the editor (id) that publish the post? I am able to get the author id but the not the editor's id that publish the ...
2
votes
2answers
792 views

add action only on post publish - not update

I have action which adds meta field with value on post publish. Problem is that when I update post meta field is reset to default value. I already tried 'new_to_publish' instead of 'publish_post' ...
0
votes
1answer
2k views

wp_login action hook not working

I have spent many time looking for a solution to my issue, but in vain. Your help is invaluable. I am creating a simplified badge system. The goal is to increment the number of badges for a user if ...
3
votes
1answer
237 views

How to add a “publish” link to the quick actions

I'm trying to add a "Publish" link by the quick actions: but I'm not exactly sure of how implement it. Here's what I've got so far: add_filter('post_row_actions', function ( $actions ) { ...
0
votes
1answer
467 views

publish_post action hook not working

I've got a really simple problem here, and i'm sure that the solution is going to be really simple. Here is the code: function the_fat_lady_sings() { echo 'this plugin is a far harder than i ...
1
vote
0answers
80 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
0
votes
1answer
96 views

Plugin that generates a page of post content

My script is generating a duplicate post even after I explicitly state that the post_type should be a page. It also ignores the $post_title, which I do not want to create a duplicate post if the title ...
-1
votes
1answer
89 views

Action while post is being published

I modified the wordpress admin with a plugin I wrote, and my last problem is that there's no action anymore while the post is being updated or published in the admin. I looked around for a function or ...
0
votes
1answer
2k views

add_action hook for publish_post not working

I can't get my function to trigger on post update or save. I've found a couple of other forum posts around with the same problem, but never an answer :( My code is as simple as: function ...
1
vote
1answer
1k views

How can I automatically set a post slug based on the post title during post publish?

When you create a post in WP, if you don't specify a title rapidly, WP generates a default slug on autosave, based on the post ID. Then, when you add the title later, unless you modify the slug by ...