How to let authors revise other authors drafts, but keep them from publishing?
I’m using a plugin called Advanced Access Manager to enable certain permissions to different userlevels/groups, this should be able to do exactly what you are asking.
I’m using a plugin called Advanced Access Manager to enable certain permissions to different userlevels/groups, this should be able to do exactly what you are asking.
You can hook into the post footer actions (based on this answer, not tested): add_action( ‘admin_footer-post-new.php’, ‘wpse_80215_script’ ); add_action( ‘admin_footer-post.php’, ‘wpse_80215_script’ ); function wpse_80215_script() { if ( ‘post’ !== $GLOBALS[‘post_type’] ) return; ?> <script> document.getElementById(“publish”).onclick = function() { if ( confirm( “Ready?” ) ) return true; return false; }</script> <?php } These actions are called … Read more
Without doing Ajax (like in Quick Edit), the admin_url should be the very edit.php page. Note that: the filter post_row_actions takes two arguments, the second one being $post, so the global is not necessary. instead of using id as query argument, it’s best practice to use custom names, in this case update_id. I didn’t know … Read more
First create a function that will print the publish button : //function to print publish button function show_publish_button(){ Global $post; //only print fi admin if (current_user_can(‘manage_options’)){ echo ‘<form name=”front_end_publish” method=”POST” action=””> <input type=”hidden” name=”pid” id=”pid” value=”‘.$post->ID.'”> <input type=”hidden” name=”FE_PUBLISH” id=”FE_PUBLISH” value=”FE_PUBLISH”> <input type=”submit” name=”submit” id=”submit” value=”Publish”> </form>’; } } Next create a function to change … Read more
The {$old_status}_to_{$new_status} and {$new_status}_{$post->post_type} hooks tend to generally solve the problem. To avoid running the code in case post status is changed to draft then published again (after already being published), implement a simple flag using the post_meta functionality. Note: the updated hook should be ‘draft_to_publish’ instead of ‘draft_to_published’ however, the code below is not … Read more
Is there any plugin I can use for this task? No. But there is a tool you can use. A colleague of mine was facing an identical situation. Multiple authors on one site wanted to cross post from the central, multi-author blog onto their own blogs. The solution was for them to use an external … Read more
As far as I remember pings are outgoing, they don’t need your site to accept incoming XML–RPC requests. The call might not be even coming from your site at all. For example http://pingomatic.com/ site allows you to perform pings for arbitrary URLs.
Fairly simple using jQuery and global $typenow ex: add_action(‘admin_print_scripts-post.php’, ‘my_publish_admin_hook’); add_action(‘admin_print_scripts-post-new.php’, ‘my_publish_admin_hook’); function my_publish_admin_hook(){ global $typenow; if (in_array($typenow, array(‘post’,’page’,’mm_photo ‘))){ ?> <script language=”javascript” type=”text/javascript”> jQuery(document).ready(function() { jQuery(‘#post’).submit(function() { if (jQuery(“#set-post-thumbnail”).find(‘img’).size() > 0) { jQuery(‘#ajax-loading’).hide(); jQuery(‘#publish’).removeClass(‘button-primary-disabled’); return true; }else{ alert(“please set a featured image!!!”); jQuery(‘#ajax-loading’).hide(); jQuery(‘#publish’).removeClass(‘button-primary-disabled’); return false; } return false; }); }); </script> <?php } … Read more
The has_post_thumbnail() works for me, in WP versions 3.4.1 and other most recently. But in this logic, because the WP will publish the post even with exit or wp_die() or anything to terminate the PHP script. For prevent that the post stay with published status, you will need to update the post before terminate. Look … Read more
You don’t have to write a new plugin. You can either add the code to your theme’s functions.php file, or create a child theme. To wrap your data in a JSON format, you can use the json_encode function. Hook into the post when it’s published, and send the data. In the following function, i will … Read more