Differentiate selected terms by slug and taxonomy#774
Differentiate selected terms by slug and taxonomy#774lvl99 wants to merge 4 commits intowp-shortcake:masterfrom
Conversation
…tiple taxonomies to select from. Additionally, I added in a way to differentiate terms by slug and taxonomy
|
I can see it being good to differentiate between term in different taxonomies with the same name, but I'm not sure about adding slugs in there. That seems like a very specialized case - in most situations, the content author shouldn't be concerned with the slugs for any terms. Also, can you update this so that the taxonomy is only shown if more than one taxonomy is being queried, similarly to how the post type is being shown on |
…een posts with same names
… term slug and also made these only visible if multiple post types or taxonomies are enabled
|
Thanks for your input @goldenapples. I modified the post_select and term_select to show relative URLs instead of slugs (what I mainly needed was to see the location of where the page is, not just the slug). I also made it show the relative URL and taxonomy type only if there are multiple post types/taxonomies configured for the field. |
I added in a way to differentiate terms by slug and taxonomy, much like the post_select has a way to differentiate by post type. I often have a number of categories with the same name (e.g. same named categories for men's and women's products on sale) so required the further differentiation.
Additionally,
wp_count_termsusesget_termsanyway, so I edited it to work better with IDEs like PHPStorm which complain aboutwp_count_termsrequiring$taxonomy_typeto be a string.