Skip to content

Instantly share code, notes, and snippets.

@onishiweb
Created February 22, 2014 10:56
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 onishiweb/9151992 to your computer and use it in GitHub Desktop.
Save onishiweb/9151992 to your computer and use it in GitHub Desktop.
/**
* Post type class function
* @author Adam Onishi <aonishi@wearearchitect.com>
*/
function dig_get_post_type_class( $type = false ) {
if( ! $type ) {
$type = dig_current_post_type();
}
$class = str_replace('dig_', '', $type);
$class = str_replace('_', '-', $class);
return $class;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment