Skip to content

Instantly share code, notes, and snippets.

// Animation Progress Bars
$("[data-appear-progress-animation]").each(function() {
var $this = $(this);
$this.appear(function() {
var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1);
if(delay > 1) $this.css("animation-delay", delay + "ms");
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyten' ) ) ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyten' ) ) ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'twentyten' ); ?>
<?php endif; ?>
@ramzesimus
ramzesimus / PHP: Category Title
Created February 13, 2014 10:45
PHP: Category Title
<h1 class="page-title"><?php
printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
?></h1>
// Simple
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
/* Retina-specific stuff here */
}
// Future Proof
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
// ANIMATE CONTENT
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (isMobile == false) {
$('*[data-animated]').addClass('animated');
}
function animated_contents() {
$(".animated:appeared").each(function (i) {
var $this = $(this),
animated = $(this).data('animated');
// decreases header size when user scrolls down
avia_header_size();
//check if the browser supports element rotation
function avia_header_size()
{
var win = $(window),
header = $('.fixed_header #header'),
//logo = header.find('.logo img'),
logo = $('#header_main .container .logo img, #header_main .container .logo a'),
elements = $('#header_main .container, .main_menu ul:first-child > li > a:not(.avia_mega_div a)'),
function avia_iframe_fix(container)
{
var iframe = jQuery('iframe[src*="youtube.com"]', container),
youtubeEmbed = jQuery('iframe[src*="youtube.com"] object, iframe[src*="youtube.com"] embed', container).attr('wmode','opaque');
iframe.each(function()
{
var current = jQuery(this),
src = current.attr('src');
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
if (jQuery.browser.msie &&jQuery.browser.version<9) {
jQuery(document).ready(function() {
var carouselConteiner = jQuery("#caroufredsel_carousel1");
carouselConteiner.carouFredSel({
responsive : true,
width: '100%',
items : {
width : 225,
height: 'variable',
visible : {