Advertisement
Guest User

Continents taxonomy

a guest
Oct 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. // Register Custom Taxonomy
  2. function Continents() {
  3.  
  4. $labels = array(
  5. 'name' => _x( 'Continents', 'Taxonomy General Name', 'ryan-handy' ),
  6. 'singular_name' => _x( 'Continent', 'Taxonomy Singular Name', 'ryan-handy' ),
  7. 'menu_name' => __( 'Continents', 'ryan-handy' ),
  8. 'all_items' => __( 'All Continents', 'ryan-handy' ),
  9. 'parent_item' => __( 'Parent Item', 'ryan-handy' ),
  10. 'parent_item_colon' => __( 'Parent Item:', 'ryan-handy' ),
  11. 'new_item_name' => __( 'New Continent', 'ryan-handy' ),
  12. 'add_new_item' => __( 'Add New Continent', 'ryan-handy' ),
  13. 'edit_item' => __( 'Edit Continent', 'ryan-handy' ),
  14. 'update_item' => __( 'Update Continent', 'ryan-handy' ),
  15. 'view_item' => __( 'View Continent', 'ryan-handy' ),
  16. 'separate_items_with_commas' => __( 'Separate items with commas', 'ryan-handy' ),
  17. 'add_or_remove_items' => __( 'Add or Remove contient', 'ryan-handy' ),
  18. 'choose_from_most_used' => __( 'Choose from the most used', 'ryan-handy' ),
  19. 'popular_items' => __( 'Popular Items', 'ryan-handy' ),
  20. 'search_items' => __( 'Search Continents', 'ryan-handy' ),
  21. 'not_found' => __( 'Not Found', 'ryan-handy' ),
  22. 'no_terms' => __( 'No Continents', 'ryan-handy' ),
  23. 'items_list' => __( 'Continents List', 'ryan-handy' ),
  24. 'items_list_navigation' => __( 'Continents Navigation', 'ryan-handy' ),
  25. );
  26. $args = array(
  27. 'labels' => $labels,
  28. 'hierarchical' => false,
  29. 'public' => true,
  30. 'show_ui' => true,
  31. 'show_admin_column' => true,
  32. 'show_in_nav_menus' => true,
  33. 'show_tagcloud' => true,
  34. );
  35. register_taxonomy( 'continents', array( 'countries' ), $args );
  36.  
  37. }
  38. add_action( 'init', 'Continents', 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement