Version Description
- Added support for autoembed urls (youtube, etc)
Download this release
Release Info
Developer | marcochiesi |
Plugin | Black Studio TinyMCE Widget |
Version | 0.9.5 |
Comparing to | |
See all releases |
Code changes from version 0.9.4 to 0.9.5
- black-studio-tinymce-widget.php +8 -3
- readme.txt +9 -1
black-studio-tinymce-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Black Studio TinyMCE Widget
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
|
5 |
Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
6 |
-
Version: 0.9.
|
7 |
Author: Black Studio
|
8 |
Author URI: http://www.blackstudio.it
|
9 |
License: GPL2
|
@@ -11,7 +11,7 @@ License: GPL2
|
|
11 |
|
12 |
global $black_studio_tinymce_widget_version;
|
13 |
global $black_studio_tinymce_widget_dev_mode;
|
14 |
-
$black_studio_tinymce_widget_version = "0.9.
|
15 |
$black_studio_tinymce_widget_dev_mode = false;
|
16 |
|
17 |
/* Widget class */
|
@@ -24,12 +24,17 @@ class WP_Widget_Black_Studio_TinyMCE extends WP_Widget {
|
|
24 |
}
|
25 |
|
26 |
function widget( $args, $instance ) {
|
|
|
|
|
|
|
|
|
|
|
27 |
extract($args);
|
28 |
$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
29 |
$text = apply_filters( 'widget_text', $instance['text'], $instance );
|
30 |
if( function_exists( 'icl_t' )) {
|
31 |
$title = icl_t( "Widgets", 'widget title - ' . md5 ( $title ), $title, $hasTranslation, true );
|
32 |
-
$text = icl_t( "Widgets", 'widget body - ' . $this->id_base . '-' . $this->number
|
33 |
}
|
34 |
$text = do_shortcode( $text );
|
35 |
echo $before_widget;
|
3 |
Plugin Name: Black Studio TinyMCE Widget
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/black-studio-tinymce-widget/
|
5 |
Description: Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
6 |
+
Version: 0.9.5
|
7 |
Author: Black Studio
|
8 |
Author URI: http://www.blackstudio.it
|
9 |
License: GPL2
|
11 |
|
12 |
global $black_studio_tinymce_widget_version;
|
13 |
global $black_studio_tinymce_widget_dev_mode;
|
14 |
+
$black_studio_tinymce_widget_version = "0.9.5"; // This is used internally - should be the same reported on the plugin header
|
15 |
$black_studio_tinymce_widget_dev_mode = false;
|
16 |
|
17 |
/* Widget class */
|
24 |
}
|
25 |
|
26 |
function widget( $args, $instance ) {
|
27 |
+
if ( get_option('embed_autourls') ) {
|
28 |
+
$wp_embed = $GLOBALS['wp_embed'];
|
29 |
+
add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
|
30 |
+
add_filter( 'widget_text', array( $wp_embed, 'autoembed' ), 8 );
|
31 |
+
}
|
32 |
extract($args);
|
33 |
$title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
|
34 |
$text = apply_filters( 'widget_text', $instance['text'], $instance );
|
35 |
if( function_exists( 'icl_t' )) {
|
36 |
$title = icl_t( "Widgets", 'widget title - ' . md5 ( $title ), $title, $hasTranslation, true );
|
37 |
+
$text = icl_t( "Widgets", 'widget body - ' . $this->id_base . '-' . $this->number, $text, $hasTranslation, true );
|
38 |
}
|
39 |
$text = do_shortcode( $text );
|
40 |
echo $before_widget;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.blackstudio.it/en/wordpress-plugins/black-studio-tinymce
|
|
4 |
Tags: wysiwyg, widget, tinymce, editor, image, media, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, image widget, media widget
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
-
Stable tag: 0.9.
|
8 |
|
9 |
Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
10 |
|
@@ -61,8 +61,16 @@ Please post a message in the [Support forum](http://wordpress.org/support/plugin
|
|
61 |
* Wordpress theme in use
|
62 |
* List of other Wordpress plugins installed
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
== Changelog ==
|
65 |
|
|
|
|
|
|
|
66 |
= 0.9.4 =
|
67 |
* Bug fixes
|
68 |
|
4 |
Tags: wysiwyg, widget, tinymce, editor, image, media, rich text, rich text editor, visual editor, wysiwyg editor, tinymce editor, widget editor, html editor, wysiwyg widget, html widget, editor widget, text widget, rich text widget, enhanced text widget, tinymce widget, visual widget, image widget, media widget
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.4
|
7 |
+
Stable tag: 0.9.5
|
8 |
|
9 |
Adds a WYSIWYG widget based on the standard TinyMCE WordPress visual editor.
|
10 |
|
61 |
* Wordpress theme in use
|
62 |
* List of other Wordpress plugins installed
|
63 |
|
64 |
+
= How to embed video and other contents =
|
65 |
+
|
66 |
+
Wordpress has a nice [autoembed feature](http://codex.wordpress.org/Embeds) that allows you to embed videos in an easy way, by just putting the URL in the content area. This is also possible for widgets created with this plugin, but for best results it is recommended to put the URL in an `[embed]` shortcode. Example: `[embed]http://www.youtube.com/watch?v=XXXXXXXXXXX[/embed]`
|
67 |
+
Alternatively, if you don't want to use `[embed]` shortcode ensure that your URL is not surrounded by a `<p>` tag, which is added automatically by the WYSIWYG editor (switch to HTML mode to remove `<p>` tags).
|
68 |
+
|
69 |
== Changelog ==
|
70 |
|
71 |
+
= 0.9.5 =
|
72 |
+
* Added support for autoembed urls (youtube, etc)
|
73 |
+
|
74 |
= 0.9.4 =
|
75 |
* Bug fixes
|
76 |
|