Last active
February 24, 2019 13:33
-
-
Save guillaumemolter/737c764512f9a40a821818ae5aa54634 to your computer and use it in GitHub Desktop.
Adding multisite taxonomy support to custom post types.
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
<?php | |
add_filter( 'hsph_plugin_tagging_topics_post_types', 'cchange_register_cpt_for_tagging' ); | |
add_filter( 'hsph_plugin_tagging_cchange_issues_post_types', 'cchange_register_cpt_for_tagging' ); | |
add_filter( 'hsph_plugin_tagging_cchange_subtopics_post_types', 'cchange_register_cpt_for_tagging' ); | |
function cchange_register_cpt_for_tagging( $post_types = array() ) { | |
// Array of custom post types. | |
$cutom_post_types = array( 'cchange_article', 'cchange_issue', 'cchange_subtopic', 'cchange_bio', 'cchange_class', 'cchange_event' ); | |
// Merging default post types and custom post types. | |
$post_types = array_merge( $post_types, $cutom_post_types ); | |
return $post_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment