Widgets on Pages - Version 0.0.2

Version Description

Minor update so that the functions.php code is not needed anymore... makes like easier.

Download this release

Release Info

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

Code changes from version 0.0.1 to 0.0.2

Files changed (3) hide show
  1. readme.txt +13 -14
  2. screenshot-1.png +0 -0
  3. widgets_on_pages.php +15 -1
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: toddhalfpenny
3
  Donate link: n/a
4
  Tags: widgets, sidebar, pages, post
5
  Requires at least: 2.8
6
- Tested up to: 2.9.1
7
- Stable tag: 0.0.1
8
 
9
  Allows 'in-page' widget areas so widgets can be defined via shortcut straight into page/post content
10
 
@@ -16,20 +16,11 @@ Allows 'in-page' widget areas so widgets can be defined via shortcut straight in
16
  == Installation ==
17
 
18
 
19
- 1. Upload the directory `widgets-on-pages` and all its contents to the `/wp-content/plugins/` directory
20
  1. Activate the plugin through the 'Plugins' menu in WordPress
21
- 1. Add the following lines to the end of your themes `functions.php` file
22
- `<pre>&lt;?php if ( function_exists('register_sidebar') )
23
- register_sidebar(array(
24
- 'name' => 'Widgets on Pages',
25
- 'before_widget' => '&lt;li id="%1$s" class="widget %2$s">',
26
- 'after_widget' => '&lt;/li>',
27
- 'before_title' => '&lt;h2 class="widgettitle">',
28
- 'after_title' => '&lt;/h2>',
29
- )); ?></pre>`
30
- 1. Add the shortcut `[widgets_on_pages]` to the page or post in the place where you'd like your widgets to appear.
31
  1. Add the widgets you want to the `Widgets on Pages` widget area in the admin screens
32
-
 
33
 
34
  == Frequently Asked Questions ==
35
 
@@ -37,8 +28,16 @@ register_sidebar(array(
37
 
38
  No, sorry not yet. The plan is to get this supported though
39
 
 
 
 
 
40
  == Changelog ==
41
 
 
 
 
 
42
  = 0.0.1 =
43
 
44
  1st release - only supports one defined in-post/page widget area
3
  Donate link: n/a
4
  Tags: widgets, sidebar, pages, post
5
  Requires at least: 2.8
6
+ Tested up to: 2.9.2
7
+ Stable tag: 0.0.2
8
 
9
  Allows 'in-page' widget areas so widgets can be defined via shortcut straight into page/post content
10
 
16
  == Installation ==
17
 
18
 
19
+ 1. Install the plugin from within the Dashboard or upload the directory `widgets-on-pages` and all its contents to the `/wp-content/plugins/` directory
20
  1. Activate the plugin through the 'Plugins' menu in WordPress
 
 
 
 
 
 
 
 
 
 
21
  1. Add the widgets you want to the `Widgets on Pages` widget area in the admin screens
22
+ 1. Add the shortcut `[widgets_on_pages]` to the page or post in the place where you'd like your widgets to appear.
23
+
24
 
25
  == Frequently Asked Questions ==
26
 
28
 
29
  No, sorry not yet. The plan is to get this supported though
30
 
31
+ == Screenshots ==
32
+
33
+ 1. The 'auto' defined Sidebar that can be called by the shortcode.
34
+
35
  == Changelog ==
36
 
37
+ = 0.0.2 =
38
+
39
+ Minor update so that the functions.php code is not needed anymore... makes like easier.
40
+
41
  = 0.0.1 =
42
 
43
  1st release - only supports one defined in-post/page widget area
screenshot-1.png ADDED
Binary file
widgets_on_pages.php CHANGED
@@ -22,7 +22,7 @@ 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
24
  Author: Todd Halfpenny
25
- Version: 0.0.1
26
  Author URI: http://gingerbreaddesign.co.uk/todd
27
  */
28
 
@@ -33,6 +33,7 @@ Author URI: http://gingerbreaddesign.co.uk/todd
33
 
34
 
35
  function widgets_on_page(){
 
36
  $str = "<div id='widgets_on_page'>
37
  <ul>";
38
  ob_start();
@@ -46,6 +47,19 @@ function widgets_on_page(){
46
  return $str;
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  add_shortcode('widgets_on_pages', 'widgets_on_page');
50
 
51
 
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
24
  Author: Todd Halfpenny
25
+ Version: 0.0.2
26
  Author URI: http://gingerbreaddesign.co.uk/todd
27
  */
28
 
33
 
34
 
35
  function widgets_on_page(){
36
+ reg_wop_sidebar();
37
  $str = "<div id='widgets_on_page'>
38
  <ul>";
39
  ob_start();
47
  return $str;
48
  }
49
 
50
+
51
+ function reg_wop_sidebar() {
52
+ if ( function_exists('register_sidebar') )
53
+ register_sidebar(array(
54
+ 'name' => 'Widgets on Pages',
55
+ 'before_widget' => '<li id="%1$s" class="widget %2$s">',
56
+ 'after_widget' => '</li>',
57
+ 'before_title' => '<h2 class="widgettitle">',
58
+ 'after_title' => '</h2>',
59
+ ));
60
+ }
61
+
62
+ add_action('admin_init', 'reg_wop_sidebar');
63
  add_shortcode('widgets_on_pages', 'widgets_on_page');
64
 
65