Skip to content

Instantly share code, notes, and snippets.

View spacedmonkey's full-sized avatar
🖐️
Open for work

Jonny Harris spacedmonkey

🖐️
Open for work
View GitHub Profile
@spacedmonkey
spacedmonkey / gist:9688152
Last active April 22, 2024 15:25
Export to CSV - WP CLI
/**
* Export users to a CSV file.
*
* ## OPTIONS
*
* <file>
* : The CSV file to export users to.
*
* ## EXAMPLES
*
@spacedmonkey
spacedmonkey / gist:8666712
Created January 28, 2014 12:23
Add yoast breadcrumb - bootstrap
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<nav class="breadcrumbs" role="navigation">','</nav>');
} ?>
@spacedmonkey
spacedmonkey / gist:8666689
Created January 28, 2014 12:19
Change wp seo markup
/**
Change the wrapper of breadcrums to span to ul
**/
function change_breadcrumb_output_wrapper($old){
return "ul";
}
add_filter( 'wpseo_breadcrumb_output_wrapper', 'change_breadcrumb_output_wrapper' );
/**
@spacedmonkey
spacedmonkey / gist:8039923
Created December 19, 2013 14:29
Use wp_link_pages in twitter bootstrap 3
function spacedmonkey_pages($old){
$old['before'] = '<ul class="pagination"><li class="disabled"><span>Pages: </span></li>';
$old['after'] = '</ul>';
$old['link_before'] = '<span class="">';
$old['link_after'] = '</span>';
return $old;
}
add_filter( 'wp_link_pages_args', 'spacedmonkey_pages' );
@spacedmonkey
spacedmonkey / gist:7989920
Created December 16, 2013 16:31
Not load plugin text domain unless file found
/**
* Load the plugin text domain for translation.
*
* @since 2.0
*/
public function load_plugin_textdomain() {
$domain = $this->plugin_slug;
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );