Skip to content

Instantly share code, notes, and snippets.

@oddevan
Created August 30, 2019 16:05
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 oddevan/4162cf04a25e4a05db9f0289dffd8938 to your computer and use it in GitHub Desktop.
Save oddevan/4162cf04a25e4a05db9f0289dffd8938 to your computer and use it in GitHub Desktop.
<?php
namespace oddEvan\TrainerDB\Content\Taxonomy;
use WebDevStudios\OopsWP\Structure\Content\Taxonomy;
class CardHash extends Taxonomy {
protected $slug = 'card_hash';
protected $object_types = [ 'card' ];
protected function get_labels() : array {
return [
'name' => _x( 'Hashes', 'Taxonomy General Name', 'trainerdb' ),
'singular_name' => _x( 'Hash', 'Taxonomy Singular Name', 'trainerdb' ),
// other labels go here
];
}
protected function get_args() : array {
return [
'hierarchical' => false,
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment