jquery media js loads on all content types
awolfey - July 3, 2009 - 17:56
| Project: | jQuery Media |
| Version: | 6.x-1.4-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Description
Hi,
I think we need to do a strict search in in_array() like below. Otherwise the js loads on all content types.
/**
* Invoke the plugin if we support it for this node type.
*/
function jquery_media_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
if ($op == 'view') {
if (in_array($node->type, variable_get('jquery_media_node_types', array()), TRUE)) {
jquery_media_add();
}
}
}