How to add custom status to quick edit

Unfortunately there are no filters or actions for modifying the post status select in quick edit (WP_Posts_List_Table::inline_edit()) – you’d need to resort to JavaScript: (function($){ $( “select[name=_status]” ).each( function () { var value = $( this ).val(); if ( value === “pending” ) $( “option[value=pending]”, this ).after( “<option value=”status-1″>Status 1</option>” ); else if ( value … Read more

How can I get the user that publishes a post?

I am not sure if that is built in, but you can try adding something like this to your functions.php function set_publisher( $new_status, $old_status, $post ) { $publisher_id = get_current_user_id(); if ( $new_status == ‘publish’ && $publisher_id > 0) { update_post_meta($post->ID, ‘post_publisher’, $publisher_id); } } add_action( ‘transition_post_status’, ‘set_publisher’, 10, 3 ); And then when you … Read more

Where is publish_post hook fired?

As @shanebp suggested you in a comment to OP, that is one of the hook fired by the function wp_transition_post_status, it’s a bit hard to find it doing a search in code because is a dynamic hook, in facts the line in code that fires it looks like: do_action( “{$new_status}_{$post->post_type}”, $post->ID, $post ); Where $new_status … Read more

Authors should not publish

The role you are describing is “Contributor”. So the option would be to use this role unless you still want to edit Author capabilities which would be done as follows: function disable_authors_publish_cap() { // Get author role object $author = get_role( ‘author’ ); // Remove the post publishing capability $author->remove_cap( ‘publish_posts’ ); } add_action( ‘init’, … Read more

Add delay to publish post

I think that by adding a delay you’re not really fixing the issue, you’re simply hiding it, until you grow and add more media and servers, so lsyncd will take longer, and you’ll have to increase your delay every time. Also what about updating existing posts? People might add media items and update, or add … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)