[/gmap] function sircontheme_shortcode_gmap($attrs = array(), $content = ''){ if(!$content){return '';} //Quotes can get a bit... out of hand... $weirdquotes_to_normal_quotes = array('»', '″', '”', '″'); $content = str_replace($weirdquotes_to_normal_quotes, '"', $content); $content = html_entity_decode($content); //Quotation should be somewhat normalized now. if(strpos($content, 'iframe') !== false){ //extract the src part of the iframe $src_start_str = substr($content, strpos($content, 'src=')+5); $src_end_pos = strpos($src_start_str, '" '); $src_str = substr($src_start_str, 0, $src_end_pos); //We should have what we want now! $content = $src_str; } $fullwidth = isset($attrs['fullwidth']) || in_array('fullwidth', (array)$attrs) ? ' override-max override-read-max' : ''; return '