$args[‘exclude’] function in class-wp-term-query.php
-
Hello everyone,
in order to make troubleshooting I am trying to understand the flow that leads to the content present into the$exclude
variable at row 469 in theclass-wp-term-query.php
file. So I hope someone here can help me to understand.As far as I see when the
get_terms()
function is called, such$args
variable is valued thanks toqery_vars
.I have understood that this is not something that comes from a database configuration but it is most likely due to a query (string?) parameter(s) received at that point, but I don’t understand why I have an exclusion a certain point of the code (like a category id = 10) which I don’t absolutely want.
For what I see, this
get_terms()
function is called byquery($query)
function which is referenced by:- taxonomy.php inside
get_terms()
function - class-wp-rest-term-search-handler.php inside
search_items()
function - class-wp-tax-query.php inside
transform_query()
function - in block-template-utils.php in another function which I’m omitting now
Now, given that, I’m using WordPress 6.1.1, User Access Manager 2.2.19 and Postie 1.9.65, with your help to understand the flow, I would like to understand why I see a category in the exclusion list. Is there any suggestion for adding some debug information?
Thanks in advance
- taxonomy.php inside
- The topic ‘$args[‘exclude’] function in class-wp-term-query.php’ is closed to new replies.