I noticed that when the user meta tags are enabled that it automatically tries loading all metatags for every user_load(), which happens on every page. Given that most pages don't need these metatags, it might be better to only load them when arg(0) == 'user' and $user->uid > 0, i.e. when the visitor is not anonymous. Thoughts? The code would change to the following:
function nodewords_user($op, &$edit, &$account, $category = NULL) {
global $user;
switch ($op) {
case 'load':
if (arg(0) == 'user' && $user->uid > 0 && variable_get('nodewords_enable_user_metatags', TRUE)) {
$account->nodewords = nodewords_load_tags(NODEWORDS_TYPE_USER, $account->uid);
}
break;
Comments
Comment #1
damienmckennaComment #2
damienmckennaHere's a patch that does just this.
Comment #3
damienmckennaWrong variable name. Doh.
Note this has a MINOR API change in that it will no longer allow loading of metatags for user 0, but there was no way of viewing /user/0 pages anyway, so I don't anticipate any problems.
Comment #4
damienmckennaCommitted.