Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Created July 17, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wpsmith/3130187 to your computer and use it in GitHub Desktop.
Save wpsmith/3130187 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