'100%', 'height' => '480', 'src' => '', 'frameborder' => '0', 'scrolling' => 'no', 'marginheight' => '0', 'marginwidth' => '0', 'allowtransparency' => 'true', 'id' => '', 'class' => 'iframe-class', 'same_height_as' => '' ), $atts)); $src_cut = substr($src, 0, 35); if(strpos($src_cut, 'maps.google' )){ $google_map_fix = '&output=embed'; }else{ $google_map_fix = ''; } $return = ''; if( $same_height_as != '' ){ if( $same_height_as != 'content' ){ // we are setting the height of the iframe like as target element if( $same_height_as == 'document' || $same_height_as == 'window' ){ // remove quotes for window or document selectors $target_selector = $same_height_as; }else{ $target_selector = '"'.$same_height_as.'"'; } $return .= ' '; }else{ // set the actual height of the iframe (show all content of the iframe without scroll) $return .= ' '; } } if( $id != '' ){ $id_text = 'id="'.$id.'" '; }else{ $id_text = ''; } $return .= "\n".''."\n"; $return .= ''; // &output=embed return $return; } add_shortcode('iframe', 'iframe_embed_shortcode'); endif;