amr shortcode any widget - Version 2.7

Version Description

Download this release

Release Info

Developer anmari
Plugin Icon wp plugin amr shortcode any widget
Version 2.7
Comparing to
See all releases

Code changes from version 2.6 to 2.7

Files changed (2) hide show
  1. amr-shortcode-any-widget.php +6 -2
  2. readme.txt +8 -3
amr-shortcode-any-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: amr shortcode any widget
4
  Plugin URI: http://webdesign.anmari.com/shortcode-any-widget/
5
  Description: Include any widget in a page for any theme. [do_widget widgetname ] or [do_widget "widget name" ] [do_widget id=widgetnamedashed-n ]or include a whole widget area [do_widget_area]. Please read: <a href="https://wordpress.org/plugins/amr-shortcode-any-widget/installation/">Installation</a> and <a href="https://wordpress.org/plugins/amr-shortcode-any-widget/faq/">FAQ</a>.
6
  Author: anmari
7
- Version: 2.6
8
  Author URI: http://webdesign.anmari.com
9
 
10
  */
@@ -36,7 +36,11 @@ global $wp_registered_widgets, $_wp_sidebars_widgets, $wp_registered_sidebars;
36
 
37
  ), $atts));
38
 
39
-
 
 
 
 
40
  if (empty ($wp_registered_sidebars[$widget_area])) {
41
  echo '<br/>Widget area "'.$widget_area.'" not found. Registered widget areas (sidebars) are: <br/>';
42
  foreach ($wp_registered_sidebars as $area=> $sidebar) echo $area.'<br />';
4
  Plugin URI: http://webdesign.anmari.com/shortcode-any-widget/
5
  Description: Include any widget in a page for any theme. [do_widget widgetname ] or [do_widget "widget name" ] [do_widget id=widgetnamedashed-n ]or include a whole widget area [do_widget_area]. Please read: <a href="https://wordpress.org/plugins/amr-shortcode-any-widget/installation/">Installation</a> and <a href="https://wordpress.org/plugins/amr-shortcode-any-widget/faq/">FAQ</a>.
6
  Author: anmari
7
+ Version: 2.7
8
  Author URI: http://webdesign.anmari.com
9
 
10
  */
36
 
37
  ), $atts));
38
 
39
+ if (!empty($atts)) {
40
+ if (($widget_area == 'widgets_for_shortcodes' ) and !empty($atts[0]))
41
+ $widget_area = $atts[0];
42
+ }
43
+
44
  if (empty ($wp_registered_sidebars[$widget_area])) {
45
  echo '<br/>Widget area "'.$widget_area.'" not found. Registered widget areas (sidebars) are: <br/>';
46
  foreach ($wp_registered_sidebars as $area=> $sidebar) echo $area.'<br />';
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: anmari
3
  Tags: shortcode, widget, page, templates, page template, widget_area, sidebar
4
  Tested up to: 4.3
5
- Version: 2.6
6
  Stable tag: trunk
7
 
8
  == Description ==
@@ -33,7 +33,7 @@ PLEASE get your widgets working in a sidebar BEFORE activating this plugin, and
33
  * [do_widget id=widgetid] . eg: [do_widget id=tag-cloud-3]
34
 
35
  * [do_widget_area] (will use the "widgets in shortcodes" widget area / sidebar
36
- * [do_widget_area sidebarname] for another sidebar or widget area - eg: to maximise likelihood of getting your theme's widget css to apply.
37
 
38
  7. If the plugin cannot work out what you want and you are logged in as an administrator, it will show a debug prompt to you (the logged in admin) only. Sometimes the widget name that wordpress calls it internally is not the same as what you see on the screen and you will need the 'debug' to find the id.
39
  * Click on the link 'Try debug'. It will produce a bunch of info.
@@ -190,7 +190,12 @@ More info on background: http://wordpress.org/support/topic/your-theme-your-side
190
 
191
 
192
  == Changelog ==
193
- = Version 2.5 =
 
 
 
 
 
194
  * Tested on 4.2
195
  * Removed from admin settings area the use of add_query_arg (unnecessary)
196
  * Added esc_url to widget id 'debug' oage just in case (it is only accessed by logged in admin, but lets be safe and keep everyone happy if the see the add_query_arg and remove_query_arg
2
  Contributors: anmari
3
  Tags: shortcode, widget, page, templates, page template, widget_area, sidebar
4
  Tested up to: 4.3
5
+ Version: 2.7
6
  Stable tag: trunk
7
 
8
  == Description ==
33
  * [do_widget id=widgetid] . eg: [do_widget id=tag-cloud-3]
34
 
35
  * [do_widget_area] (will use the "widgets in shortcodes" widget area / sidebar
36
+ * [do_widget_area sidebarname] or [do_widget_area widget_area=sidebarname] for another sidebar or widget area - eg: to maximise likelihood of getting your theme's widget css to apply.
37
 
38
  7. If the plugin cannot work out what you want and you are logged in as an administrator, it will show a debug prompt to you (the logged in admin) only. Sometimes the widget name that wordpress calls it internally is not the same as what you see on the screen and you will need the 'debug' to find the id.
39
  * Click on the link 'Try debug'. It will produce a bunch of info.
190
 
191
 
192
  == Changelog ==
193
+ = Version 2.6 =
194
+ * Tested on 4.3
195
+ * Allow one to skip using widget_area parameter [do_widget_area widget_area=sidebar-3] and just say [do_widget_area sidebar-3]
196
+
197
+
198
+ = Version 2.6 =
199
  * Tested on 4.2
200
  * Removed from admin settings area the use of add_query_arg (unnecessary)
201
  * Added esc_url to widget id 'debug' oage just in case (it is only accessed by logged in admin, but lets be safe and keep everyone happy if the see the add_query_arg and remove_query_arg