To fix this, change
Code:
// Callback function for post meta replacement^M function meta_values($matches) { $meta_key = $matches[1]; // "get_post_custom_values" returns an array. Turn it into a string, separated by commata $meta_values = implode(", ", get_post_custom_values($meta_key)); return $meta_values; }
Code:
// Callback function for post meta replacement^M function meta_values($matches) { $meta_key = $matches[1]; // "get_post_custom_values" returns an array. Turn it into a string, separated by commata if (get_post_custom_values($meta_key)) { $meta_values = implode(", ", get_post_custom_values($meta_key)); } else { $meta_values = ""; } return $meta_values; }