Version Description
Download this release
Release Info
Developer | anmari |
Plugin | amr shortcode any widget |
Version | 3.3 |
Comparing to | |
See all releases |
Code changes from version 3.2 to 3.3
- amr-shortcode-any-widget.php +4 -5
- readme.txt +7 -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: 3.
|
8 |
Author URI: http://webdesign.anmari.com
|
9 |
|
10 |
*/
|
@@ -20,7 +20,6 @@ function amr_spice_get_widget_id($widget_instance) {
|
|
20 |
}
|
21 |
}
|
22 |
|
23 |
-
|
24 |
function amr_remove_widget_class($params) { // remove the widget classes
|
25 |
if (!empty($params[0]['before_widget'])) {
|
26 |
$params[0]['before_widget'] =
|
@@ -359,9 +358,9 @@ include ('amr-utilities.php');
|
|
359 |
if (is_admin() ) $amr_saw_plugin_admin = new amr_saw_plugin_admin();
|
360 |
|
361 |
add_action('widgets_init', 'amr_reg_sidebar',98); // register late so it appears last
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
|
366 |
add_shortcode('do_widget', 'amr_do_widget');
|
367 |
add_shortcode('do_widget_area', 'amr_do_widget_area'); // just dump the whole widget area - to get same styling
|
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: 3.3
|
8 |
Author URI: http://webdesign.anmari.com
|
9 |
|
10 |
*/
|
20 |
}
|
21 |
}
|
22 |
|
|
|
23 |
function amr_remove_widget_class($params) { // remove the widget classes
|
24 |
if (!empty($params[0]['before_widget'])) {
|
25 |
$params[0]['before_widget'] =
|
358 |
if (is_admin() ) $amr_saw_plugin_admin = new amr_saw_plugin_admin();
|
359 |
|
360 |
add_action('widgets_init', 'amr_reg_sidebar',98); // register late so it appears last
|
361 |
+
|
362 |
+
add_action('switch_theme', 'amr_save_shortcodes_sidebar');
|
363 |
+
add_action('after_switch_theme', 'amr_restore_shortcodes_sidebar');
|
364 |
|
365 |
add_shortcode('do_widget', 'amr_do_widget');
|
366 |
add_shortcode('do_widget_area', 'amr_do_widget_area'); // just dump the whole widget area - to get same styling
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== amr shortcode any widget ===
|
2 |
Contributors: anmari
|
3 |
Tags: shortcode, widget, page, templates, page template, widget_area, sidebar
|
4 |
-
Tested up to: 4.
|
5 |
-
Version: 3.
|
6 |
Stable tag: trunk
|
7 |
|
8 |
== Description ==
|
@@ -11,7 +11,7 @@ Insert a widget or multiple widgets or a entire widget area (sidebar) into a pag
|
|
11 |
Set up your widget first in a normal sidebar. Check it works.
|
12 |
THEN Drag your chosen widgets to the sidebar called "widgets for shortcode".
|
13 |
|
14 |
-
Add the do_widget shortcode to the page where you would like the widget to appear
|
15 |
|
16 |
Using a widget more than once?
|
17 |
|
@@ -160,6 +160,10 @@ If you only using widget, maybe inserting the whole sidebar or widgertarea would
|
|
160 |
|
161 |
|
162 |
== Changelog ==
|
|
|
|
|
|
|
|
|
163 |
|
164 |
= Version 3.2 =
|
165 |
* tweaked some error messages and handle situation better where there are no widgets or possibly empty sidebars.
|
1 |
=== amr shortcode any widget ===
|
2 |
Contributors: anmari
|
3 |
Tags: shortcode, widget, page, templates, page template, widget_area, sidebar
|
4 |
+
Tested up to: 4.7 alpha
|
5 |
+
Version: 3.3
|
6 |
Stable tag: trunk
|
7 |
|
8 |
== Description ==
|
11 |
Set up your widget first in a normal sidebar. Check it works.
|
12 |
THEN Drag your chosen widgets to the sidebar called "widgets for shortcode".
|
13 |
|
14 |
+
Add the do_widget shortcode to the page where you would like the widget to appear (or the do_widget_area)
|
15 |
|
16 |
Using a widget more than once?
|
17 |
|
160 |
|
161 |
|
162 |
== Changelog ==
|
163 |
+
= Version 3.3 =
|
164 |
+
* Retested on wordpres 4.5 and 4.5.1-alpha
|
165 |
+
* Re-instated the saving of widgets in the shortcode sidebar on theme switch and the reloading of these saved widgets when theme is reactivated (Was commented out for awhile back in 2014, but appears to be working well and very useful when you changing a theme but maybe forgotten about this page that has widget on it - yeah that could be bad !
|
166 |
+
|
167 |
|
168 |
= Version 3.2 =
|
169 |
* tweaked some error messages and handle situation better where there are no widgets or possibly empty sidebars.
|