In nodewords_load_tags() it checks to see if the $tags array is empty - if it is empty and the $type is a term it checks to see if there are any metatags assigned for the vocabulary. To get the vocabulary vid it runs db_result(db_query()). Most of the time this code executes and tries to load the vocabulary's data it will be on a term page, which has already loaded the term via taxonomy_get_term() and which then means it is cached. As a result, there should not be any extra queries executed and it should just get the vocabulary vid from taxonomy_get_term().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodewords-n1200402-2.patch | 682 bytes | damienmckenna |
| #1 | nodewords-n1200402.patch | 1.13 KB | damienmckenna |
Comments
Comment #1
damienmckennaPatch included that uses taxonomy_get_term() to get the full $term object so then $term-vid is available.
Comment #2
damienmckennaRe-rolled.
Comment #3
damienmckennaCommitted.