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('replace_template_directory_with_stylesheet_directory')): | |
function replace_template_directory_with_stylesheet_directory($text, $show){ | |
if( $show == 'template_directory' ) | |
$text = get_bloginfo('stylesheet_directory'); | |
return $text; | |
}//end replace_template_directory_with_stylesheet_directory | |
endif; //replace_template_directory_with_stylesheet_directory function does not exist | |
add_filter('bloginfo_url', 'replace_template_directory_with_stylesheet_directory', 10, 2); //hook replace_template_directory_with_stylesheet_directory function to bloginfo_url info |
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 if( preg_match('/(?i)msie [1-6]/',$_SERVER['HTTP_USER_AGENT']) ){ ?> | |
<!-- the "no-js" class is for Modernizr. --> | |
<html class="ie ie6 no-js"> | |
<?php } elseif( preg_match('/(?i)msie [7]/',$_SERVER['HTTP_USER_AGENT']) ){ //end if IE 6 ?> | |
<!-- the "no-js" class is for Modernizr. --> | |
<html class="ie ie7 no-js"> | |
<?php } elseif( preg_match('/(?i)msie [8]/',$_SERVER['HTTP_USER_AGENT']) ){ //end if IE 7 ?> | |
<!-- the "no-js" class is for Modernizr. --> | |
<html class="ie ie8 no-js"> | |
<?php } elseif( preg_match('/(?i)msie [9]/',$_SERVER['HTTP_USER_AGENT']) ){ //end if IE 8 ?> |
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 | |
//verify handshake key | |
if( $_POST['HandshakeKey'] == 'ENTER YOUR HANDSHAKE KEY HERE' ): | |
//define $zoho_api_key | |
$zoho_api_key = "ENTER YOUR ZOHO API KEY HERE"; | |
//define $data | |
$data = array (); |
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 updatingClock(selector, type) { | |
function currentDate() { | |
var currentDate = new Date; | |
var Day = currentDate.getDate(); | |
if (Day < 10) { | |
Day = '0' + Day; | |
} //end if | |
var Month = currentDate.getMonth() + 1; | |
if (Month < 10) { | |
Month = '0' + Month; |
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
$(document).ready(function() { | |
function splitSubmenu(ulSelector,maxNumItems) { | |
$(ulSelector).each(function () { | |
// get all child li tags | |
var list$ = $(this).children("li"); | |
var num, nextAfter$, after$ = $(this); | |
// as long as the current list is too long, loop |
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 headings = $('h3'), | |
paras = $('p'); | |
paras.hide().eq(0).show(); | |
headings.click(function() { | |
var cur = $(this); //save the element that has been clicked for easy referal | |
cur.siblings('p').slideUp(); //hide all the paragraphs | |
cur.next('p').slideDown(); //get the next paragraph after the clicked header and show it | |
}); |
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 pages_per_col_admin(){ | |
return 12; | |
} | |
add_filter( 'edit_page_per_page', 'pages_per_col_admin' ); |
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( stristr(get_bloginfo('url'), 'testdomain.com') !== FALSE) | |
update_option('blog_public',0); |
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
//Remove the custom options provided by the default twentyeleven theme. | |
add_action( 'after_setup_theme','remove_twentyeleven_options', 100 ); | |
function remove_twentyeleven_options() { | |
remove_custom_background(); | |
remove_custom_image_header(); | |
remove_action('admin_menu', 'twentyeleven_theme_options_add_page'); | |
} |