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 countingOccurrences(string, subString) | |
{ | |
var foundAtPosition = 0; | |
var count = 0; | |
while (foundAtPosition != -1) { | |
foundAtPosition = string.indexOf(subString, foundAtPosition); | |
if (foundAtPosition != -1) { | |
count++; | |
foundAtPosition++; |
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 fileName() | |
{ | |
var fileName = window.location.href; | |
fileName = fileName.substr(fileName.lastIndexOf("/") - 1); | |
return fileName; | |
} |
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 getBrowserName() | |
{ | |
lsBrowser = navigator.userAgent; | |
if ( lsBrowser.indexOf("MSIE") >= 0 ) { | |
lsBrowser = "MSIE"; | |
} else if ( lsBrowser.indexOf("Firefox") >= 0 ) { | |
lsBrowser = "Firefox"; | |
} else if ( lsBrowser.indexOf("Chrome") >= 0 ) { | |
lsBrowser = "Chrome"; |
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 getBrowserVersion() | |
{ | |
var findIndex; | |
var browserVersion = 0; | |
var browser = getBrowserName(); | |
browserVersion = navigator.userAgent; | |
findIndex = browserVersion.indexOf(browser) + browser.length + 1; | |
browserVersion = parseFloat(browserVersion.substring(findIndex, findIndex + 3)); |
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
add_filter('widget_text', 'do_shortcode'); |
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 modify_read_more_link() { | |
return '<a class="post__link" href="' . get_permalink() . '">Read more ›</a>'; | |
} | |
add_filter( 'the_content_more_link', 'modify_read_more_link' ); |
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 add_slug_body_class( $classes ) { | |
global $post; | |
if ( isset( $post ) && !is_home() ) { | |
$classes[] = $post->post_type . '-' . $post->post_name; | |
} | |
return $classes; | |
} | |
add_filter( 'body_class', 'add_slug_body_class' ); |
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 remove_wysiwyg() | |
{ | |
remove_post_type_support('page', 'editor'); | |
} | |
add_action('init', 'remove_wysiwyg', 10); |
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_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
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
<reference name="breadcrumbs"> | |
<action method="addCrumb"> | |
<crumbName>Home</crumbName> | |
<crumbInfo> | |
<label>Home</label> | |
<title>Home</title> | |
<link>/home</link> | |
</crumbInfo> | |
</action> | |
<action method="addCrumb"> |
OlderNewer