Skip to content

Remove the term_taxonomy_id from the term array. - #24

Closed
xiffy wants to merge 1 commit into
WebDevStudios:masterfrom
xiffy:exclude-term-taxonomy
Closed

Remove the term_taxonomy_id from the term array. #24
xiffy wants to merge 1 commit into
WebDevStudios:masterfrom
xiffy:exclude-term-taxonomy

Conversation

@xiffy

@xiffy xiffy commented Oct 14, 2017

Copy link
Copy Markdown

The existence of this id can interfere with the selected function.
terms:

id name
10 so so
11 the best

taxonomy:

id name
1 qualification

term_taxonomy:

id taxonomy_id term_id
11 1 10
12 1 11

suppose a post has term 10 attached from taxonomy 1, the $default array now holds
term_id => 10, name => "so so", slug => "so-so", term_group => 0, term_taxonomy_id => 11, ...
the function selected checks whether the current term_id is in the array presented above, which is both treu for term 10 and 11.

…s number can interfere with the _selected_ function.

data:
terms
id name
10 so so,
11 the best
taxonomy
1 judgements
term_taxonomy
id taxonomy_id term_id
11 1            10
12 1            11
suppose a post has term 10 attached from taxonomy 1, the $default array now holds
term_id => 10, name => "so so", slug => "so-so", term_group => 0, term_taxonomy_id => 11, ...
the function selected checks whether the current term_id is in the array presented above, which is both treu for term 10 and 11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant