Created
May 21, 2014 17:02
-
-
Save thadallender/4f7186e05fa5bf1579d6 to your computer and use it in GitHub Desktop.
Filter Sell Media add bulk and add package post status
This file contains hidden or 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
| /** | |
| * Filter the post status of newly created Sell Media items | |
| * Applies only to Add Bulk and Add Package features | |
| * Useful if you don't want contributors to publish new items | |
| * Without first being approved | |
| */ | |
| function my_sell_media_post_status(){ | |
| if ( current_user_can( 'manage_options' ) ) { | |
| return 'publish'; | |
| } else { | |
| return 'pending'; | |
| } | |
| } | |
| add_filter( 'sell_media_post_status', 'my_sell_media_post_status' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment