Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bryanwillis/86f88556884dc4453c1b to your computer and use it in GitHub Desktop.
Save bryanwillis/86f88556884dc4453c1b to your computer and use it in GitHub Desktop.
Modifies the Genesis Sidebar Defaults
<?php
/*
Plugin Name: Genesis Sidebars Defaults Plugin
Plugin URI: http://www.wpsmith.net/
Description: Modifies the Genesis Sidebar Defaults
Version: 0.0.1
Author: Travis Smith
Author URI: http://www.wpsmith.net/
License: GPLv2
Copyright 2012 Travis Smith (email : http://wpsmith.net/contact/)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
add_action( 'genesis_register_sidebar_defaults', 'wps_register_sidebar_defaults' );
/**
* Modify the Genesis sidebar defaults
*
* @param array $defaults Genesis defaults.
* @return array Modified Genesis defaults.
*/
function wps_register_sidebar_defaults( $defaults ) {
return array(
'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget-wrap">',
'after_widget' => "</div></div><div class="widget-bottom"></div>\n", //Modified
'before_title' => '<h2 class="widgettitle">', //Modified
'after_title' => "</h2>\n", //Modified
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment