Version Description
- October 21, 2013 =
- Moved menu item back to its own menu item
- Widget title now defaults to the title of the selected Widget Block
- Some textual improvements
Download this release
Release Info
Developer | DvanKooten |
Plugin | Widget Content Blocks |
Version | 2.2.4 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.2.4
- includes/WYSIWYG_Widgets.php +89 -0
- includes/WYSIWYG_Widgets_Widget.php +113 -0
- includes/class-wysiwyg-widgets-widget.php +0 -112
- includes/class-wysiwyg-widgets.php +0 -66
- readme.txt +44 -23
- screenshot-1.jpg +0 -0
- screenshot-2.jpg +0 -0
- screenshot-3.jpg +0 -0
- wysiwyg-widgets.php +7 -5
includes/WYSIWYG_Widgets.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WYSIWYG_Widgets
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
add_action('init', array($this, 'on_init_action'));
|
9 |
+
add_action( 'widgets_init', array($this, 'register_widget'));
|
10 |
+
add_action( 'add_meta_boxes', array($this, 'add_meta_box'), 20 );
|
11 |
+
}
|
12 |
+
|
13 |
+
public function on_init_action()
|
14 |
+
{
|
15 |
+
$labels = array(
|
16 |
+
'name' => 'Widget Blocks',
|
17 |
+
'singular_name' => 'Widget Block',
|
18 |
+
'add_new' => 'Add New',
|
19 |
+
'add_new_item' => 'Add New Widget Block',
|
20 |
+
'edit_item' => 'Edit Widget Block',
|
21 |
+
'new_item' => 'New Widget Block',
|
22 |
+
'all_items' => 'Widget Blocks',
|
23 |
+
'view_item' => 'View Widget Block',
|
24 |
+
'search_items' => 'Search Widget Blocks',
|
25 |
+
'not_found' => 'No widget blocks found',
|
26 |
+
'not_found_in_trash' => 'No widget blocks found in Trash',
|
27 |
+
'parent_item_colon' => '',
|
28 |
+
'menu_name' => 'Widget Blocks'
|
29 |
+
);
|
30 |
+
$args = array(
|
31 |
+
'public' => true,
|
32 |
+
'publicly_queryable' => false,
|
33 |
+
'show_in_nav_menus' => false,
|
34 |
+
'exclude_from_search' => true,
|
35 |
+
'labels' => $labels,
|
36 |
+
'has_archive' => false,
|
37 |
+
'supports' => array('title', 'editor'),
|
38 |
+
'rewrite' => false,
|
39 |
+
'map_meta_cap' => true
|
40 |
+
);
|
41 |
+
|
42 |
+
register_post_type( 'wysiwyg-widget', $args );
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
public function add_meta_box()
|
47 |
+
{
|
48 |
+
add_meta_box(
|
49 |
+
'wysiwyg-widget-donate-box',
|
50 |
+
'More..',
|
51 |
+
array($this, 'meta_donate_box'),
|
52 |
+
'wysiwyg-widget',
|
53 |
+
'side',
|
54 |
+
'low'
|
55 |
+
);
|
56 |
+
remove_meta_box('wpseo_meta', 'wysiwyg-widget', 'normal');
|
57 |
+
}
|
58 |
+
|
59 |
+
public function register_widget()
|
60 |
+
{
|
61 |
+
register_widget('WYSIWYG_Widgets_Widget');
|
62 |
+
}
|
63 |
+
|
64 |
+
public function meta_donate_box($post)
|
65 |
+
{
|
66 |
+
?>
|
67 |
+
<div style=" background: #222; color:#eee; padding:20px; ">
|
68 |
+
<h4 style="margin-top:0;">Donate a token of your appreciation</h4>
|
69 |
+
<p>I spent many hours developing and supporting this plugin.</p>
|
70 |
+
<p>If you like it, consider <a href="http://dannyvankooten.com/donate/">donating $10, $20 or $50</a> as a token of your appreciation.</p>
|
71 |
+
</div>
|
72 |
+
<div>
|
73 |
+
<h4>Other ways to show your appreciation</h4>
|
74 |
+
<ul class="ul-square">
|
75 |
+
<li><a href="http://wordpress.org/support/view/plugin-reviews/wysiwyg-widgets?rate=5#postform" target="_blank">Leave a ★★★★★ review on WordPress.org</a></li>
|
76 |
+
<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">Tweet about WYSIWYG Widgets</a></li>
|
77 |
+
<li><a href="http://wordpress.org/plugins/wysiwyg-widgets/#compatibility">Vote "works" on the WordPress.org plugin page</a></li>
|
78 |
+
</ul>
|
79 |
+
</div>
|
80 |
+
<div>
|
81 |
+
<h4>Other useful plugins</h4>
|
82 |
+
<ul class="ul-square">
|
83 |
+
<li><a href="http://wordpress.org/plugins/mailchimp-for-wp/">MailChimp for Wordpress</a></li>
|
84 |
+
<li><a href="http://wordpress.org/plugins/recent-facebook-posts/">Recent Facebook Posts</a></li>
|
85 |
+
</ul>
|
86 |
+
</div>
|
87 |
+
<?php
|
88 |
+
}
|
89 |
+
}
|
includes/WYSIWYG_Widgets_Widget.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
'WYSIWYG Widget', // Name
|
9 |
+
array( 'description' => 'Displays one of your Widget Blocks.' ) // Args
|
10 |
+
);
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Front-end display of widget.
|
15 |
+
*
|
16 |
+
* @see WP_Widget::widget()
|
17 |
+
*
|
18 |
+
* @param array $args Widget arguments.
|
19 |
+
* @param array $instance Saved values from database.
|
20 |
+
*/
|
21 |
+
public function widget( $args, $instance ) {
|
22 |
+
extract( $args );
|
23 |
+
$id = $instance['wysiwyg-widget-id'];
|
24 |
+
|
25 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
26 |
+
$post = get_post($id);
|
27 |
+
|
28 |
+
echo $before_widget;
|
29 |
+
|
30 |
+
if(!empty($title)) { echo $before_title . $title . $after_title; }
|
31 |
+
|
32 |
+
if($post && !empty($id)) {
|
33 |
+
$content = $post->post_content;
|
34 |
+
$content = do_shortcode($content);
|
35 |
+
$content = "\n<!-- Widget by WYSIWYG Widgets v". WYWI_VERSION_NUMBER ." - http://wordpress.org/plugins/wysiwyg-widgets/ -->\n" . wpautop($content) . "\n<!-- / WYSIWYG Widgets -->\n";
|
36 |
+
echo $content;
|
37 |
+
} elseif(current_user_can('manage_options')) { ?>
|
38 |
+
<p>
|
39 |
+
<?php if(empty($id)) { ?>
|
40 |
+
Please select a widget block to show in this area.
|
41 |
+
<?php } else { ?>
|
42 |
+
No widget block found with ID <?php echo $id; ?>, please select an existing widget block in the widget settings.
|
43 |
+
<?php } ?>
|
44 |
+
</p>
|
45 |
+
<?php
|
46 |
+
}
|
47 |
+
|
48 |
+
echo $after_widget;
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Sanitize widget form values as they are saved.
|
54 |
+
*
|
55 |
+
* @see WP_Widget::update()
|
56 |
+
*
|
57 |
+
* @param array $new_instance Values just sent to be saved.
|
58 |
+
* @param array $old_instance Previously saved values from database.
|
59 |
+
*
|
60 |
+
* @return array Updated safe values to be saved.
|
61 |
+
*/
|
62 |
+
public function update( $new_instance, $old_instance ) {
|
63 |
+
$instance = array();
|
64 |
+
$instance['wysiwyg-widget-id'] = $new_instance['wysiwyg-widget-id'];
|
65 |
+
$instance['title'] = strip_tags($new_instance['title']);
|
66 |
+
|
67 |
+
// grab title from widget block
|
68 |
+
if($instance['wysiwyg-widget-id']) {
|
69 |
+
$post = get_post($instance['wysiwyg-widget-id']);
|
70 |
+
|
71 |
+
if($post) {
|
72 |
+
$instance['title'] = $post->post_title;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
return $instance;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Back-end widget form.
|
81 |
+
*
|
82 |
+
* @see WP_Widget::form()
|
83 |
+
*
|
84 |
+
* @param array $instance Previously saved values from database.
|
85 |
+
*/
|
86 |
+
public function form( $instance ) {
|
87 |
+
|
88 |
+
$posts = (array) get_posts(array(
|
89 |
+
'post_type' => 'wysiwyg-widget',
|
90 |
+
'numberposts' => -1
|
91 |
+
));
|
92 |
+
|
93 |
+
$title = isset($instance['title']) ? $instance['title'] : '';
|
94 |
+
$selected_widget_id = (isset($instance['wysiwyg-widget-id'])) ? $instance['wysiwyg-widget-id'] : 0;
|
95 |
+
?>
|
96 |
+
|
97 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="hidden" value="<?php echo esc_attr( $title ); ?>" />
|
98 |
+
|
99 |
+
<p>
|
100 |
+
<label for="<?php echo $this->get_field_id( 'wysiwyg-widget-id' ); ?>"><?php _e( 'Widget Block to show:' ); ?></label>
|
101 |
+
<select class="widefat" id="<?php echo $this->get_field_id('wysiwyg-widget-id'); ?>" name="<?php echo $this->get_field_name( 'wysiwyg-widget-id' ); ?>">
|
102 |
+
<option value="0" disabled <?php selected($selected_widget_id, 0); ?>><?php if(empty($posts)) { ?>No widget blocks found.<?php } else { ?>Select a widget block..<?php } ?></option>
|
103 |
+
<?php foreach($posts as $p) { ?>
|
104 |
+
<option value="<?php echo $p->ID; ?>" <?php selected($selected_widget_id, $p->ID); ?>><?php echo $p->post_title; ?></option>
|
105 |
+
<?php } ?>
|
106 |
+
</select>
|
107 |
+
</p>
|
108 |
+
|
109 |
+
<p class="help">Manage your widget blocks <a href="edit.php?post_type=wysiwyg-widget">here</a></p>
|
110 |
+
<?php
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
includes/class-wysiwyg-widgets-widget.php
DELETED
@@ -1,112 +0,0 @@
|
|
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 |
-
'WYSIWYG Widget', // Name
|
9 |
-
array( 'description' => 'Lets you select one of your "WYSIWYG Widgets" and show it in a widget area.' ) // Args
|
10 |
-
);
|
11 |
-
}
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Front-end display of widget.
|
15 |
-
*
|
16 |
-
* @see WP_Widget::widget()
|
17 |
-
*
|
18 |
-
* @param array $args Widget arguments.
|
19 |
-
* @param array $instance Saved values from database.
|
20 |
-
*/
|
21 |
-
public function widget( $args, $instance ) {
|
22 |
-
extract( $args );
|
23 |
-
$id = $instance['wysiwyg-widget-id'];
|
24 |
-
|
25 |
-
$title = apply_filters( 'widget_title', $instance['title'] );
|
26 |
-
$post = get_post($id);
|
27 |
-
|
28 |
-
echo $before_widget;
|
29 |
-
if(!empty($title)) { echo $before_title . $title . $after_title; }
|
30 |
-
|
31 |
-
if($post && !empty($id)) {
|
32 |
-
$content = wpautop($post->post_content);
|
33 |
-
echo $content;
|
34 |
-
} else {
|
35 |
-
if(current_user_can('manage_options')) { ?>
|
36 |
-
<p style="color:red;">
|
37 |
-
<strong>ADMINS ONLY NOTICE:</strong>
|
38 |
-
<?php if(empty($id)) { ?>
|
39 |
-
Please select a WYSIWYG Widget post to show in this area.
|
40 |
-
<?php } else { ?>
|
41 |
-
No post found with ID <?php echo $id; ?>, please select an existing WYSIWYG Widget post.
|
42 |
-
<?php } ?>
|
43 |
-
</p>
|
44 |
-
<?php }
|
45 |
-
}
|
46 |
-
|
47 |
-
echo $after_widget;
|
48 |
-
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Sanitize widget form values as they are saved.
|
53 |
-
*
|
54 |
-
* @see WP_Widget::update()
|
55 |
-
*
|
56 |
-
* @param array $new_instance Values just sent to be saved.
|
57 |
-
* @param array $old_instance Previously saved values from database.
|
58 |
-
*
|
59 |
-
* @return array Updated safe values to be saved.
|
60 |
-
*/
|
61 |
-
public function update( $new_instance, $old_instance ) {
|
62 |
-
$instance = array();
|
63 |
-
$instance['title'] = strip_tags( $new_instance['title'] );
|
64 |
-
$instance['wysiwyg-widget-id'] = $new_instance['wysiwyg-widget-id'];
|
65 |
-
|
66 |
-
return $instance;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Back-end widget form.
|
71 |
-
*
|
72 |
-
* @see WP_Widget::form()
|
73 |
-
*
|
74 |
-
* @param array $instance Previously saved values from database.
|
75 |
-
*/
|
76 |
-
public function form( $instance ) {
|
77 |
-
|
78 |
-
$posts = get_posts(array(
|
79 |
-
'post_type' => 'wysiwyg-widget',
|
80 |
-
'numberposts' => -1
|
81 |
-
));
|
82 |
-
|
83 |
-
$title = isset($instance['title']) ? $instance['title'] : 'Just another WYSIWYG Widget';
|
84 |
-
$selected_widget_id = (isset($instance['wysiwyg-widget-id'])) ? $instance['wysiwyg-widget-id'] : 0;
|
85 |
-
|
86 |
-
if(empty($posts)) { ?>
|
87 |
-
|
88 |
-
<p>You should first create at least 1 WYSIWYG Widget <a href="<?php echo admin_url('edit.php?post_type=wysiwyg-widget'); ?>">here</a>.</p>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
} else { ?>
|
92 |
-
<p>
|
93 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
|
94 |
-
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
95 |
-
</p>
|
96 |
-
<p>
|
97 |
-
<label for="<?php echo $this->get_field_id( 'wysiwyg-widget-id' ); ?>"><?php _e( 'Widget Content:' ); ?></label>
|
98 |
-
<select id="<?php echo $this->get_field_id('wysiwyg-widget-id'); ?>" name="<?php echo $this->get_field_name( 'wysiwyg-widget-id' ); ?>">
|
99 |
-
<option value="0">Select a WYSIWYG Widget..</option>
|
100 |
-
<?php foreach($posts as $p) { ?>
|
101 |
-
<option value="<?php echo $p->ID; ?>" <?php if($p->ID == $selected_widget_id) echo 'selected="selected"'; ?>><?php echo $p->post_title; ?></option>
|
102 |
-
<?php } ?>
|
103 |
-
</select>
|
104 |
-
</p>
|
105 |
-
<?php
|
106 |
-
}
|
107 |
-
?>
|
108 |
-
<p style="border: 2px solid green; font-weight:bold; background: #CFC; padding:5px; ">I spent countless hours developing (and offering support) for this plugin for FREE. If you like it, consider <a href="http://dannyvankooten.com/donate/">donating $10, $20 or $50</a> as a token of your appreciation.</p>
|
109 |
-
<?php
|
110 |
-
}
|
111 |
-
|
112 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-wysiwyg-widgets.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WYSIWYG_Widgets
|
4 |
-
{
|
5 |
-
|
6 |
-
public function init()
|
7 |
-
{
|
8 |
-
add_action('init', array($this, 'on_init_action'));
|
9 |
-
add_action( 'widgets_init', array($this, 'register_widget'));
|
10 |
-
add_action( 'add_meta_boxes', array($this, 'add_meta_box' ) );
|
11 |
-
}
|
12 |
-
|
13 |
-
public function on_init_action()
|
14 |
-
{
|
15 |
-
$labels = array(
|
16 |
-
'name' => 'WYSIWYG Widget',
|
17 |
-
'singular_name' => 'WYSIWYG Widget',
|
18 |
-
'add_new' => 'Add New',
|
19 |
-
'add_new_item' => 'Add New WYSIWYG Widget',
|
20 |
-
'edit_item' => 'Edit Widget',
|
21 |
-
'new_item' => 'New Widget',
|
22 |
-
'all_items' => 'All Widgets',
|
23 |
-
'view_item' => 'View Widget',
|
24 |
-
'search_items' => 'Search Widgets',
|
25 |
-
'not_found' => 'No widgets found',
|
26 |
-
'not_found_in_trash' => 'No widgets found in Trash',
|
27 |
-
'parent_item_colon' => '',
|
28 |
-
'menu_name' => ' WYSIWYG Widgets'
|
29 |
-
);
|
30 |
-
$args = array(
|
31 |
-
'public' => true,
|
32 |
-
'publicly_queryable' => false,
|
33 |
-
'show_in_nav_menus' => false,
|
34 |
-
'exclude_from_search' => true,
|
35 |
-
'labels' => $labels,
|
36 |
-
'has_archive' => false,
|
37 |
-
'supports' => array('title', 'editor')
|
38 |
-
);
|
39 |
-
register_post_type( 'wysiwyg-widget', $args );
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
public function add_meta_box()
|
44 |
-
{
|
45 |
-
add_meta_box(
|
46 |
-
'wysiwyg-widget-donate-box',
|
47 |
-
'Donate a token of your appreciation',
|
48 |
-
array($this, 'meta_donate_box'),
|
49 |
-
'wysiwyg-widget',
|
50 |
-
'side',
|
51 |
-
'low'
|
52 |
-
);
|
53 |
-
}
|
54 |
-
|
55 |
-
public function register_widget()
|
56 |
-
{
|
57 |
-
register_widget('WYSIWYG_Widgets_Widget');
|
58 |
-
}
|
59 |
-
|
60 |
-
public function meta_donate_box($post)
|
61 |
-
{
|
62 |
-
?>
|
63 |
-
<p style="border: 2px solid green; font-weight:bold; background: #CFC; padding:5px; ">I spent countless hours developing (and offering support) for this plugin for FREE. If you like it, consider <a href="http://dannyvankooten.com/donate/">donating $10, $20 or $50</a> as a token of your appreciation.</p>
|
64 |
-
<?php
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,73 +1,94 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: DvanKooten
|
3 |
Donate link: http://dannyvankooten.com/donate/
|
4 |
-
Tags:
|
5 |
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
= WYSIWYG Widgets or rich text widgets =
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
**BACKWARDS COMPATIBILITY DROPPED IN VERSION 2, PLEASE BACK-UP YOUR WYSIWYG WIDGETS BEFORE UPGRADING**
|
20 |
|
21 |
**Features:**
|
22 |
|
23 |
-
* Create
|
24 |
-
*
|
25 |
-
*
|
26 |
* Use WP Links dialog to easily link to any of your pages or posts from a widget
|
27 |
-
* Use shortcodes inside your
|
28 |
|
29 |
-
**More
|
30 |
|
31 |
* [WYSIWYG Widgets](http://dannyvankooten.com/wordpress-plugins/wysiwyg-widgets/)
|
32 |
* Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/) by the same author
|
33 |
-
*
|
34 |
* [Thank Danny for this plugin by donating $10, $20 or $50.](http://dannyvankooten.com/donate/)
|
35 |
|
36 |
== Installation ==
|
37 |
|
38 |
1. Upload the contents of wysiwyg-widgets.zip to your plugins directory.
|
39 |
1. Activate the plugin
|
40 |
-
1. Create a
|
41 |
-
1. Go to
|
42 |
-
1. Go to the front
|
43 |
|
44 |
== Frequently Asked Questions ==
|
45 |
|
46 |
= What does this plugin do? =
|
47 |
-
This plugin creates a custom post type "
|
|
|
|
|
|
|
48 |
|
49 |
-
= What does WYSIWYG
|
50 |
What You See Is What You Get
|
51 |
|
52 |
= Can I switch between 'Visual' and 'HTML' mode with this plugin? =
|
53 |
Yes, all the default options that you are used to from the post editor are available for the widget editor.
|
54 |
|
55 |
= Will this plugin help me create widgets with images and links =
|
56 |
-
Yes
|
57 |
|
58 |
= Is this plugin free? =
|
59 |
-
|
60 |
|
61 |
== Screenshots ==
|
62 |
|
63 |
-
1. Overview of created
|
64 |
2. Edit the content of a WYSIWYG Widget just like you are used to edit posts.
|
65 |
-
3. Drag the WYSIWYG Widget
|
66 |
|
67 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
= 2.1 =
|
69 |
* Fixed: Social sharing buttons showing up after widget content.
|
70 |
-
*
|
71 |
|
72 |
= 2.0.1 =
|
73 |
* Added: meta box in WYSIWYG Widget editor screen.
|
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.7
|
7 |
+
Stable tag: 2.2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Edit widget content using the default WordPress visual editor and media uploading functionality. Create widgets like you would create posts or pages.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
= WYSIWYG Widgets or rich text widgets =
|
16 |
|
17 |
+
This plugin adds so called Widget Blocks to your website which you can easily show in a widget area. You can create or edit the widget blocks just like you would edit any post or page, with all the default WordPress editing functions enabled. This has the huge benefit that you can use the visual editor to format your text, so you don't have to write any HTML anymore. You can even use media uploading to insert images etc. into your widget content.
|
|
|
|
|
18 |
|
19 |
**Features:**
|
20 |
|
21 |
+
* Create beautiful widgets without writing any HTML
|
22 |
+
* Easily insert media into your widget content
|
23 |
+
* Add headers, lists, blockquotes and other HTML elements to your widgets using the WordPress visual editor
|
24 |
* Use WP Links dialog to easily link to any of your pages or posts from a widget
|
25 |
+
* Use shortcodes inside your widgets
|
26 |
|
27 |
+
**More information**
|
28 |
|
29 |
* [WYSIWYG Widgets](http://dannyvankooten.com/wordpress-plugins/wysiwyg-widgets/)
|
30 |
* Check out more [WordPress plugins](http://dannyvankooten.com/wordpress-plugins/) by the same author
|
31 |
+
* You should follow [@DannyvanKooten](http://twitter.com/dannyvankooten) on Twitter.
|
32 |
* [Thank Danny for this plugin by donating $10, $20 or $50.](http://dannyvankooten.com/donate/)
|
33 |
|
34 |
== Installation ==
|
35 |
|
36 |
1. Upload the contents of wysiwyg-widgets.zip to your plugins directory.
|
37 |
1. Activate the plugin
|
38 |
+
1. Create a Widget Block by going to *Widget Blocks > Add New*
|
39 |
+
1. Go to *Appearance > Widgets*, drag the WYSIWYG Widget to one of your widget areas and select which Widget Block to display.
|
40 |
+
1. *(Optional)* Go to the front-end of your website and enjoy your beautiful widget.
|
41 |
|
42 |
== Frequently Asked Questions ==
|
43 |
|
44 |
= What does this plugin do? =
|
45 |
+
This plugin creates a custom post type called "Widget Blocks" so you can create widget content just like you would create posts or pages. You can show these "Widget Blocks" by dragging a "WYSIWYG Widget" widget to one of your widget areas and selecting which widget block to display inside it.
|
46 |
+
|
47 |
+
= Where do I create a Widget Block? =
|
48 |
+
The plugin adds a menu to the *Pages* menu item. Just go to *Pages > Widget Blocks* and start creating beautiful widgets.
|
49 |
|
50 |
+
= What does WYSIWYG mean? =
|
51 |
What You See Is What You Get
|
52 |
|
53 |
= Can I switch between 'Visual' and 'HTML' mode with this plugin? =
|
54 |
Yes, all the default options that you are used to from the post editor are available for the widget editor.
|
55 |
|
56 |
= Will this plugin help me create widgets with images and links =
|
57 |
+
Yes.
|
58 |
|
59 |
= Is this plugin free? =
|
60 |
+
Yes, totally. Donations are appreciated though!
|
61 |
|
62 |
== Screenshots ==
|
63 |
|
64 |
+
1. Overview of created Widget Blocks
|
65 |
2. Edit the content of a WYSIWYG Widget just like you are used to edit posts.
|
66 |
+
3. Drag the WYSIWYG Widget to one of your widget areas and select the Widget Block to show.
|
67 |
|
68 |
== Changelog ==
|
69 |
+
|
70 |
+
= 2.2.4 - October 21, 2013 =
|
71 |
+
* Moved menu item back to its own menu item
|
72 |
+
* Widget title now defaults to the title of the selected Widget Block
|
73 |
+
* Some textual improvements
|
74 |
+
|
75 |
+
= 2.2.3 - October 16, 2013 =
|
76 |
+
* Moved menu item to pages to prevent capability problems
|
77 |
+
* Removed WP SEO meta box from edit widget block screen
|
78 |
+
|
79 |
+
= 2.2.2 =
|
80 |
+
* Improved: UI improvements, cleaned up admin area.
|
81 |
+
* Improved: Minor code improvement
|
82 |
+
|
83 |
+
= 2.2.1 =
|
84 |
+
* Improved: small code improvements
|
85 |
+
* Improved: changed menu position
|
86 |
+
|
87 |
+
= 2.2 =
|
88 |
+
* Fixed: shortcodes were not processed in v2.1.
|
89 |
+
|
90 |
= 2.1 =
|
91 |
* Fixed: Social sharing buttons showing up after widget content.
|
|
|
92 |
|
93 |
= 2.0.1 =
|
94 |
* Added: meta box in WYSIWYG Widget editor screen.
|
screenshot-1.jpg
DELETED
Binary file
|
screenshot-2.jpg
DELETED
Binary file
|
screenshot-3.jpg
DELETED
Binary file
|
wysiwyg-widgets.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WYSIWYG Widgets
|
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.
|
7 |
Author: Danny van Kooten
|
8 |
Author URI: http://DannyvanKooten.com
|
9 |
License: GPL2
|
@@ -25,8 +25,10 @@ License: GPL2
|
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
-
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
3 |
Plugin Name: WYSIWYG Widgets
|
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.2.4
|
7 |
Author: Danny van Kooten
|
8 |
Author URI: http://DannyvanKooten.com
|
9 |
License: GPL2
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
+
define("WYWI_VERSION_NUMBER", "2.2.4");
|
29 |
+
define("WYWI_PLUGIN_DIR", plugin_dir_path(__FILE__));
|
30 |
|
31 |
+
require_once WYWI_PLUGIN_DIR . 'includes/WYSIWYG_Widgets.php';
|
32 |
+
require_once WYWI_PLUGIN_DIR . 'includes/WYSIWYG_Widgets_Widget.php';
|
33 |
+
|
34 |
+
new WYSIWYG_Widgets();
|