'http://www.youtube.com/embed/4qsGTXLnmKs', 'width' => '100%', 'height' => '500', 'scrolling' => 'yes', 'class' => 'iframe-class', 'frameborder' => '0' ); foreach ( $defaults as $default => $value ) { // add defaults if ( ! @array_key_exists( $default, $atts ) ) { // mute warning with "@" when no params at all $atts[$default] = $value; } } $html = "\n".''."\n"; $html .= ' $value ) { if ( strtolower($attr) != 'same_height_as' AND strtolower($attr) != 'onload' ) { // remove some attributes if ( $value != '' ) { // adding all attributes $html .= ' ' . esc_attr( $attr ) . '="' . esc_attr( $value ) . '"'; } else { // adding empty attributes $html .= ' ' . esc_attr( $attr ); } } } $html .= '>'."\n"; if ( isset( $atts["same_height_as"] ) ) { $html .= ' '; } return $html; } add_shortcode( 'iframe', 'iframe_unqprfx_embed_shortcode' ); function iframe_unqprfx_plugin_meta( $links, $file ) { // add 'Plugin page' and 'Donate' links to plugin meta row if ( strpos( $file, 'iframe.php' ) !== false ) { $links = array_merge( $links, array( 'Iframe' ) ); $links = array_merge( $links, array( 'Donate' ) ); $links = array_merge( $links, array( 'Advanced iFrame Pro' ) ); } return $links; } add_filter( 'plugin_row_meta', 'iframe_unqprfx_plugin_meta', 10, 2 );