Skip to content

Instantly share code, notes, and snippets.

View RhythmShahriar's full-sized avatar
🎯
Focusing

Rhythm Shahriar RhythmShahriar

🎯
Focusing
View GitHub Profile
<?php
/**-------------------------------------------
* @package Code Snippets
* @link http://rhythmshahriar.com/code/
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
//* Add custom Viewport meta tag for mobile browsers
add_action( 'genesis_meta', 'rs_viewport_meta_tag' );
function rs_viewport_meta_tag() {
# @package Caching Tutorail
# @link http://rhythmshahriar.com
# @author Rhythm <[email protected]>
# @copyright Copyright (c) 2013, Rhythm Shahriar
# 300 5 MIN
# 600 10 MIN
# 900 15 MIN
# 1800 30 MIN
# 2700 45 MIN
# @package Caching Tutorail
# @link http://rhythmshahriar.com
# @author Rhythm <[email protected]>
# @copyright Copyright (c) 2013, Rhythm Shahriar
ExpiresActive On
ExpiresDefault A0
# 1 YEAR
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
# @package Caching Tutorail
# @link http://rhythmshahriar.com
# @author Rhythm <[email protected]>
# @copyright Copyright (c) 2013, Rhythm Shahriar
# 1 YEAR Caching
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
# @package Caching Tutorail
# @link http://rhythmshahriar.com
# @author Rhythm <[email protected]>
# @copyright Copyright (c) 2013, Rhythm Shahriar
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
# Setup caching on media files for 1 year
<?php
/**-------------------------------------------
* @package WordPress Default Avatar
* @link http://rhythmshahriar.com
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
function rhythm_admin_label( $classes ) {
$comment = get_comment();
if ( $comment->user_id > 0 && user_can( $comment->user_id, 'manage_options' ) )
/**-------------------------------------------
* @package WordPress Default Avatar
* @link http://rhythmshahriar.com
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
.bypostauthor > article .comment-author span[itemprop="name"] {
background: url(images/varified-badge.png) no-repeat right center; /*Image location, it's in your stylesheet images directory*/
padding-right: 40px;
padding-bottom:10px;
/**-------------------------------------------
* @package WordPress Default Avatar
* @link http://rhythmshahriar.com
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
.comment .avatar[src*="blank"] {
background: #333 url(images/rhythm-custom-avatar.png) no-repeat center center; /*Image location, it's in your stylesheet images directory*/
}
<?php
/**-------------------------------------------
* @package WordPress Default Avatar
* @link http://rhythmshahriar.com
* @author Rhythm <[email protected]>
* @copyright Copyright (c) 2013, Rhythm Shahriar
-------------------------------------------------*/
//**Custom Gravatar for Custom Themes**/
add_filter( 'avatar_defaults', 'rhythm_custom_gravatar' );
function rhythm_custom_gravatar ($avatar_defaults) {