This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Count number of widgets in a sidebar | |
* Used to add classes to widget areas so widgets can be displayed one, two, three or four per row | |
*/ | |
function slbd_count_widgets( $sidebar_id ) { | |
// If loading from front page, consult $_wp_sidebars_widgets rather than options | |
// to see if wp_convert_widget_settings() has made manipulations in memory. | |
global $_wp_sidebars_widgets; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get posts and group by taxonomy terms. | |
* @param string $posts Post type to get. | |
* @param string $terms Taxonomy to group by. | |
* @param integer $count How many post to show per taxonomy term. | |
*/ | |
function list_posts_by_term( $posts, $terms, $count = -1 ) { | |
$tax_terms = get_terms( $terms, 'orderby=name'); | |
foreach ( $tax_terms as $term ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Front to the WordPress application. This file doesn't do anything, but loads | |
* wp-blog-header.php which does and tells WordPress to load the theme. | |
* | |
* @package WordPress | |
*/ | |
/** | |
* Tells WordPress to load the WordPress theme and output it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'option_active_plugins', 'activate_local_plugins' ); | |
/** | |
* Add our local plugins to the list of active plugins. | |
*/ | |
function activate_local_plugins( $plugins ) { | |
if ( '127.0.0.1' == $_SERVER['SERVER_ADDR'] ) { | |
$local_plugins = array( | |
'wordpress-beta-tester/wp-beta-tester.php', | |
'wordpress-importer/wordpress-importer.php', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Removes Wordpress Default Gallery css | |
------------------------------------------------------------ */ | |
add_filter( 'use_default_gallery_style', '__return_false' ); |