Widgets on Pages - Version 1.4

Version Description

  1. Free version now supports TinyMCE button to add widgets
Download this release

Release Info

Developer toddhalfpenny
Plugin Icon 128x128 Widgets on Pages
Version 1.4
Comparing to
See all releases

Code changes from version 1.3 to 1.4

admin/class-widgets-on-pages-admin.php CHANGED
@@ -73,6 +73,10 @@ class Widgets_On_Pages_Admin
73
  10,
74
  3
75
  );
 
 
 
 
76
  if ( wop_fs()->is_not_paying() ) {
77
  // Auto Insert Turbo Sidebar PRO-feature Custom Meta.
78
  add_action( 'add_meta_boxes', array( $this, 'wop_add_free_custom_meta' ) );
@@ -137,6 +141,7 @@ class Widgets_On_Pages_Admin
137
  'Settings',
138
  'manage_options',
139
  $this->plugin_name,
 
140
  array( $this, 'display_options_page' )
141
  );
142
  // Sub menu page -> Turbo Sidebar.
@@ -154,7 +159,7 @@ class Widgets_On_Pages_Admin
154
  *
155
  * @since 1.0.0
156
  */
157
- public function wop_register_settings()
158
  {
159
  register_setting( 'wop_options', 'wop_options_field' );
160
  }
@@ -271,13 +276,12 @@ class Widgets_On_Pages_Admin
271
  ?>
272
  <?php
273
  echo '<p id="wop-shortcode">' . $shortcode_id . '</p><button type="button" id="bq_copy_sc" value="Copy Shortcode" class="button-secondary" />Copy Shortcode</button>' ;
274
-
 
275
  if ( wop_fs()->is_not_paying() ) {
276
- echo '<section><h3>' . esc_html__( 'Insert using the visual editor', 'widgets-on-pages' ) . '</h3>' ;
277
- echo '<p><a href="' . wop_fs()->get_upgrade_url() . '">' . esc_html__( 'Upgrade Now', 'widgets-on-pages' ) . '</a>' . esc_html__( ' to use the visual editor and arrange widgets in columns, too!', 'widgets-on-pages' ) ;
278
- echo '</section>' ;
279
  }
280
-
281
  echo __( '<h4>Template Tag</h4><p>Use this code to include the sidebar in your theme.</h4>', 'widgets-on-pages' ) ;
282
  $shortcode_id = esc_html( '<?php widgets_on_template("' . $post->post_title . '");?>' );
283
  echo '<p id="wop-template-tag">' . $shortcode_id . '</p><button type="button" id="bq_copy_tt" value="Copy Shortcode" class="button-secondary" />Copy PHP</button>' ;
@@ -290,6 +294,7 @@ class Widgets_On_Pages_Admin
290
  */
291
  public function cpt_autoinsert_free_meta_box_markup()
292
  {
 
293
  ?>
294
  <div class='inside'>
295
  <?php
@@ -301,8 +306,7 @@ class Widgets_On_Pages_Admin
301
  <div class='inside'>
302
  <h3><?php
303
  _e( 'Auto Insert', 'widgets-on-pages' );
304
- ?>
305
- </h3>
306
  <p>
307
  <input type="radio" disabled /> Yes<br />
308
  <input type="radio" disabled/> No
@@ -312,8 +316,7 @@ class Widgets_On_Pages_Admin
312
  <div class='inside'>
313
  <h3><?php
314
  _e( 'Position', 'widgets-on-pages' );
315
- ?>
316
- </h3>
317
  <p>
318
  <input type="radio" disabled /> Before Header<br />
319
  <input type="radio" disabled /> After Header
@@ -332,8 +335,7 @@ class Widgets_On_Pages_Admin
332
  <div class='inside'>
333
  <h3><?php
334
  _e( 'Show on Posts / Pages', 'widgets-on-pages' );
335
- ?>
336
- </h3>
337
  <p>
338
  <input type="radio" disabled /> Posts<br />
339
  <input type="radio" disabled /> Pages<br />
@@ -344,16 +346,13 @@ class Widgets_On_Pages_Admin
344
  <div class='inside'>
345
  <h3><?php
346
  _e( 'Layout Options', 'widgets-on-pages' );
347
- ?>
348
- </h3>
349
  <p><?php
350
  _e( 'Number of widget columms per screen size', 'widgets-on-pages' );
351
- ?>
352
- </p>
353
  <p><label><?php
354
  _e( 'Small Screen', 'widgets-on-pages' );
355
- ?>
356
- </label>
357
  <select>
358
  <option value="1" selected>1</option>
359
  <option value="2">2</option>
@@ -363,8 +362,7 @@ class Widgets_On_Pages_Admin
363
  </p>
364
  <p><label><?php
365
  _e( 'Medium Screen', 'widgets-on-pages' );
366
- ?>
367
- </label>
368
  <select>
369
  <option value="1">1</option>
370
  <option value="2">2</option>
@@ -374,8 +372,7 @@ class Widgets_On_Pages_Admin
374
  </p>
375
  <p><label><?php
376
  _e( 'Large Screen', 'widgets-on-pages' );
377
- ?>
378
- </label>
379
  <select>
380
  <option value="1">1</option>
381
  <option value="2">2</option>
@@ -385,8 +382,7 @@ class Widgets_On_Pages_Admin
385
  </p>
386
  <p><label><?php
387
  _e( 'Wide Screen', 'widgets-on-pages' );
388
- ?>
389
- </label>
390
  <select>
391
  <option value="1"></option>
392
  <option value="2"></option>
@@ -583,5 +579,142 @@ class Widgets_On_Pages_Admin
583
  }
584
 
585
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
 
587
  }
73
  10,
74
  3
75
  );
76
+ // WYSIWYG Tiny MCE.
77
+ add_action( 'admin_head', array( $this, 'wop_add_my_tc_button' ) );
78
+ add_action( 'wp_ajax_twd_cpt_list', array( $this, 'twd_list_ajax' ) );
79
+ add_action( 'admin_footer', array( $this, 'twd_cpt_list' ) );
80
  if ( wop_fs()->is_not_paying() ) {
81
  // Auto Insert Turbo Sidebar PRO-feature Custom Meta.
82
  add_action( 'add_meta_boxes', array( $this, 'wop_add_free_custom_meta' ) );
141
  'Settings',
142
  'manage_options',
143
  $this->plugin_name,
144
+ // Note, this is the same as above to remove dupe link.
145
  array( $this, 'display_options_page' )
146
  );
147
  // Sub menu page -> Turbo Sidebar.
159
  *
160
  * @since 1.0.0
161
  */
162
+ function wop_register_settings()
163
  {
164
  register_setting( 'wop_options', 'wop_options_field' );
165
  }
276
  ?>
277
  <?php
278
  echo '<p id="wop-shortcode">' . $shortcode_id . '</p><button type="button" id="bq_copy_sc" value="Copy Shortcode" class="button-secondary" />Copy Shortcode</button>' ;
279
+ echo '<section><h3>' . esc_html__( 'Insert using the visual editor', 'widgets-on-pages' ) . '</h3>' ;
280
+ echo '<p>' . esc_html__( 'Use the visual editor to add Turbo Sidebars.', 'widgets-on-pages' ) ;
281
  if ( wop_fs()->is_not_paying() ) {
282
+ echo '<p><a href="' . wop_fs()->get_upgrade_url() . '">' . esc_html__( 'Upgrade Now', 'widgets-on-pages' ) . '</a>' . esc_html__( ' And you can arrange widgets in columns, too!', 'widgets-on-pages' ) ;
 
 
283
  }
284
+ echo '</section>' ;
285
  echo __( '<h4>Template Tag</h4><p>Use this code to include the sidebar in your theme.</h4>', 'widgets-on-pages' ) ;
286
  $shortcode_id = esc_html( '<?php widgets_on_template("' . $post->post_title . '");?>' );
287
  echo '<p id="wop-template-tag">' . $shortcode_id . '</p><button type="button" id="bq_copy_tt" value="Copy Shortcode" class="button-secondary" />Copy PHP</button>' ;
294
  */
295
  public function cpt_autoinsert_free_meta_box_markup()
296
  {
297
+ // Show our custom meta options.
298
  ?>
299
  <div class='inside'>
300
  <?php
306
  <div class='inside'>
307
  <h3><?php
308
  _e( 'Auto Insert', 'widgets-on-pages' );
309
+ ?></h3>
 
310
  <p>
311
  <input type="radio" disabled /> Yes<br />
312
  <input type="radio" disabled/> No
316
  <div class='inside'>
317
  <h3><?php
318
  _e( 'Position', 'widgets-on-pages' );
319
+ ?></h3>
 
320
  <p>
321
  <input type="radio" disabled /> Before Header<br />
322
  <input type="radio" disabled /> After Header
335
  <div class='inside'>
336
  <h3><?php
337
  _e( 'Show on Posts / Pages', 'widgets-on-pages' );
338
+ ?></h3>
 
339
  <p>
340
  <input type="radio" disabled /> Posts<br />
341
  <input type="radio" disabled /> Pages<br />
346
  <div class='inside'>
347
  <h3><?php
348
  _e( 'Layout Options', 'widgets-on-pages' );
349
+ ?></h3>
 
350
  <p><?php
351
  _e( 'Number of widget columms per screen size', 'widgets-on-pages' );
352
+ ?></p>
 
353
  <p><label><?php
354
  _e( 'Small Screen', 'widgets-on-pages' );
355
+ ?></label>
 
356
  <select>
357
  <option value="1" selected>1</option>
358
  <option value="2">2</option>
362
  </p>
363
  <p><label><?php
364
  _e( 'Medium Screen', 'widgets-on-pages' );
365
+ ?></label>
 
366
  <select>
367
  <option value="1">1</option>
368
  <option value="2">2</option>
372
  </p>
373
  <p><label><?php
374
  _e( 'Large Screen', 'widgets-on-pages' );
375
+ ?></label>
 
376
  <select>
377
  <option value="1">1</option>
378
  <option value="2">2</option>
382
  </p>
383
  <p><label><?php
384
  _e( 'Wide Screen', 'widgets-on-pages' );
385
+ ?></label>
 
386
  <select>
387
  <option value="1"></option>
388
  <option value="2"></option>
579
  }
580
 
581
  }
582
+
583
+ /**
584
+ * Adds a button to the TinyMCE editor.
585
+ */
586
+ public function wop_add_my_tc_button()
587
+ {
588
+ global $typenow ;
589
+ // Check user permissions.
590
+ if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {
591
+ return;
592
+ }
593
+ // Verify the post type.
594
+ if ( !in_array( $typenow, array( 'post', 'page' ) ) ) {
595
+ return;
596
+ }
597
+ // Check if WYSIWYG is enabled.
598
+
599
+ if ( get_user_option( 'rich_editing' ) == 'true' ) {
600
+ add_filter( 'mce_external_plugins', array( $this, 'wop_add_tinymce_plugin' ) );
601
+ add_filter( 'mce_buttons', array( $this, 'wop_register_my_tc_button' ) );
602
+ }
603
+
604
+ }
605
+
606
+ /**
607
+ * Sets up the link from our button to our JS.
608
+ *
609
+ * @param array $plugin_array Exsting plugin array.
610
+ * @return arry Our updated plugin array.
611
+ */
612
+ public function wop_add_tinymce_plugin( $plugin_array )
613
+ {
614
+ $plugin_array['wop_tc_button'] = plugins_url( '/js/wop-tinymce-plugin.js', __FILE__ );
615
+ return $plugin_array;
616
+ }
617
+
618
+ /**
619
+ * Add our TinyMCE button.
620
+ *
621
+ * @param array $buttons Existing array of buttons.
622
+ * @return array Updated array of buttons.
623
+ */
624
+ public static function wop_register_my_tc_button( $buttons )
625
+ {
626
+ array_push( $buttons, 'wop_tc_button' );
627
+ return $buttons;
628
+ }
629
+
630
+ /**
631
+ * Function to fetch buttons
632
+ *
633
+ * @since 1.1.0
634
+ */
635
+ public function twd_list_ajax()
636
+ {
637
+ // Check for nonce.
638
+ check_ajax_referer( 'twd-nonce', 'security' );
639
+ $list = array();
640
+ $args = array(
641
+ 'post_type' => 'turbo-sidebar-cpt',
642
+ 'posts_per_page' => 100,
643
+ );
644
+ $loop = new WP_Query( $args );
645
+ while ( $loop->have_posts() ) {
646
+ $loop->the_post();
647
+
648
+ if ( is_numeric( $loop->post->post_name ) ) {
649
+ $name = 'Widgets on Pages ' . $loop->post->post_name;
650
+ $shortcode_id = $loop->post->post_name;
651
+ $id = 'wop-' . $loop->post->post_name;
652
+ } else {
653
+ $name = $loop->post->post_title;
654
+ $id = 'wop-' . $loop->post->post_name;
655
+ $shortcode_id = $loop->post->post_title;
656
+ }
657
+
658
+ if ( '' != get_the_excerpt( $loop->post ) ) {
659
+ $id = 'wop-' . get_the_excerpt( $loop->post );
660
+ }
661
+ $list[] = array(
662
+ 'text' => $name,
663
+ 'value' => $id,
664
+ );
665
+ }
666
+ echo wp_send_json( $list ) ;
667
+ wp_die();
668
+ // This is required to terminate immediately and return a proper response.
669
+ }
670
+
671
+ /**
672
+ * Function to output button list ajax script
673
+ *
674
+ * @since 1.1.0
675
+ */
676
+ public function twd_cpt_list()
677
+ {
678
+ // Create nonce.
679
+ global $pagenow ;
680
+
681
+ if ( 'admin.php' != $pagenow ) {
682
+ $nonce = wp_create_nonce( 'twd-nonce' );
683
+ $notPaying = false;
684
+ if ( wop_fs()->is_not_paying() ) {
685
+ $notPaying = true;
686
+ }
687
+ ?><script type="text/javascript">
688
+ jQuery( document ).ready( function( $ ) {
689
+ var data = {
690
+ 'action' : 'twd_cpt_list', // wp ajax action
691
+ 'security' : '<?php
692
+ echo $nonce ;
693
+ ?>' // nonce value created earlier
694
+ };
695
+ // Fire ajax.
696
+ jQuery.post( ajaxurl, data, function( response ) {
697
+ console.log("WOP", response);
698
+ // If nonce fails then not authorized else settings saved.
699
+ if( response === '-1' ){
700
+ // Do nothing.
701
+ console.log('error');
702
+ } else {
703
+ if (typeof(tinyMCE) != 'undefined') {
704
+ if (tinyMCE.activeEditor != null) {
705
+ tinyMCE.activeEditor.settings.cptPostsList = response;
706
+ tinyMCE.activeEditor.settings.notPaying = <?php
707
+ echo $notPaying ;
708
+ ?>;
709
+ }
710
+ }
711
+ }
712
+ });
713
+ });
714
+ </script>
715
+ <?php
716
+ }
717
+
718
+ }
719
 
720
  }
admin/js/wop-tinymce-plugin.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function() {
2
+
3
+ tinymce.PluginManager.add('wop_tc_button', function( editor, url ) {
4
+
5
+ function showDialog() {
6
+ var lblColsHeader = {
7
+ type: 'label',
8
+ text: 'Number of widget columms per screen size',
9
+ tooltip: 'Small < 768px, etc',
10
+ style: 'font-weight: bold',
11
+ };
12
+ if ( editor.settings.notPaying ) {
13
+ lblColsHeader = {
14
+ type: 'panel',
15
+ layout: 'Stack',
16
+ margin: '2 0 2 0',
17
+ style: 'border-left: 5px solid #BD441C; padding: 0.5em 0 0.3em 0.5em',
18
+ items: [
19
+ {
20
+ type: 'label',
21
+ text: 'Number of widget columms per screen size',
22
+ tooltip: 'Small < 768px, etc',
23
+ style: 'font-weight: bold; padding-bottom: 1em;',
24
+ },
25
+ {type: 'label',text: 'Column settings are a PRO feature.',
26
+ style: 'padding-bottom: 0.5em;',},
27
+ {type: 'label',text: 'You can upgrade from the Widgets on Pages settings.'},
28
+ ]
29
+ };
30
+ }
31
+ editor.windowManager.open( {
32
+ title: 'Insert Turbo Sidebar',
33
+ body: [
34
+ {
35
+ type: 'listbox',
36
+ name: 'sidebar',
37
+ label: 'Turbo Sidebar',
38
+ 'values': editor.settings.cptPostsList
39
+ },
40
+ lblColsHeader,
41
+ {
42
+ type: 'listbox',
43
+ name: 'small',
44
+ label: 'Small Screen',
45
+ values: [
46
+ {text: '1', value: '1'},
47
+ {text: '2', value: '2'},
48
+ ]
49
+ },
50
+ {
51
+ type: 'listbox',
52
+ name: 'medium',
53
+ label: 'Medium Screen',
54
+ values: [
55
+ {text: '1', value: '1'},
56
+ {text: '2', value: '2'},
57
+ {text: '3', value: '3'},
58
+ ]
59
+ },
60
+ {
61
+ type: 'listbox',
62
+ name: 'large',
63
+ label: 'Large Screen',
64
+ values: [
65
+ {text: '1', value: '1'},
66
+ {text: '2', value: '2'},
67
+ {text: '3', value: '3'},
68
+ {text: '4', value: '4'}
69
+ ]
70
+ },
71
+ {
72
+ type: 'listbox',
73
+ name: 'wide',
74
+ label: 'Wide Screen',
75
+ values: [
76
+ {text: '1', value: '1'},
77
+ {text: '2', value: '2'},
78
+ {text: '3', value: '3'},
79
+ {text: '4', value: '4'}
80
+ ]
81
+ },
82
+ ],
83
+ onsubmit: function( e ) {
84
+
85
+ if ( editor.settings.notPaying ) {
86
+ editor.insertContent( '[widgets_on_pages id="' + e.data.sidebar + '"]');
87
+ } else {
88
+ editor.insertContent( '[widgets_on_pages id="' + e.data.sidebar + '" small="' + e.data.small + '" medium="' + e.data.medium + '" large="' + e.data.large + '" wide="' + e.data.wide + '"]');
89
+ }
90
+ }
91
+ });
92
+ } // end showDialog
93
+
94
+ editor.addButton( 'wop_tc_button', {
95
+ tooltip: 'Add Turbo Sidebar',
96
+ icon: 'icon dashicons-welcome-widgets-menus',
97
+ onclick: showDialog,
98
+ });
99
+ });
100
+ })();
public/class-widgets-on-pages-public.php CHANGED
@@ -68,8 +68,7 @@ class Widgets_On_Pages_Public
68
  'large' => '1',
69
  'wide' => '1',
70
  ), $atts ) );
71
- $str = '<div id=\'' . str_replace( ' ', '_', $id ) . '\' class=\'widgets_on_page wop_tiny' . $tiny . ' wop_small' . $small . ' wop_medium' . $medium . ' wop_large' . $large . ' wop_wide' . $wide . '\'>
72
- <ul>';
73
  // Legacy bullshit.
74
  if ( is_numeric( $id ) ) {
75
  $id = 'wop-' . $id;
68
  'large' => '1',
69
  'wide' => '1',
70
  ), $atts ) );
71
+ $str = "<div id='" . str_replace( ' ', '_', $id ) . "' class='widgets_on_page wop_tiny" . $tiny . ' wop_small' . $small . ' wop_medium' . $medium . ' wop_large' . $large . ' wop_wide' . $wide . "'>\n\t\t\t<ul>";
 
72
  // Legacy bullshit.
73
  if ( is_numeric( $id ) ) {
74
  $id = 'wop-' . $id;
public/css/widgets-on-pages-public.css CHANGED
@@ -1 +1 @@
1
- .widgets_on_page ul, .widgets_on_page ul li {list-style:none;background:none;}
1
+ .widgets_on_page > ul, .widgets_on_page > ul li {list-style:none;background:none;}
readme.txt CHANGED
@@ -4,9 +4,9 @@ Donate link: https://datamad.co.uk/donate/
4
  Tags: widgets, widgets in page, widgets in post, sidebar, pages, post, shortcode, inline, widgetise, widgetize, theme
5
  Requires at least: 2.8
6
  Tested up to: 4.9
7
- Stable tag: 1.3
8
 
9
- The easiest and highest rated way to Add Widgets or Sidebars to Posts and Pages using shortcodes or template tags.
10
 
11
  == Description ==
12
 
@@ -20,12 +20,11 @@ Sidebars can be included in the post/page by using a shortcode like the followin
20
 
21
  `[widgets_on_pages id=x]`
22
 
23
- > With the PRO version the [widgets can be inserted](https://datamad.co.uk/wordpress-plugins/widgets-on-pages/) simply with clicks-not-code using a wizard in the visual editor. This version also includes layout options to easily set the widgets in columns/grid presentation.
24
  >
25
- > Pro version also supports the configurable option to [automatically add widgets to all your posts and/or pages](https://datamad.co.uk/wordpress-plugins/widgets-on-pages/). Choose the layout options and whether to add the sidebar and widgets before or after the content. Ideal for adding lists of related posts to the end of every post. Each post and page can also be individually excluded from the auto-inclsion of the widgets.
26
  >
27
  > [Pro version](https://datamad.co.uk/wordpress-plugins/widgets-on-pages/) key features
28
- > * Visual editor widget inserts
29
  > * Responsive Horizontal/Column/Grid layout
30
  > * Auto insert in Header, Content, or Footer
31
  > * Priority Support
@@ -34,7 +33,7 @@ Sidebars can be included in the post/page by using a shortcode like the followin
34
 
35
  * Create a Turbo Sidebar, these are your special widget containers
36
  * Add widgets to the Turbo Sidebar in the same way as you do for normal sidebars
37
- * Add the Shortcode into your post or page where you'd like it to appear.
38
 
39
  The sidebars can also be added to any theme, using template tags. This is an ace way to add widgets/sidebars to a theme's header and footer (or any other part of a theme).
40
 
@@ -101,6 +100,11 @@ This is a new feature, and is handled differently for various themes. Although t
101
 
102
  == Changelog ==
103
 
 
 
 
 
 
104
  = 1.3 =
105
 
106
  1. Adding buttons to admin UI for copying/pasting the Shortcodes and Template Tags
4
  Tags: widgets, widgets in page, widgets in post, sidebar, pages, post, shortcode, inline, widgetise, widgetize, theme
5
  Requires at least: 2.8
6
  Tested up to: 4.9
7
+ Stable tag: 1.4
8
 
9
+ The easiest and highest rated way to Add Widgets or Sidebars to Posts and Pages using Visual editor, shortcodes or template tags.
10
 
11
  == Description ==
12
 
20
 
21
  `[widgets_on_pages id=x]`
22
 
23
+ > With the [PRO](https://datamad.co.uk/wordpress-plugins/widgets-on-pages/) version the widgets can be inserted simply with clicks-not-code using a wizard in the visual editor. This version also includes layout options to easily set the widgets in columns/grid presentation.
24
  >
25
+ > Pro version also supports the configurable option to automatically add widgets to all your posts and/or pages. Choose the layout options and whether to add the sidebar and widgets before or after the content. Ideal for adding lists of related posts to the end of every post. Each post and page can also be individually excluded from the auto-inclusion of the widgets.
26
  >
27
  > [Pro version](https://datamad.co.uk/wordpress-plugins/widgets-on-pages/) key features
 
28
  > * Responsive Horizontal/Column/Grid layout
29
  > * Auto insert in Header, Content, or Footer
30
  > * Priority Support
33
 
34
  * Create a Turbo Sidebar, these are your special widget containers
35
  * Add widgets to the Turbo Sidebar in the same way as you do for normal sidebars
36
+ * If using the visual editor use the Add Turbo Sidebar button to add the Shortcode into your post or page where you'd like it to appear.
37
 
38
  The sidebars can also be added to any theme, using template tags. This is an ace way to add widgets/sidebars to a theme's header and footer (or any other part of a theme).
39
 
100
 
101
  == Changelog ==
102
 
103
+ = 1.4 =
104
+
105
+ 1. Free version now supports TinyMCE button to add widgets
106
+
107
+
108
  = 1.3 =
109
 
110
  1. Adding buttons to admin UI for copying/pasting the Shortcodes and Template Tags
widgets_on_pages.php CHANGED
@@ -11,7 +11,7 @@
11
  * Plugin Name: Widgets On Pages
12
  * Plugin URI: https://datamad.co.uk/wordpress-plugins/widgets-on-pages/
13
  * Description: The easiest way to Add Widgets or Sidebars to Posts and Pages using shortcodes or template tags.
14
- * Version: 1.3.0
15
  * Author: Todd Halfpenny
16
  * Author URI: http://toddhalfpenny.com/
17
  * License: GPL-2.0+
@@ -85,7 +85,7 @@ if ( !function_exists( 'wop_fs' ) ) {
85
  die;
86
  }
87
  if ( !defined( 'WOP_PLUGIN_VERSION' ) ) {
88
- define( 'WOP_PLUGIN_VERSION', '1.3.0' );
89
  }
90
  /**
91
  * The code that runs during plugin activation.
@@ -148,4 +148,4 @@ if ( !function_exists( 'wop_fs' ) ) {
148
  'back_link' => true,
149
  );
150
  wp_die( '<h1>Activation Failed</h1><p>Sorry, looks like you already have another version of Widgets on Pages already activated.</p><p>Please deactivate any other versions before re-attempting to activate</p>', 'Plugin activation failed', $args );
151
- }
11
  * Plugin Name: Widgets On Pages
12
  * Plugin URI: https://datamad.co.uk/wordpress-plugins/widgets-on-pages/
13
  * Description: The easiest way to Add Widgets or Sidebars to Posts and Pages using shortcodes or template tags.
14
+ * Version: 1.4.0
15
  * Author: Todd Halfpenny
16
  * Author URI: http://toddhalfpenny.com/
17
  * License: GPL-2.0+
85
  die;
86
  }
87
  if ( !defined( 'WOP_PLUGIN_VERSION' ) ) {
88
+ define( 'WOP_PLUGIN_VERSION', '1.4.0' );
89
  }
90
  /**
91
  * The code that runs during plugin activation.
148
  'back_link' => true,
149
  );
150
  wp_die( '<h1>Activation Failed</h1><p>Sorry, looks like you already have another version of Widgets on Pages already activated.</p><p>Please deactivate any other versions before re-attempting to activate</p>', 'Plugin activation failed', $args );
151
+ }