Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /**
  2. * qtranslate custom taxonomies
  3. */
  4. function qtranslate_edit_custom_taxonomies(){
  5. $args=array(
  6. 'public' => true ,
  7. '_builtin' => false
  8. );
  9. $output = 'object'; // or objects
  10. $operator = 'and'; // 'and' or 'or'
  11.  
  12. $taxonomies = get_taxonomies($args,$output,$operator);
  13.  
  14. if ($taxonomies) {
  15. foreach ($taxonomies as $taxonomy ) {
  16. add_action( $taxonomy->name.'_add_form', 'qtrans_modifyTermFormFor');
  17. add_action( $taxonomy->name.'_edit_form', 'qtrans_modifyTermFormFor');
  18. }
  19. }
  20. }
  21. add_action('admin_init', 'qtranslate_edit_custom_taxonomies');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement