This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Remove Comments Tab from admin menu */ | |
function rtp_remove_admin_menus() { | |
remove_menu_page('edit-comments.php'); | |
} | |
add_action('admin_menu', 'rtp_remove_admin_menus'); | |
/* Remove commment support from post and pages */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Dragable Slider */ | |
.slider-wrapper { background: #DDD; width: 540px; } | |
.handle-containment { height: 34px; position: relative; } | |
.handle { position: relative; display: inline-block; height: 34px; width: 180px; top: -34px; padding-bottom: 1px; background: rgba(0, 0, 0, 0); font-weight: bold; color: #FFF; text-decoration: none; text-align: center; line-height: 34px; text-indent: -9999px; } | |
.nav-areas { margin: 0; position: relative; } | |
.nav-areas li { float: left; height: 34px; list-style: none; text-align: center; width: 180px; } | |
.nav-areas a { color: white; font-size: 0.8125em; line-height: 34px; text-decoration: none; display: block; cursor: pointer; position: relative; z-index: 20; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).mouseup(function (e) { | |
var container = $("YOUR CONTAINER SELECTOR"); | |
/* if the target of the click isn't the container */ | |
/* Nor a descendant of the container */ | |
if ( !container.is(e.target) && container.has(e.target).length === 0) { | |
container.hide(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Smooth Scroll */ | |
jQuery('.rtp-back-to-top').click( function() { | |
jQuery('html, body').animate({ | |
scrollTop: jQuery( jQuery(this).attr('href') ).offset().top | |
}, 1000); | |
return false; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Equal Height */ | |
jQuery('.elemWrapper').each(function(){ | |
var max = Math.max.apply(Math, jQuery(this).find('.elem').map(function() { return jQuery(this).height(); })); | |
jQuery(this).addClass('fixed-height').find('.elem').height(max); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* select element styling */ | |
jQuery('.rtp-select').each( function() { | |
var self = jQuery(this), | |
title = self.attr('title'); | |
if( jQuery('option:selected', this).val() !== '' ) title = jQuery('option:selected', this).text(); | |
self | |
.css({ | |
'z-index': 10, | |
'opacity': 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$count = 0; | |
$count_2 = 0; | |
$total_count = count( $post ); | |
if( $count == 0 ) { | |
echo '<div>'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* List convert to Select */ | |
$('ul').each(function() { | |
var list = $(this), | |
select = $(document.createElement('select')).insertBefore($(this)); | |
select.attr('id','list-id'); | |
$('li', this).each(function() { | |
var ahref = $(this).children('a'), | |
target = ahref.attr('target'), | |
option = $(document.createElement('option')) | |
.appendTo(select) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Remove small Gravtars from bbPress Forums */ | |
function rtp_remove_bbp_gravatar_null() { | |
return null; | |
} | |
function rtp_remove_bbp_gravatar($author_link, $args) { | |
return preg_replace('/<a.*<img.*> /iU', '', $author_link); | |
} |