Skip to content

Instantly share code, notes, and snippets.

studiograsshopper

Block or report user

Report or block studiograsshopper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sgr-remove-default-image-sizes.php
<?php
/**
* Remove standard image sizes so that these sizes are not
* created during the Media Upload process.
* Note: these sizes will appear "disabled" in the Media Uploader
*
* Hooked to intermediate_image_sizes_advanced filter
* See wp_generate_attachment_metadata( $attachment_id, $file ) in wp-admin/includes/image.php
*
* @param $sizes, array of default and added image sizes
@studiograsshopper
studiograsshopper / sgr-author-details.php
Created Oct 9, 2011
WP Show author details on author archive
View sgr-author-details.php
<?php
/**
* Function to display author details on the author archive page
*
* @uses get_query_var()
*
* @return echo out the author's details
* @author Ade Walker http://www.studiograsshopper.ch
*/
function sgr_author_info() {
View dump-all-filters.php
<?php
add_action( 'all', create_function( '', 'var_dump( current_filter() );' ) );
@studiograsshopper
studiograsshopper / test.php
Created Oct 9, 2011
WP Add image sizes to media uploader
View test.php
<?php
/**
* Filter callback to add image sizes to Media Uploader
*
* WP 3.3 pre-beta adds a new filter 'image_size_names_choose' to
* the list of image sizes which are displayed in the Media Uploader after an image
* has been uploaded.
*
* See image_size_input_fields() in wp-admin/includes/media.php
*
You can’t perform that action at this time.