| @@ -1,15 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /* |
| 3 | 3 | Plugin Name: iframe |
| 4 | -Plugin URI: http://web-profile.com.ua/wordpress/plugins/iframe/ | |
| 4 | +Plugin URI: http://wordpress.org/extend/plugins/iframe/ | |
| 5 | 5 | Description: [iframe src="http://player.vimeo.com/video/819138" width="100%" height="480"] shortcode |
| 6 | -Version: 2.3 | |
| 6 | +Version: 2.4 | |
| 7 | 7 | Author: webvitaly |
| 8 | -Author URI: http://web-profile.com.ua/wordpress/ | |
| 8 | +Author URI: http://profiles.wordpress.org/webvitaly/ | |
| 9 | 9 | License: GPLv2 or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | + | |
| 12 | 13 | if ( !function_exists( 'iframe_embed_shortcode' ) ) : |
| 13 | 14 | |
| 14 | 15 | function iframe_enqueue_script() { |
| 15 | 16 | wp_enqueue_script( 'jquery' ); |
| @@ -72,9 +73,9 @@ | ||
| 72 | 73 | </script> |
| 73 | 74 | '; |
| 74 | 75 | } |
| 75 | 76 | } |
| 76 | - $html .= "\n".'<!-- iframe plugin v:2.3 - wordpress.org/extend/plugins/iframe/ -->'."\n"; | |
| 77 | + $html .= "\n".'<!-- iframe plugin v.2.4 wordpress.org/extend/plugins/iframe/ -->'."\n"; | |
| 77 | 78 | $html .= '<iframe'; |
| 78 | 79 | foreach ($atts as $attr => $value) { |
| 79 | 80 | if( $attr != 'same_height_as' ){ // remove some attributes |
| 80 | 81 | if( $value != '' ) { // adding all attributes |
| @@ -89,4 +90,14 @@ | ||
| 89 | 90 | } |
| 90 | 91 | add_shortcode('iframe', 'iframe_embed_shortcode'); |
| 91 | 92 | |
| 92 | 93 | endif; |
| 94 | + | |
| 95 | + | |
| 96 | +function iframe_unqprfx_plugin_meta( $links, $file ) { // add 'Support' and 'Donate' links to plugin meta row | |
| 97 | + if ( strpos( $file, 'iframe.php' ) !== false ) { | |
| 98 | + $links = array_merge( $links, array( '<a href="http://web-profile.com.ua/wordpress/plugins/iframe/" title="Need help?">' . __('Support') . '</a>' ) ); | |
| 99 | + $links = array_merge( $links, array( '<a href="http://web-profile.com.ua/donate/" title="Support the development">' . __('Donate') . '</a>' ) ); | |
| 100 | + } | |
| 101 | + return $links; | |
| 102 | +} | |
| 103 | +add_filter( 'plugin_row_meta', 'iframe_unqprfx_plugin_meta', 10, 2 ); | |