Last active
September 3, 2015 03:53
-
-
Save shawncampbell/c778f273b1782471a0b4 to your computer and use it in GitHub Desktop.
Add YARPP support to WordPress custom post types created with WPMU DEV CustomPress
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
/** | |
* CustomPress YARPP Support | |
* | |
* Add YARPP support to WordPress custom post types created with WPMU DEV CustomPress | |
*/ | |
add_action( 'registered_post_type', 'my_custom_post_type_yarpp_support', 10, 2 ); | |
function my_custom_post_type_yarpp_support( $post_type, $args ) { | |
// Optionally specify a single custom post type | |
//if ( 'my_custom_post_type' === $post_type ) { | |
global $wp_post_types; | |
$args->yarpp_support = true; | |
$wp_post_types[$post_type] = $args; | |
//} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment