Skip to content

Instantly share code, notes, and snippets.

View MatthewEppelsheimer's full-sized avatar

Matthew Eppelsheimer MatthewEppelsheimer

View GitHub Profile
@MatthewEppelsheimer
MatthewEppelsheimer / gist:4527277
Created January 14, 2013 02:05
Remove addition of " (Publication)" to WP Publication Archive title output. Note! This requires addition of the 'wp_pubarch_publication_title' filter to line 681 of https://github.com/ericmann/WP-Publication-Archive/blob/master/lib/class.wp-publication-archive.php
<?php
// Remove addition of "(Publication)" to WP Publication Archive title output
function rli_normalize_wp_pubarch_title_output( $modified_title, $original_title ) {
return $original_title;
}
add_filter( 'wp_pubarch_publication_title', 'rli_normalize_wp_pubarch_title_output', 100, 2 );
@MatthewEppelsheimer
MatthewEppelsheimer / rli-wp-gitignore
Last active December 10, 2015 16:08
Ignore WordPress core files in our site-specific repos.
# --- Ignore uploads
wp-content/uploads/
# --- Ignore default content
wp-content/themes/twentyeleven/
wp-content/themes/twentytwelve/
wp-content/themes/twentythirteen/
wp-content/themes/twentyfourteen/
@MatthewEppelsheimer
MatthewEppelsheimer / gist:1557177
Created January 3, 2012 22:03
Improved default system messages for WP-Contact-Form-7
Key:
# Message Type
Custom Message (English)
---------
# Sender's message was sent successfully
Your message was sent successfully. Thank you!
# Sender's message was failed to send
@MatthewEppelsheimer
MatthewEppelsheimer / get_post_thumbnail_without_dimensions.php
Created September 11, 2015 17:56
Return a WordPress image thumbnail without image dimensions
/**
* Get an HTML img element representing an image attachment
* Based on wp_get_attachment_image(), without height and width.
*
* While $size will accept an array, it is better to register a size with
* add_image_size() so that a cropped version is generated. It's much more
* efficient than having to find the closest-sized image and then having the
* browser scale down the image.
*
* @since 2.0
@MatthewEppelsheimer
MatthewEppelsheimer / enable-back-end-tablepress-shortcodes.php
Last active August 28, 2015 16:50
Enable TablePress shortcodes in WordPress' administrative back-end
<?php
/**
* Support TablePress shortcodes in the administrative back-end
*
* Hook to `admin_init`.
*
* @author Matthew Eppelsheimer
*/
function rli_support_tablepress_shortcodes_in_admin() {