Skip to content

Instantly share code, notes, and snippets.

@tarikcayir
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarikcayir/9396861 to your computer and use it in GitHub Desktop.
Save tarikcayir/9396861 to your computer and use it in GitHub Desktop.
<?php
/**
* All qTranslate Taxonomies!
*/
add_action('admin_init', 'qtranslate_edit_taxonomies');
function qtranslate_edit_taxonomies(){
$args = array(
'public' => true,
'_builtin' => false
);
$output = 'object'; // or objects
$operator = 'and'; // 'and' or 'or'
$taxonomies = get_taxonomies($args,$output,$operator);
if ($taxonomies) {
foreach ($taxonomies as $taxonomy ) {
add_action( $taxonomy->name.'_add_form', 'qtrans_modifyTermFormFor');
add_action( $taxonomy->name.'_edit_form', 'qtrans_modifyTermFormFor');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment