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
<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
$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
$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
<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
$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
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
// 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
jQuery(document).ready(function() { | |
jQuery('a.maxbutton-1').attr( 'onClick', '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
<?php | |
//grabbed from image.php in TwentyTwelve...credit where credit's due | |
/** | |
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, | |
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file | |
*/ | |
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); | |
foreach ( $attachments as $k => $attachment ) : | |
if ( $attachment->ID == $post->ID ) |