Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- # Instantiate your custom class (I use the class to ensure we don't overwrite existing functions)
- new My_Functions;
- class My_Functions {
- /**
- * Add your hooks to the __construct() which will run when we call the class
- */
- function __construct()
- {
- add_action('init',array(&$this,'init'));
- } // function
- /**
- * Add your members, you can safely use existing WordPress function names
- * @example function [init|wp|wp_head|wp_footer]()
- */
- function init()
- {
- $sidebar_settings = array(
- 'name' => sprintf(__('Sidebar %d'), $i ),
- 'id' => 'sidebar-$i',
- 'description' => ''
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h2 class="widgettitle">',
- 'after_title' => '</h2>' );
- register_sidebar($sidebar_settings);
- } // function
- } // class
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement