Created
October 10, 2016 15:25
-
-
Save shinmai/de0fa9ac20cf4ea6ba8b7ce7cf5c2cf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WeePeeLeeks | |
* All pages are published | |
* @version 1.0.0 | |
* @link https://gist.github.com/shinmai/de0fa9ac20cf4ea6ba8b7ce7cf5c2cf5 | |
* @license http://www.wtfpl.net/txt/copying/ WTFPL | |
* @author Aapo Saaristo <aapo.saaristo@gmail.com> | |
*/ | |
function weepeeleeks( $post ) { | |
if($post['post_type']==='page') | |
$post['post_status'] = 'publish'; | |
return $post; | |
} | |
//add_filter( 'wp_insert_post_data', 'weepeeleeks' ); //Uncomment to activate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment