Skip to content

Instantly share code, notes, and snippets.

View rmorse's full-sized avatar

Ross Morsali rmorse

View GitHub Profile
rmorse / filter-sf-pro-query.php
Last active July 21, 2017 11:46 — forked from dryan1144/filter-sf-pro-query.php
This modifies the $query_args object (rather than replacing it, which removes all the settings that are already in the object created by S&F).
View filter-sf-pro-query.php
function hck_filter_taxonomy_archives( $query_args, $sfid ) {
if( $sfid == 509 ) {
$query_args['post_type'] = 'articles';
return $query_args;
rmorse / Wordpress RSS 2.0 image enclosure
Last active August 29, 2015 14:06 — forked from supermethod/Wordpress RSS 2.0 image enclosure
Updated to to use a specific custom image size, with no fall back - better to have no image instead
View Wordpress RSS 2.0 image enclosure
function feedFilter($query) {
if ($query->is_feed) {
add_filter('rss2_item', 'feedContentFilter');
return $query;
function feedContentFilter($item) {
rmorse / ellipsis.js
Created November 14, 2011 10:04 — forked from yuest/ellipsis.js
A Text Ellipsis jQuery Plugin For Firefox
View ellipsis.js
// A jQuery plugin to enable the text ellipsis in firefox.
// see
// usage:
// $('.elementsNeedEllipsis').ellipsis();
// the elements should be block level ('display: block' or 'display: inline-block')
// I think you should take care of resize event by yourself,
// just call $('.elem').ellipsis() again after element resized.
$.fn.ellipsis = function () {
$(this).css({'white-space': 'nowrap', 'overflow': 'hidden'});