Widgets on Pages - Version 0.0.12

Version Description

  1. Updated intermals to "re-hide" options screen from non Administrators (thanks to fran klin for spotting this)
  2. Removed some potential name conflicts
Download this release

Release Info

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

Code changes from version 0.0.11 to 0.0.12

Files changed (2) hide show
  1. readme.txt +33 -17
  2. widgets_on_pages.php +14 -9
readme.txt CHANGED
@@ -1,18 +1,24 @@
1
  === Widgets on Pages ===
2
  Contributors: toddhalfpenny
3
- Donate link: http://gingerbreaddesign.co.uk/wordpress/plugins/plugins.php
4
  Tags: widgets, sidebar, pages, post, shortcode, inline
5
  Requires at least: 2.8
6
- Tested up to: 3.4.1
7
- Stable tag: 0.0.11
8
 
9
- Allows 'in-page' widget areas so widgets can be defined via shortcode straight into page/post content. The widgets/sidebars can also be added through the use of template tags.
10
 
11
  == Description ==
12
 
13
- ''NOTE'' Apologies but you may lose the widgets in your customised sidebars if upgrading from pre 0.0.8 version. The cause of this loss is required to enhance functionality and reduce further possible loss of config when changing/modifying themes. The choice to to do this was not easy but hopefully will make the plugin more stable going forward.
 
 
 
 
14
 
15
- Allows 'in-page' widget areas so widgets can be defined via shortcut straight into page/post content.
 
 
16
  There is one default widget area that can be used or you can add more from the settings menu. You can currently have an unlimited number of sidebars.
17
  Each sidebar can be called indepentenly by a shortcode and you can call more than one per post/page.
18
  Sidebars can be included in the post/page by using a shortcode like `[widgets_on_pages id=x]` where `x` is the number of the sidebar.
@@ -32,7 +38,8 @@ Sidebars can also be named via the Widgets on Pages options page and that name c
32
  1. Add the shortcut `[widgets_on_pages id=x]` to the page or post in the place where you'd like your widgets to appear (where 'x' = the id of the sidebar to use (or the name if you have named it such as `[widgets_on_pages id=TagCloud]`). If using only the default sidebar then no 'id' argument is needed (i.e. `[widgets_on_pages]`).
33
  1. To add a sidebar into a theme you can add the following type of code to the relevant PHP theme file. `<?php widgets_on_template("wop_1"); ?>`
34
  1. If you see bullet points/images next to the widget titles when using this plugin use the 'Enable Styling' setting in the options page
35
-
 
36
 
37
  == Frequently Asked Questions ==
38
 
@@ -40,6 +47,9 @@ Sidebars can also be named via the Widgets on Pages options page and that name c
40
 
41
  Simply select the 'Enable Styling' setting in the Widgets on Pages options page.
42
 
 
 
 
43
 
44
  = Can I have more than one defined sidebar area =
45
 
@@ -54,16 +64,22 @@ Yes... you can have an unlimited number of sidebars defined. The number availabl
54
 
55
  == Changelog ==
56
 
57
- = 0.0.11 =
 
 
 
 
 
 
58
 
59
  1. Replaced all short PHP tags with long ones to ensure the plugin worked as expected even on sites where PHP short tags were disabled. Props to drdanchaz over at the WordPress.org forums for the tip-off.
60
  1. Added more specific selectors to the wop.css to target ul>li as well as ul.
61
 
62
- = 0.0.10 =
63
 
64
- 1. Added option to add CSS file to auto remove bullets... this has been the biggest cause of support mails/forum posts.
65
 
66
- = 0.0.9 =
67
 
68
  1. Corrected shortcode tags show in Widget admin page.
69
 
@@ -80,26 +96,26 @@ Yes... you can have an unlimited number of sidebars defined. The number availabl
80
  1. Can now add sidebars via template tags so extra sidebars can be added to themes very quickly.
81
  1. Added contextual help.
82
 
83
- = 0.0.6 =
84
 
85
  Sidebars can now be named via the options page. These names can be used in place of the numerical id used in older versions. Note that if you change the name you will need to manually update any shortcodes where this is being used.
86
 
87
- = 0.0.5 =
88
 
89
  Fix for activation errors. Looks like it might've been the use of php short open tags or line ending chars.
90
 
91
- = 0.0.4 =
92
 
93
  There is now no longer a limit on the number of sidebars that can be defined. Each sidebar can be called independently.
94
 
95
- = 0.0.3 =
96
 
97
  The number of sidebars can now be defined via the settings menu. There can be up to 5 defined. Each sidebar can be called independently.
98
 
99
- = 0.0.2 =
100
 
101
  Minor update so that the functions.php code is not needed anymore... makes like easier.
102
 
103
- = 0.0.1 =
104
 
105
  1st release - only supports one defined in-post/page widget area
1
  === Widgets on Pages ===
2
  Contributors: toddhalfpenny
3
+ Donate link: https://datamad.co.uk/donate/
4
  Tags: widgets, sidebar, pages, post, shortcode, inline
5
  Requires at least: 2.8
6
+ Tested up to: 4.7.3
7
+ Stable tag: 0.0.12
8
 
9
+ The easy way to Add Widgets or Sidebars to Posts and Pages using shortcodes or template tags.
10
 
11
  == Description ==
12
 
13
+ ''NOTICE''
14
+
15
+ This plugin has now been superceeded by the brand new [Turbo Widgets](https://wordpress.org/plugins/turbo-widgets/) and I recommend you use that instead of this one.
16
+
17
+ As well as being more actively maintained it also now allows widgets to be added using the lovely WYSIWYG editor so no need to deal with shortcodes... woohoo! There is also a [PRO](http://turbowidgets.net) version that includes the ability to edit the included widgets direct from the post/page via the WYSIWYG editor and the wonderful new Turbo Sidebars.
18
 
19
+ ''And back to Widgtes on Pages''
20
+
21
+ The easy way to Add Widgets to Posts and/or Pages. Allows 'in-page' widget areas so widgets can be defined via shortcut straight into page/post content.
22
  There is one default widget area that can be used or you can add more from the settings menu. You can currently have an unlimited number of sidebars.
23
  Each sidebar can be called indepentenly by a shortcode and you can call more than one per post/page.
24
  Sidebars can be included in the post/page by using a shortcode like `[widgets_on_pages id=x]` where `x` is the number of the sidebar.
38
  1. Add the shortcut `[widgets_on_pages id=x]` to the page or post in the place where you'd like your widgets to appear (where 'x' = the id of the sidebar to use (or the name if you have named it such as `[widgets_on_pages id=TagCloud]`). If using only the default sidebar then no 'id' argument is needed (i.e. `[widgets_on_pages]`).
39
  1. To add a sidebar into a theme you can add the following type of code to the relevant PHP theme file. `<?php widgets_on_template("wop_1"); ?>`
40
  1. If you see bullet points/images next to the widget titles when using this plugin use the 'Enable Styling' setting in the options page
41
+ 1. For further info check out these ace videos put together by Jessica Barnard
42
+ [youtube http://www.youtube.com/watch?v=h957U96SFYE]
43
 
44
  == Frequently Asked Questions ==
45
 
47
 
48
  Simply select the 'Enable Styling' setting in the Widgets on Pages options page.
49
 
50
+ = I did the above but the bullets still show, what now =
51
+
52
+ Your theme's CSS is probably overriding your setting... you could try using your browsers ''inspect element" function to see what part of the CSS is setting the list-style.
53
 
54
  = Can I have more than one defined sidebar area =
55
 
64
 
65
  == Changelog ==
66
 
67
+
68
+ = 0.0.12 =
69
+
70
+ 1. Updated intermals to "re-hide" options screen from non Administrators (thanks to fran klin for spotting this)
71
+ 1. Removed some potential name conflicts
72
+
73
+ = 0.0.11 =
74
 
75
  1. Replaced all short PHP tags with long ones to ensure the plugin worked as expected even on sites where PHP short tags were disabled. Props to drdanchaz over at the WordPress.org forums for the tip-off.
76
  1. Added more specific selectors to the wop.css to target ul>li as well as ul.
77
 
78
+ = 0.0.10 =
79
 
80
+ 1. Added option to add CSS file to auto remove bullets... this has been the biggest cause of support mails/forum posts.
81
 
82
+ = 0.0.9 =
83
 
84
  1. Corrected shortcode tags show in Widget admin page.
85
 
96
  1. Can now add sidebars via template tags so extra sidebars can be added to themes very quickly.
97
  1. Added contextual help.
98
 
99
+ = 0.0.6 =
100
 
101
  Sidebars can now be named via the options page. These names can be used in place of the numerical id used in older versions. Note that if you change the name you will need to manually update any shortcodes where this is being used.
102
 
103
+ = 0.0.5 =
104
 
105
  Fix for activation errors. Looks like it might've been the use of php short open tags or line ending chars.
106
 
107
+ = 0.0.4 =
108
 
109
  There is now no longer a limit on the number of sidebars that can be defined. Each sidebar can be called independently.
110
 
111
+ = 0.0.3 =
112
 
113
  The number of sidebars can now be defined via the settings menu. There can be up to 5 defined. Each sidebar can be called independently.
114
 
115
+ = 0.0.2 =
116
 
117
  Minor update so that the functions.php code is not needed anymore... makes like easier.
118
 
119
+ = 0.0.1 =
120
 
121
  1st release - only supports one defined in-post/page widget area
widgets_on_pages.php CHANGED
@@ -20,9 +20,9 @@
20
  /*
21
  Plugin Name: Widgets on Pages
22
  Plugin URI: http://gingerbreaddesign.co.uk/wordpress/plugins/widgets-on-pages.php
23
- Description: Allows 'in-page' widget areas so widgets can be defined via shortcut straight into page/post content or through the use of a template tag.
24
  Author: Todd Halfpenny
25
- Version: 0.0.11
26
  Author URI: http://gingerbreaddesign.co.uk/todd
27
  */
28
 
@@ -34,8 +34,9 @@ Author URI: http://gingerbreaddesign.co.uk/todd
34
  add_action('admin_menu', 'wop_menu');
35
 
36
  function wop_menu() {
37
- add_options_page('Widgets on Pages options', 'Widgets on Pages', 7, 'wop_options', 'wop_plugin_options');
38
- add_action( 'admin_init', 'register_wop_settings' );
 
39
 
40
  }
41
 
@@ -135,7 +136,10 @@ function wop_plugin_options() {
135
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
136
  </p>
137
  </td></tr>
138
- <input type="hidden" name="action" value="update" />
 
 
 
139
  </form>
140
  </div>
141
  <?php
@@ -155,9 +159,10 @@ function wop_install() {
155
  /* ===============================
156
  C O N T E X T U A L H E L P
157
  ================================*/
158
- function my_contextual_help($text) {
159
- $screen = $_GET['page'];
160
- if ($screen == 'wop_options') {
 
161
  $text = "<h5>Need help with the Widgets on Pages plugin?</h5>";
162
  $text .= "<p>Check out the documentation and support forums for help with this plugin.</p>";
163
  $text .= "<a href=\"http://wordpress.org/extend/plugins/widgets-on-pages/installation/\">Documentation</a><br /><a href=\"http://wordpress.org/tags/widgets-on-pages?forum_id=10\">Support forums</a>";
@@ -165,7 +170,7 @@ function my_contextual_help($text) {
165
  return $text;
166
  }
167
 
168
- add_action('contextual_help', 'my_contextual_help', 10, 1);
169
 
170
 
171
  /* ===============================
20
  /*
21
  Plugin Name: Widgets on Pages
22
  Plugin URI: http://gingerbreaddesign.co.uk/wordpress/plugins/widgets-on-pages.php
23
+ Description: The easy way to Add Widgets or Sidebars to Posts and Pages by shortcodes or template tags.
24
  Author: Todd Halfpenny
25
+ Version: 0.0.12
26
  Author URI: http://gingerbreaddesign.co.uk/todd
27
  */
28
 
34
  add_action('admin_menu', 'wop_menu');
35
 
36
  function wop_menu() {
37
+ global $wop_plugin_hook;
38
+ $wop_plugin_hook = add_options_page('Widgets on Pages options', 'Widgets on Pages', 'manage_options', 'wop_options', 'wop_plugin_options');
39
+ add_action( 'admin_init', 'register_wop_settings' );
40
 
41
  }
42
 
136
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
137
  </p>
138
  </td></tr>
139
+ <tr><td></td><td><input type="hidden" name="action" value="update" />
140
+ </td></tr>
141
+ <tr><td colspan='2'><h3>Rate this plugin</h3><p><a href="http://wordpress.org/support/view/plugin-reviews/widgets-on-pages?rate=5#postform" title="Rate me">If you like me, please rate me</a>... or maybe even <a href="http://gingerbreaddesign.co.uk/wordpress/" title="Show you love">donate to the author</a>... <p><p>or perhaps just spread the good word <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://wordpress.org/extend/plugins/widgets-on-pages/" data-text="Using the Widgets on Pages WordPress plugin and lovin' it" data-via="toddhalfpenny" data-count="none">Tweet</a>
142
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></p></td></tr>
143
  </form>
144
  </div>
145
  <?php
159
  /* ===============================
160
  C O N T E X T U A L H E L P
161
  ================================*/
162
+ function wop_plugin_help($text, $screen_id, $screen) {
163
+ global $wop_plugin_hook;
164
+ if ($screen_id == $wop_plugin_hook) {
165
+
166
  $text = "<h5>Need help with the Widgets on Pages plugin?</h5>";
167
  $text .= "<p>Check out the documentation and support forums for help with this plugin.</p>";
168
  $text .= "<a href=\"http://wordpress.org/extend/plugins/widgets-on-pages/installation/\">Documentation</a><br /><a href=\"http://wordpress.org/tags/widgets-on-pages?forum_id=10\">Support forums</a>";
170
  return $text;
171
  }
172
 
173
+ add_filter('contextual_help', 'wop_plugin_help', 10, 3);
174
 
175
 
176
  /* ===============================