Skip to content

Instantly share code, notes, and snippets.

Ross Morsali rmorse

View GitHub Profile
@rmorse
rmorse / filter-sf-pro-query.php
Last active Jul 21, 2017 — 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
<?php
function hck_filter_taxonomy_archives( $query_args, $sfid ) {
if( $sfid == 509 ) {
$query_args['post_type'] = 'articles';
}
return $query_args;
}
@rmorse
rmorse / Wordpress RSS 2.0 image enclosure
Last active Aug 29, 2015 — 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;
}
add_filter('pre_get_posts','feedFilter');
function feedContentFilter($item) {
@rmorse
rmorse / ellipsis.js
Created Nov 14, 2011 — 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 http://yue.st/notes/code/js/ellipsis.en.html
// 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'});
You can’t perform that action at this time.