Docs to WordPress
[resolved] Auto-Publish (2 posts)

  1. crazysurf123
    Posted 2 years ago #


    i've spent the night trying to add filter which will allow to publish directly and not set it as draft :)

    Can you please help me.

    Best regards.


  2. William P. Davis
    Plugin Author

    Posted 2 years ago #

    This is similar to the question posed at http://wordpress.org/support/topic/plugin-docs-to-wordpress-id-love-to-use-this-for-pages-rather-than-posts and the answer is the same, with a slight twist.

    You can extend the Docs to WordPress plugin using the pre_docs_to_wp_insert filter. The plugin would look like this:

    Plugin Name: Docs to WP auto publish
    add_filter( 'pre_docs_to_wp_insert', 'docs_to_wp_auto_publish' );
    function docs_to_wp_auto_publish( $post_array = array() ) {
         $post_array[ 'post_status' ] = 'publish';
         return $post_array;

    I haven't tested this, but it should do the trick.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Docs to WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.