esc_html( $taxonomy_singular ), 'singular_name' => esc_html( $taxonomy_plural ), 'search_items' => esc_html__( 'Search ', 'affcoupon' ) . esc_html( $taxonomy_plural ), 'all_items' => esc_html__( 'All ', 'affcoupon' ) . esc_html( $taxonomy_plural ), 'parent_item' => esc_html__( 'Parent ', 'affcoupon' ) . esc_html( $taxonomy_plural ), 'parent_item_colon' => esc_html__( 'Parent ', 'affcoupon' ) . esc_html( $taxonomy_plural ) . ':', 'edit_item' => esc_html__( 'Edit ', 'affcoupon' ) . esc_html( $taxonomy_singular ), 'update_item' => esc_html__( 'Update ', 'affcoupon' ) . esc_html( $taxonomy_plural ), 'add_new_item' => esc_html__( 'Add New ', 'affcoupon' ) . esc_html( $taxonomy_singular ), 'new_item_name' => esc_html__( 'New ', 'affcoupon' ) . esc_html( $taxonomy_singular ) . esc_html__( ' Name', 'affcoupon' ), 'menu_name' => esc_html( $taxonomy_plural ), 'popular_items' => esc_html__( 'Popular ', 'affcoupon' ) . esc_html( $taxonomy_plural ), 'separate_items_with_commas' => esc_html__( 'Separate ', 'affcoupon' ) . esc_html( $taxonomy_plural ) . esc_html__( ' with commas', 'affcoupon' ), 'add_or_remove_items' => esc_html__( 'Add or remove ', 'affcoupon' ) . esc_html( $taxonomy_singular ), 'choose_from_most_used' => esc_html__( 'Choose from the most used ', 'affcoupon' ) . esc_html( $taxonomy_plural ), ); return $labels; } /** * This function holds the arguments and * registers the custom taxonomy with WordPress. * * @param $taxonomy * @param $post_types * @param $labels * @param $slug */ public static function register_taxonomy( $taxonomy, $post_types, $labels, $slug ) { /** * Arguments for the custom taxonomy. * These will be used when we register the * custom custom taxonomy with WordPress. * * @since 1.0 */ $args = array( 'labels' => $labels, 'public' => false, 'show_in_nav_menus' => false, 'show_ui' => true, 'show_tagcloud' => false, 'show_admin_column' => true, 'hierarchical' => true, 'rewrite' => array( 'slug' => $slug, 'with_front' => true ), 'query_var' => true ); /** * Registers the taxonomy with WordPress. * * @since 1.0 */ register_taxonomy( $taxonomy, array( $post_types ), $args ); } }