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
// jQuery | |
function cycleReviews(){ | |
var $active = $('.content-slider .current'); | |
var $next = ($active.next().length > 0) ? $active.next() : $('.content-slider div:first'); | |
$active.fadeOut(500,function(){ | |
$(this).removeClass('current'); | |
$next.fadeIn().addClass('current'); | |
}); | |
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
Alabama | |
Alaska | |
Arizona | |
Arkansas | |
California | |
Colorado | |
Connecticut | |
Delaware | |
Florida | |
Georgia |
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
$icon_array = array( | |
'fa-glass', | |
'fa-music', | |
'fa-search', | |
'fa-envelope-o', | |
'fa-heart', | |
'fa-star', | |
'fa-star-o', | |
'fa-user', | |
'fa-film', |
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
<div class="rrssb-buttons"> | |
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" class="popup facebook"> | |
<span class="icon"> | |
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="28px" height="28px" viewBox="0 0 28 28" enable-background="new 0 0 28 28" xml:space="preserve"> | |
<path class="path" d="M27.825,4.783c0-2.427-2.182-4.608-4.608-4.608H4.783c-2.422,0-4.608,2.182-4.608,4.608v18.434 | |
c0,2.427,2.181,4.608,4.608,4.608H14V17.379h-3.379v-4.608H14v-1.795c0-3.089,2.335-5.885,5.192-5.885h3.718v4.608h-3.726 | |
c-0.408,0-0.884,0.492-0.884,1.236v1.836h4.609v4.608h-4.609v10.446h4.916c2.422,0,4.608-2.188,4.608-4.608V4.783z"/> | |
</svg> | |
</span> | |
<span class="text">Share on Facebook</span> |
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
$min = 780; | |
$floor = 780/100; // 7.8 | |
$floor_fix = floor($floor); // 7.0 | |
$min = $floor_fix*100; // 700 | |
echo $min; // will output 700 |
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
$string = 'Test me more'; | |
$pattern = '/^(\S+)/'; | |
$replacement = '<span class="first-word">$1</span>'; | |
echo preg_replace($pattern, $replacement, $string); | |
// or | |
echo preg_replace('/^(\S+)/', '<span class="first-word">$1</span>', 'Test me more'); | |
// from @greg5green |
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
<script> | |
// from http://html5doctor.com/finding-your-position-with-geolocation/ | |
if (navigator.geolocation) { | |
var timeoutVal = 10 * 1000 * 1000; | |
navigator.geolocation.getCurrentPosition( | |
displayPosition, | |
displayError, | |
{ enableHighAccuracy: true, timeout: timeoutVal, maximumAge: 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 echo do_shortcode('[maxbutton id="17" text="Search Google" url="http://google.com"]'); ?> |
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
// into template or another filter i suppose | |
$pattern = get_shortcode_regex(); | |
if( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) | |
&& array_key_exists( 2, $matches ) | |
&& in_array( 'gallery', $matches[2] ) ): | |
$keys = array_keys( $matches[2], 'gallery' ); |