Created
March 1, 2019 01:30
-
-
Save JayWood/b15a41c4e91a0de91b9e32652dbb8d16 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
<?php | |
/** | |
* Include all non-core taxonomies in the sync request, limiting by publicly queryable. | |
* | |
* @param array The list of existing taxonomies. | |
* @return array The new array list. | |
*/ | |
function sync_non_core_taxonomies( $taxonomies ) { | |
$taxes = get_taxonomies(); | |
foreach ( $taxes as $taxonomy ) { | |
$tax = get_taxonomy( $taxonomy ); | |
if ( $tax->publicly_queryable ) { | |
$taxonomies[] = $tax->name; | |
} | |
} | |
return $taxonomies; | |
} | |
add_filter( 'ep_sync_taxonomies', 'sync_non_core_taxonomies' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment