Skip to content

Instantly share code, notes, and snippets.

@jkudish
Created November 4, 2011 05:02
Show Gist options
  • Save jkudish/1338692 to your computer and use it in GitHub Desktop.
Save jkudish/1338692 to your computer and use it in GitHub Desktop.
THIS FILE EXPLAINS HOW TO USE THE sld_register_taxonomy() FUNCTION
<?php
// THIS FILE EXPLAINS HOW TO USE THE sld_register_taxonomy() FUNCTION FROM THE FOLLOWING WP PLUGIN: https://github.com/jkudish/sld-custom-content-and-taxonomies
/**
* sld_register_taxonomy()
* @param $taxonomy_slug the slug of the taxonomy to register
* @param $post_types, the post types that use this taxonomy
* @param $optional_singular_name, the singular name for this post type
* @param $optional_args can be passed all of the same arguments as register_taxonomy()
* @see http://codex.wordpress.org/Function_Reference/register_taxonomy
* @param $optional_plural_name, the plural name for this post type
* @author Joachim Kudish <info@jkudish.com>
*/
sld_register_taxonomy( $taxonomy_slug, $post_types, $optional_singular_name, $optional_args, $optional_plural_name );
/* =============================
NOTES:
By default the $type will be converted to have a Capital letter and used as the label,
unless overwritten by $optional_singular_name and an S will be added to it to make the
plural label, unless overwritten by $optional_plural_name
The only defaults set by this function are the labels
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment