Widget Content Blocks - Version 2.3.5

Version Description

  • March 18, 2015 =

Fixes

  • Video URL's on their own line will now autoembed

Improvements

  • Code styling now adheres to WordPress coding standard
Download this release

Release Info

Developer DvanKooten
Plugin Icon wp plugin Widget Content Blocks
Version 2.3.5
Comparing to
See all releases

Code changes from version 2.3.4 to 2.3.5

includes/class-admin.php CHANGED
@@ -1,46 +1,49 @@
1
  <?php
2
 
3
- class WYSIWYG_Widgets_Admin
4
- {
5
 
6
- public function __construct()
7
- {
8
  //add_action('init', array($this, 'add_caps') );
9
  add_action( 'add_meta_boxes', array($this, 'add_meta_box'), 20 );
10
  }
11
 
 
 
 
12
  public function add_caps() {
13
  $caps_version = '1.1';
14
 
15
  // did we add the caps already?
16
- if( version_compare(get_option('wywi_caps_version', 0), $caps_version, '>=') ) {
 
17
  return;
18
  }
19
 
20
- $role = get_role('administrator');
21
- $role->add_cap('edit_widget_block');
22
  //update_option('wywi_caps_version', $caps_version);
23
  }
24
 
25
- public function add_meta_box()
26
- {
 
 
27
  add_meta_box(
28
- 'wysiwyg-widget-donate-box',
29
- __('More..', 'wysiwyg-widgets'),
30
- array($this, 'meta_donate_box'),
31
  'wysiwyg-widget',
32
  'side',
33
  'low'
34
  );
35
  }
36
 
37
- public function register_widget()
38
- {
39
- register_widget('WYSIWYG_Widgets_Widget');
40
- }
41
-
42
- public function meta_donate_box($post)
43
- {
44
  ?>
45
  <div>
46
  <h4><?php _e('And now?', 'wysiwyg-widgets'); ?></h4>
@@ -49,31 +52,32 @@ class WYSIWYG_Widgets_Admin
49
 
50
  <div>
51
  <h4>Donate $10, $20 or $50</h4>
52
- <p>I spent a lot of time developing this plugin and offering support for it. If you like it, consider supporting this plugin by <a href="http://dannyvankooten.com/donate/">donating a token of your appreciation</a>.</p>
53
 
54
  <p>Some other ways to support this plugin</p>
55
  <ul class="ul-square">
56
- <li><a href="http://wordpress.org/support/view/plugin-reviews/wysiwyg-widgets?rate=5#postform" target="_blank"><?php _e('Leave a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org', 'wysiwyg-widgets'); ?></a></li>
57
- <li><a href="http://twitter.com/?status=I%20use%20the%20WYSIWYG%20Widgets%20plugin%20by%20%40DannyvanKooten%20on%20my%20%23WordPress%20site%20to%20show%20beautiful%20widgets%20-%20love%20it!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Fwysiwyg-widgets%2F" target="_blank"><?php _e('Tweet about WYSIWYG Widgets', 'wysiwyg-widgets'); ?></a></li>
58
- <li><a href="http://wordpress.org/plugins/wysiwyg-widgets/#compatibility"><?php _e('Vote "works" on the WordPress.org plugin page', 'wysiwyg-widgets'); ?></a></li>
59
  </ul>
60
  </div>
61
 
62
  <div>
63
  <h4><?php _e('Other useful plugins', 'wysiwyg-widgets'); ?></h4>
64
  <ul class="ul-square">
65
- <li><a href="http://wordpress.org/plugins/mailchimp-for-wp/">MailChimp for Wordpress</a></li>
66
- <li><a href="http://wordpress.org/plugins/recent-facebook-posts/">Recent Facebook Posts</a></li>
67
- <li><a href="http://wordpress.org/plugins/scroll-triggered-boxes/">Scroll Triggered Boxes</a></li>
 
68
  </ul>
69
  </div>
70
 
71
  <div>
72
  <h4>About the developer</h4>
73
- <p>My name is <a href="http://dannyvankooten.com/">Danny van Kooten</a>. I develop WordPress plugins which help you build your websites. I love simplicity, happy customers and clean code.</p>
74
- <p>Take a look at my other <a href="http://dannyvankooten.com/wordpress-plugins/">plugins for WordPress</a> or <em>like</em> my Facebook page to stay updated.</p>
75
- <p><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FCodeToTheChase&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=false&amp;appId=225994527565061" scrolling="no" frameborder="0" style="border:none; width: 100%; overflow:hidden; height: 80px;" allowTransparency="true"></iframe></p>
76
- <p>You can also follow me on twitter <a href="http://twitter.com/dannyvankooten">here</a>.</p>
77
  </div>
78
 
79
  <?php
1
  <?php
2
 
3
+ class WYSIWYG_Widgets_Admin {
 
4
 
5
+ public function __construct() {
 
6
  //add_action('init', array($this, 'add_caps') );
7
  add_action( 'add_meta_boxes', array($this, 'add_meta_box'), 20 );
8
  }
9
 
10
+ /**
11
+ * Add Capability to edit widget block
12
+ */
13
  public function add_caps() {
14
  $caps_version = '1.1';
15
 
16
  // did we add the caps already?
17
+ $db_version = get_option( 'wywi_caps_version', 0 );
18
+ if( version_compare( $db_version, $caps_version, '>=' ) ) {
19
  return;
20
  }
21
 
22
+ $role = get_role( 'administrator' );
23
+ $role->add_cap( 'edit_widget_block' );
24
  //update_option('wywi_caps_version', $caps_version);
25
  }
26
 
27
+ /**
28
+ * Add meta box to "edit" screen
29
+ */
30
+ public function add_meta_box() {
31
  add_meta_box(
32
+ 'wysiwyg-widget-donate-box',
33
+ __( 'More..', 'wysiwyg-widgets' ),
34
+ array( $this, 'meta_donate_box' ),
35
  'wysiwyg-widget',
36
  'side',
37
  'low'
38
  );
39
  }
40
 
41
+ /**
42
+ * Render the meta box on the "edit screen"
43
+ *
44
+ * @param $post
45
+ */
46
+ public function meta_donate_box( $post ) {
 
47
  ?>
48
  <div>
49
  <h4><?php _e('And now?', 'wysiwyg-widgets'); ?></h4>
52
 
53
  <div>
54
  <h4>Donate $10, $20 or $50</h4>
55
+ <p>I spent a lot of time developing this plugin and offering support for it. If you like it, consider supporting this plugin by <a href="https://dannyvankooten.com/donate/">donating a token of your appreciation</a>.</p>
56
 
57
  <p>Some other ways to support this plugin</p>
58
  <ul class="ul-square">
59
+ <li><a href="https://wordpress.org/support/view/plugin-reviews/wysiwyg-widgets?rate=5#postform" target="_blank"><?php _e('Leave a &#9733;&#9733;&#9733;&#9733;&#9733; review on WordPress.org', 'wysiwyg-widgets'); ?></a></li>
60
+ <li><a href="https://twitter.com/?status=I%20use%20the%20WYSIWYG%20Widgets%20plugin%20by%20%40DannyvanKooten%20on%20my%20%23WordPress%20site%20to%20show%20beautiful%20widgets%20-%20love%20it!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Fwysiwyg-widgets%2F" target="_blank"><?php _e('Tweet about WYSIWYG Widgets', 'wysiwyg-widgets'); ?></a></li>
61
+ <li><a href="https://wordpress.org/plugins/wysiwyg-widgets/#compatibility"><?php _e('Vote "works" on the WordPress.org plugin page', 'wysiwyg-widgets'); ?></a></li>
62
  </ul>
63
  </div>
64
 
65
  <div>
66
  <h4><?php _e('Other useful plugins', 'wysiwyg-widgets'); ?></h4>
67
  <ul class="ul-square">
68
+ <li><a href="https://wordpress.org/plugins/mailchimp-for-wp/">MailChimp for Wordpress</a></li>
69
+ <li><a href="https://wordpress.org/plugins/mailchimp-top-bar/">MailChimp Top Bar</a></li>
70
+ <li><a href="https://wordpress.org/plugins/scroll-triggered-boxes/">Scroll Triggered Boxes</a></li>
71
+ <li><a href="https://wordpress.org/plugins/recent-facebook-posts/">Recent Facebook Posts</a></li>
72
  </ul>
73
  </div>
74
 
75
  <div>
76
  <h4>About the developer</h4>
77
+ <p>My name is <a href="https://dannyvankooten.com/">Danny van Kooten</a>. I develop WordPress plugins which help you build your websites. I love simplicity, happy customers and clean code.</p>
78
+ <p>Take a look at my other <a href="https://dannyvankooten.com/wordpress-plugins/">plugins for WordPress</a> or <em>like</em> my Facebook page to stay updated.</p>
79
+ <p><iframe src="https://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FCodeToTheChase&amp;width&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;share=false&amp;appId=225994527565061" scrolling="no" frameborder="0" style="border:none; width: 100%; overflow:hidden; height: 80px;" allowTransparency="true"></iframe></p>
80
+ <p>You can also follow me on twitter <a href="https://twitter.com/dannyvankooten">here</a>.</p>
81
  </div>
82
 
83
  <?php
includes/class-widget.php CHANGED
@@ -1,20 +1,16 @@
1
  <?php
2
 
3
- class WYSIWYG_Widgets_Widget extends WP_Widget
4
- {
 
 
 
5
  public function __construct() {
6
  parent::__construct(
7
  'wysiwyg_widgets_widget', // Base ID
8
  'Widget Blocks Widget', // Name
9
  array( 'description' => __('Displays one of your Widget Blocks.', 'wysiwyg-widgets') ) // Args
10
  );
11
-
12
- add_filter( 'ww_content', 'wptexturize') ;
13
- add_filter( 'ww_content', 'convert_smilies' );
14
- add_filter( 'ww_content', 'convert_chars' );
15
- add_filter( 'ww_content', 'wpautop' );
16
- add_filter( 'ww_content', 'shortcode_unautop' );
17
- add_filter( 'ww_content', 'do_shortcode', 11);
18
  }
19
 
20
  /**
@@ -26,46 +22,43 @@ class WYSIWYG_Widgets_Widget extends WP_Widget
26
  * @param array $instance Saved values from database.
27
  */
28
  public function widget( $args, $instance ) {
29
- extract( $args );
30
  $id = ($instance['wysiwyg-widget-id']) ? $instance['wysiwyg-widget-id'] : 0;
31
 
32
  $show_title = (isset($instance['show_title'])) ? $instance['show_title'] : 1;
33
- $post = get_post($id);
34
 
35
- echo $before_widget;
36
 
37
- if(!empty($id) && $post) {
38
 
39
- if($show_title) {
40
- // first check $instance['title'] so titles are not changes for people upgrading from an older version of the plugin
41
- // titles WILL change when they re-save their widget..
42
- $title = (isset($instance['title'])) ? $instance['title'] : $post->post_title;
43
- $title = apply_filters( 'widget_title', $title );
44
- }
45
 
46
- $content = apply_filters('ww_content', $post->post_content, $id);
47
 
48
- ?>
49
-
50
- <!-- Widget by WYSIWYG Widgets v<?php echo WYWI_VERSION_NUMBER ?> - http://wordpress.org/plugins/wysiwyg-widgets/ -->
51
- <?php if($show_title) { echo $before_title . $title . $after_title; } ?>
52
- <?php echo $content; ?>
53
- <!-- / WYSIWYG Widgets -->
 
54
 
55
- <?php
 
56
 
57
- } elseif(current_user_can('manage_options')) { ?>
58
  <p>
59
- <?php if(empty($id)) {
60
- _e('Please select a Widget Block to show in this area.', 'wysiwyg-widgets');
61
  } else {
62
- printf(__('No widget block found with ID %d, please select an existing Widget Block in the widget settings.', 'wysiwyg-widgets'), $id);
63
  } ?>
64
  </p>
65
  <?php
66
  }
67
 
68
- echo $after_widget;
69
 
70
  }
71
 
@@ -82,7 +75,7 @@ class WYSIWYG_Widgets_Widget extends WP_Widget
82
  public function update( $new_instance, $old_instance ) {
83
  $instance = array();
84
  $instance['wysiwyg-widget-id'] = $new_instance['wysiwyg-widget-id'];
85
- $instance['show_title'] = (isset($new_instance['show_title']) && $new_instance['show_title'] == 1) ? 1 : 0;
86
  return $instance;
87
  }
88
 
@@ -100,9 +93,9 @@ class WYSIWYG_Widgets_Widget extends WP_Widget
100
  'numberposts' => -1
101
  ));
102
 
103
- $show_title = (isset($instance['show_title'])) ? $instance['show_title'] : 1;
104
- $selected_widget_id = (isset($instance['wysiwyg-widget-id'])) ? $instance['wysiwyg-widget-id'] : 0;
105
- $title = ($selected_widget_id) ? get_the_title($selected_widget_id) : 'No widget block selected.';
106
  ?>
107
 
108
  <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="hidden" value="<?php echo esc_attr( $title ); ?>" />
@@ -110,18 +103,24 @@ class WYSIWYG_Widgets_Widget extends WP_Widget
110
  <p>
111
  <label for="<?php echo $this->get_field_id( 'wysiwyg-widget-id' ); ?>"><?php _e( 'Widget Block to show:', 'wysiwyg-widgets' ); ?></label>
112
  <select class="widefat" id="<?php echo $this->get_field_id('wysiwyg-widget-id'); ?>" name="<?php echo $this->get_field_name( 'wysiwyg-widget-id' ); ?>" required>
113
- <option value="0" disabled <?php selected($selected_widget_id, 0); ?>><?php if(empty($posts)) { _e('No widget blocks found', 'wysiwyg-widgets'); } else { _e('Select a widget block', 'wysiwyg-widgets'); } ?></option>
114
- <?php foreach($posts as $p) { ?>
115
- <option value="<?php echo $p->ID; ?>" <?php selected($selected_widget_id, $p->ID); ?>><?php echo $p->post_title; ?></option>
 
 
 
 
 
 
116
  <?php } ?>
117
  </select>
118
  </p>
119
 
120
  <p>
121
- <label><input type="checkbox" id="<?php echo $this->get_field_id('show_title'); ?>" name="<?php echo $this->get_field_name('show_title'); ?>" value="1" <?php checked($show_title, 1); ?> /> <?php _e("Show title?", "wysiwyg-widgets"); ?></label>
122
  </p>
123
 
124
- <p class="help"><?php printf(__('Manage your widget blocks %shere%s', 'wysiwyg-widgets'), '<a href="'. admin_url('edit.php?post_type=wysiwyg-widget') .'">', '</a>'); ?></p>
125
  <?php
126
  }
127
 
1
  <?php
2
 
3
+ class WYSIWYG_Widgets_Widget extends WP_Widget {
4
+
5
+ /**
6
+ * Constructor
7
+ */
8
  public function __construct() {
9
  parent::__construct(
10
  'wysiwyg_widgets_widget', // Base ID
11
  'Widget Blocks Widget', // Name
12
  array( 'description' => __('Displays one of your Widget Blocks.', 'wysiwyg-widgets') ) // Args
13
  );
 
 
 
 
 
 
 
14
  }
15
 
16
  /**
22
  * @param array $instance Saved values from database.
23
  */
24
  public function widget( $args, $instance ) {
 
25
  $id = ($instance['wysiwyg-widget-id']) ? $instance['wysiwyg-widget-id'] : 0;
26
 
27
  $show_title = (isset($instance['show_title'])) ? $instance['show_title'] : 1;
28
+ $post = get_post( $id );
29
 
30
+ echo $args['before_widget'];
31
 
32
+ if( ! empty( $id ) && $post ) {
33
 
34
+ // Allow filtering of content
35
+ $content = apply_filters( 'ww_content', $post->post_content, $id );
 
 
 
 
36
 
37
+ printf( '<!-- Widget by WYSIWYG Widgets v%s - https://wordpress.org/plugins/wysiwyg-widgets/ -->', WYWI_VERSION_NUMBER );
38
 
39
+ if( $show_title ) {
40
+ // first check $instance['title'] so titles are not changed for people upgrading from an older version of the plugin
41
+ // titles WILL change when they re-save their widget..
42
+ $title = ( isset( $instance['title'] ) ) ? $instance['title'] : $post->post_title;
43
+ $title = apply_filters( 'widget_title', $title );
44
+ echo $args['before_title'] . $title . $args['after_title'];
45
+ }
46
 
47
+ echo $content;
48
+ echo '<!-- / WYSIWYG Widgets -->';
49
 
50
+ } elseif( current_user_can( 'manage_options' ) ) { ?>
51
  <p>
52
+ <?php if( empty( $id ) ) {
53
+ _e( 'Please select a Widget Block to show in this area.', 'wysiwyg-widgets' );
54
  } else {
55
+ printf( __( 'No widget block found with ID %d, please select an existing Widget Block in the widget settings.', 'wysiwyg-widgets' ), $id );
56
  } ?>
57
  </p>
58
  <?php
59
  }
60
 
61
+ echo $args['after_widget'];
62
 
63
  }
64
 
75
  public function update( $new_instance, $old_instance ) {
76
  $instance = array();
77
  $instance['wysiwyg-widget-id'] = $new_instance['wysiwyg-widget-id'];
78
+ $instance['show_title'] = ( isset($new_instance['show_title'] ) && $new_instance['show_title'] == 1 ) ? 1 : 0;
79
  return $instance;
80
  }
81
 
93
  'numberposts' => -1
94
  ));
95
 
96
+ $show_title = ( isset( $instance['show_title'] ) ) ? $instance['show_title'] : 1;
97
+ $selected_widget_id = ( isset( $instance['wysiwyg-widget-id'] ) ) ? $instance['wysiwyg-widget-id'] : 0;
98
+ $title = ($selected_widget_id) ? get_the_title( $selected_widget_id ) : 'No widget block selected.';
99
  ?>
100
 
101
  <input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="hidden" value="<?php echo esc_attr( $title ); ?>" />
103
  <p>
104
  <label for="<?php echo $this->get_field_id( 'wysiwyg-widget-id' ); ?>"><?php _e( 'Widget Block to show:', 'wysiwyg-widgets' ); ?></label>
105
  <select class="widefat" id="<?php echo $this->get_field_id('wysiwyg-widget-id'); ?>" name="<?php echo $this->get_field_name( 'wysiwyg-widget-id' ); ?>" required>
106
+ <option value="0" disabled <?php selected( $selected_widget_id, 0 ); ?>>
107
+ <?php if( empty( $posts ) ) {
108
+ _e( 'No widget blocks found', 'wysiwyg-widgets' );
109
+ } else {
110
+ _e( 'Select a widget block', 'wysiwyg-widgets' );
111
+ } ?>
112
+ </option>
113
+ <?php foreach( $posts as $p ) { ?>
114
+ <option value="<?php echo $p->ID; ?>" <?php selected( $selected_widget_id, $p->ID ); ?>><?php echo $p->post_title; ?></option>
115
  <?php } ?>
116
  </select>
117
  </p>
118
 
119
  <p>
120
+ <label><input type="checkbox" id="<?php echo $this->get_field_id( 'show_title' ); ?>" name="<?php echo $this->get_field_name( 'show_title' ); ?>" value="1" <?php checked( $show_title, 1 ); ?> /> <?php _e( "Show title?", "wysiwyg-widgets" ); ?></label>
121
  </p>
122
 
123
+ <p class="help"><?php printf( __( 'Manage your widget blocks %shere%s', 'wysiwyg-widgets' ), '<a href="'. admin_url( 'edit.php?post_type=wysiwyg-widget' ) .'">', '</a>' ); ?></p>
124
  <?php
125
  }
126
 
includes/plugin.php CHANGED
@@ -1,12 +1,16 @@
1
  <?php
2
-
 
 
3
  function wywi_load_textdomain() {
4
  load_plugin_textdomain( 'wysiwyg-widgets', false, 'wysiwyg-widgets/languages/' );
5
  }
6
 
7
  add_action('plugins_loaded', 'wywi_load_textdomain');
8
 
9
-
 
 
10
  function wywi_register_widget() {
11
  require_once WYWI_PLUGIN_DIR . 'includes/class-widget.php';
12
  register_widget('WYSIWYG_Widgets_Widget');
@@ -14,6 +18,9 @@ function wywi_register_widget() {
14
 
15
  add_action( 'widgets_init', 'wywi_register_widget');
16
 
 
 
 
17
  function wywi_register_post_type() {
18
  $labels = array(
19
  'name' => __('Widget Blocks', 'wysiwyg-widgets'),
@@ -40,3 +47,13 @@ function wywi_register_post_type() {
40
  }
41
 
42
  add_action('init', 'wywi_register_post_type');
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ /**
3
+ * Load the plugin textdomain
4
+ */
5
  function wywi_load_textdomain() {
6
  load_plugin_textdomain( 'wysiwyg-widgets', false, 'wysiwyg-widgets/languages/' );
7
  }
8
 
9
  add_action('plugins_loaded', 'wywi_load_textdomain');
10
 
11
+ /**
12
+ * Register the Widget class
13
+ */
14
  function wywi_register_widget() {
15
  require_once WYWI_PLUGIN_DIR . 'includes/class-widget.php';
16
  register_widget('WYSIWYG_Widgets_Widget');
18
 
19
  add_action( 'widgets_init', 'wywi_register_widget');
20
 
21
+ /**
22
+ * Register the post type used for the widget blocks
23
+ */
24
  function wywi_register_post_type() {
25
  $labels = array(
26
  'name' => __('Widget Blocks', 'wysiwyg-widgets'),
47
  }
48
 
49
  add_action('init', 'wywi_register_post_type');
50
+
51
+ // add necessary content filters
52
+ add_filter( 'ww_content', 'wptexturize') ;
53
+ add_filter( 'ww_content', 'convert_smilies' );
54
+ add_filter( 'ww_content', 'convert_chars' );
55
+ add_filter( 'ww_content', 'wpautop' );
56
+ add_filter( 'ww_content', 'shortcode_unautop' );
57
+ add_filter( 'ww_content', 'do_shortcode', 11);
58
+ add_filter( 'ww_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
59
+ add_filter( 'ww_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 );
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
  Contributors: DvanKooten
3
- Donate link: http://dannyvankooten.com/donate/
4
- Tags: visual,tinymce,fckeditor,widget,widgets,rich text,wysiwyg,image widget,visual editor,html
5
- Requires at least: 3.1
6
- Tested up to: 3.8
7
- Stable tag: 2.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,7 +29,7 @@ You can create or edit the widget blocks just like you would edit any post or pa
29
 
30
  **Translators**
31
 
32
- - Dutch (nl_NL) - [Danny van Kooten](http://dannyvankooten.com/)
33
  - Spanish (es_ES) - [Maria Ramos - WebHostingHub](http://webhostinghub.com/)
34
  - Italian (it_IT) - [Tiziano D'Angelo - Studio D'Angelo](http://www.dangelos.it/)
35
  - Looking for more.. :)
@@ -38,10 +38,10 @@ If you have created your own language pack, or have an update of an existing one
38
 
39
  **More information**
40
 
41
- - [WYSIWYG Widgets](http://dannyvankooten.com/wordpress-plugins/wysiwyg-widgets/)
42
- - Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/) by the same author
43
- - You should follow [@DannyvanKooten](http://twitter.com/dannyvankooten) on Twitter.
44
- - [Thank Danny for this plugin by donating $10, $20 or $50.](http://dannyvankooten.com/donate/)
45
 
46
  == Installation ==
47
 
@@ -79,6 +79,16 @@ Yes, totally. Donations are appreciated though!
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
 
 
 
 
 
82
  = 2.3.4 - December 20, 2013 =
83
  * Fixed: Paragraphs inside or after shortcodes
84
  * Improved: Changed widget name for more consistency
@@ -141,7 +151,7 @@ Yes, totally. Donations are appreciated though!
141
  * Total rewrite WITHOUT backwards compatibility. Please back-up your existing WYSIWYG Widgets' content before updating, you'll need to recreate them. Don't drag them to "deactivated widgets", just copy & paste the HTML content somewhere.
142
 
143
  = 1.2 =
144
- * Updated the plugin for WP 3.3. Broke backwards compatibility (on purpose), so when running WP 3.2.x and below: stick with [version 1.1.1](http://downloads.wordpress.org/plugin/wysiwyg-widgets.zip).
145
 
146
  = 1.1.2 =
147
  * Temporary fix for WP 3.3+
1
  === Plugin Name ===
2
  Contributors: DvanKooten
3
+ Donate link: https://dannyvankooten.com/donate/
4
+ Tags: widget,visual editor,image widget,visual,tinymce,fckeditor,widgets,rich text,wysiwyg,html
5
+ Requires at least: 3.7
6
+ Tested up to: 4.2
7
+ Stable tag: 2.3.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
 
30
  **Translators**
31
 
32
+ - Dutch (nl_NL) - [Danny van Kooten](https://dannyvankooten.com/)
33
  - Spanish (es_ES) - [Maria Ramos - WebHostingHub](http://webhostinghub.com/)
34
  - Italian (it_IT) - [Tiziano D'Angelo - Studio D'Angelo](http://www.dangelos.it/)
35
  - Looking for more.. :)
38
 
39
  **More information**
40
 
41
+ - [WYSIWYG Widgets](https://dannyvankooten.com/wordpress-plugins/wysiwyg-widgets/)
42
+ - Check out more [WordPress plugins](https://dannyvankooten.com/wordpress-plugins/) by the same author
43
+ - You should follow [@DannyvanKooten](https://twitter.com/dannyvankooten) on Twitter.
44
+ - [Thank Danny for this plugin by donating $10, $20 or $50.](https://dannyvankooten.com/donate/)
45
 
46
  == Installation ==
47
 
79
 
80
  == Changelog ==
81
 
82
+ = 2.3.5 - March 18, 2015 =
83
+
84
+ **Fixes**
85
+
86
+ - Video URL's on their own line will now autoembed
87
+
88
+ **Improvements**
89
+
90
+ - Code styling now adheres to WordPress coding standard
91
+
92
  = 2.3.4 - December 20, 2013 =
93
  * Fixed: Paragraphs inside or after shortcodes
94
  * Improved: Changed widget name for more consistency
151
  * Total rewrite WITHOUT backwards compatibility. Please back-up your existing WYSIWYG Widgets' content before updating, you'll need to recreate them. Don't drag them to "deactivated widgets", just copy & paste the HTML content somewhere.
152
 
153
  = 1.2 =
154
+ * Updated the plugin for WP 3.3. Broke backwards compatibility (on purpose), so when running WP 3.2.x and below: stick with [version 1.1.1](https://downloads.wordpress.org/plugin/wysiwyg-widgets.zip).
155
 
156
  = 1.1.2 =
157
  * Temporary fix for WP 3.3+
wysiwyg-widgets.php CHANGED
@@ -1,18 +1,18 @@
1
  <?php
2
  /*
3
  Plugin Name: WYSIWYG Widgets / Widget Blocks
4
- Plugin URI: http://DannyvanKooten.com/wordpress-plugins/wysiwyg-widgets/
5
  Description: Adds a WYSIWYG Widget with a rich text editor and media upload functions.
6
- Version: 2.3.4
7
  Author: Danny van Kooten
8
- Author URI: http://DannyvanKooten.com
9
  Text Domain: wysiwyg-widgets
10
  Domain Path: /languages/
11
  License: GPL v3 or later
12
 
13
  WYSIWYG Widgets plugin
14
 
15
- Copyright (C) 2013, Danny van Kooten, hi@dannyvankooten.com
16
 
17
  This program is free software: you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License as published by
@@ -30,13 +30,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30
 
31
  if ( ! defined( 'ABSPATH' ) ) exit;
32
 
33
- define("WYWI_VERSION_NUMBER", "2.3.4");
34
- define("WYWI_PLUGIN_DIR", plugin_dir_path(__FILE__));
35
 
36
  require_once WYWI_PLUGIN_DIR . 'includes/plugin.php';
37
 
38
  // only load admin class for non-ajax requests to the admin section
39
- if(is_admin() && (!defined("DOING_AJAX") || !DOING_AJAX)) {
40
  require_once WYWI_PLUGIN_DIR . 'includes/class-admin.php';
41
  new WYSIWYG_Widgets_Admin();
42
  }
1
  <?php
2
  /*
3
  Plugin Name: WYSIWYG Widgets / Widget Blocks
4
+ Plugin URI: https://DannyvanKooten.com/wordpress-plugins/wysiwyg-widgets/
5
  Description: Adds a WYSIWYG Widget with a rich text editor and media upload functions.
6
+ Version: 2.3.5
7
  Author: Danny van Kooten
8
+ Author URI: http://dvk.co/
9
  Text Domain: wysiwyg-widgets
10
  Domain Path: /languages/
11
  License: GPL v3 or later
12
 
13
  WYSIWYG Widgets plugin
14
 
15
+ Copyright (C) 2013-2015, Danny van Kooten, hi@dannyvankooten.com
16
 
17
  This program is free software: you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License as published by
30
 
31
  if ( ! defined( 'ABSPATH' ) ) exit;
32
 
33
+ define( 'WYWI_VERSION_NUMBER', "2.3.5" );
34
+ define( 'WYWI_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
35
 
36
  require_once WYWI_PLUGIN_DIR . 'includes/plugin.php';
37
 
38
  // only load admin class for non-ajax requests to the admin section
39
+ if( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
40
  require_once WYWI_PLUGIN_DIR . 'includes/class-admin.php';
41
  new WYSIWYG_Widgets_Admin();
42
  }