This file contains 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
(function($) { | |
$.fn.exists = function() { | |
return this.length > 0; | |
}; | |
})(jQuery); |
This file contains 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
if(!function_exists('body_id')) { | |
function body_id() { | |
global $post; | |
global $wp_query; | |
$post_id = $post->ID; | |
$id = ''; | |
if(is_home() || is_front_page()) { |
This file contains 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
var Slides = { | |
Elements: { | |
links: $('a', '#navigation'), | |
pages: $('div.page', '#content'), | |
previous: $('#previous'), | |
next: $('#next'), | |
loader: $('#loader'), | |
wrapper: $('#content-wrapper') | |
}, | |
Utils: { |
This file contains 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 type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var images = []; | |
<?php foreach($easy_backstretch_images as $image => $data): ?> | |
images.push('<?php echo $data['file_url']; ?>'); | |
<?php endforeach; ?> | |
var index = 0; | |
var backstretchSettings = { fade: <?php echo $easy_backstretch_settings['fade']; ?>, duration:<?php echo $easy_backstretch_settings['duration'];?>}; | |
var len = images.length; | |
var totalDuration = (backstretchSettings.fade + backstretchSettings.duration); |
This file contains 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
(function( $ ) { | |
$.equals = function( elem1, elem2 ) { | |
var domElem1 = $( elem1 ).get( 0 ), | |
domElem2 = $( elem2 ).get( 0 ); | |
if( domElem1 !== domElem2 ) { | |
return false; | |
} | |
This file contains 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 | |
// In functions.php or in your framework specific class as method | |
function count_post_visits() { | |
if( is_single() ) { | |
global $post; | |
$views = get_post_meta( $post->ID, 'my_post_viewed', true ); | |
if( $views == '' ) { | |
update_post_meta( $post->ID, 'my_post_viewed', '1' ); |
This file contains 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 | |
$( "#button" ).one( "click", function() { | |
alert( "Test" ); | |
}); | |
// JS | |
var btn = document.getElementById( "button" ), | |
count = 0; | |
btn.addEventListener( "click", function() { |
This file contains 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
function disable_pingback( $methods ) { | |
unset( $methods['pingback.ping'] ); | |
return $methods; | |
} | |
add_filter( 'xmlrpc_methods', 'disable_pingback' ); |
This file contains 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
/** | |
* Converts email addresses characters to HTML entities to block spam bots. | |
* | |
* @since 0.71 | |
* | |
* @param string $email_address Email address. | |
* @param int $hex_encoding Optional. Set to 1 to enable hex encoding. | |
* @return string Converted email address. | |
*/ | |
function antispambot( $email_address, $hex_encoding = 0 ) { |
OlderNewer