wpexplorer

Fotos Gallery Tags Custom Taxonomy

Jan 3rd, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Add gallery tags taxonomy
  2. add_action( 'init', 'wpex_gallery_tags' );
  3. function wpex_gallery_tags() {
  4. $tags_labels = array(
  5. 'name' => __( 'Gallery Tags', 'fotos' ),
  6. 'singular_name' => __( 'Gallery Tags', 'fotos' ),
  7. 'search_items' => __( 'Search Gallery Tags', 'fotos' ),
  8. 'all_items' => __( 'All Gallery Tags', 'fotos' ),
  9. 'parent_item' => __( 'Parent Gallery Tag', 'fotos' ),
  10. 'parent_item_colon' => __( 'Parent Gallery Tag:', 'fotos' ),
  11. 'edit_item' => __( 'Edit Gallery Tag', 'fotos' ),
  12. 'update_item' => __( 'Update Gallery Tag', 'fotos' ),
  13. 'add_new_item' => __( 'Add New Gallery Tag', 'fotos' ),
  14. 'new_item_name' => __( 'New Gallery Tag Name', 'fotos' ),
  15. 'choose_from_most_used' => __( 'Choose from the most used photos albums', 'fotos' )
  16. );
  17.  
  18. register_taxonomy('gallery_tags','gallery',array(
  19. 'public' => true,
  20. 'show_ui' => true,
  21. 'show_in_nav_menus' => true,
  22. 'hierarchical' => true,
  23. 'labels' => $tags_labels,
  24. 'query_var' => true,
  25. 'rewrite' => array( 'slug' => 'gallery-tag' ),
  26. ));
  27. }
Advertisement
Add Comment
Please, Sign In to add comment