$staff_bio
", $staff_website_link); $current_staff_markup = str_replace($accepted_single_tags, $replace_single_values, $loop_markup); $current_staff_markup = str_replace($accepted_formatted_tags, $replace_formatted_values, $current_staff_markup); preg_match_all("/\[(.*?)\]/", $current_staff_markup, $other_matches); $staff_meta_fields = get_option('staff_meta_fields'); if($staff_meta_fields != '' && count($other_matches[0]) > 0) { foreach($other_matches[0] as $match) { foreach($staff_meta_fields as $field) { $meta_key = $field['slug']; $shortcode_without_brackets = substr($match, 1, strlen($match) - 2); if($meta_key == $shortcode_without_brackets) { $meta_value = get_post_meta(get_the_ID(), $meta_key, true); $current_staff_markup = str_replace($match, $meta_value, $current_staff_markup); } } } } $output .= $current_staff_markup; } if(isset($after_loop_markup)) { $output .= $after_loop_markup; } return $output; } }