Added a filter to fronthooks so that the theme can apply_filter to
get a given attribute. This was done so Brewbakers could get the
Year of a certain member.
//$query .= " AND T.member IN (SELECT id from " . GLM_MEMBERS_PLUGIN_DB_PREFIX. "members WHERE member_type = 2 ) ";
return $query;
});
+add_filter('glm_custom_fields', function($attribute, $id) {
+
+ global $wpdb;
+ $query = "SELECT field_data FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_data WHERE ref_dest = $id "
+ . "AND field_id IN (SELECT id FROM ".GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX."custom_fields WHERE field_name LIKE '$attribute' )";
+ $result = $wpdb->get_var( $query );
+ return $result;
+ },
+ 10,
+ 2
+);
\ No newline at end of file
$('.slash-price').prev().children('.msrp-value').addClass('sale');
$('.red-hot').parentsUntil('.glm-member-list-record').addClass('red-hot-border');
-
});
</script>