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
// Build lazy loading function - visible that is... | |
(function ($) { | |
$.fn.visible = function (partial, hidden) { | |
var $t = $(this).eq(0), | |
t = $t.get(0), | |
$w = $(window), | |
viewTop = $w.scrollTop(), | |
viewBottom = viewTop + $w.height(), | |
_top = $t.offset().top, | |
_bottom = _top + $t.height(), |
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
UPDATE prefix_options SET option_value = replace(option_value, 'demo.com', 'live.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE prefix_posts SET guid = replace(guid, 'demo.com','live.com'); | |
UPDATE prefix_posts SET post_content = replace(post_content, 'demo.com', 'live.com'); | |
UPDATE prefix_postmeta SET meta_value = replace(meta_value, 'demo.com', 'live.com'); | |
UPDATE prefix_term_taxonomy SET taxonomy = replace(taxonomy, 'demo', 'live'); | |
UPDATE prefix_posts SET post_type = replace(post_type, 'demo', 'live'); |
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
/* | |
* Apply online user status | |
*/ | |
function gr_users_online_transient() { | |
if ( is_user_logged_in() ) { | |
$key = 'online'; | |
$time = 60 * 5; | |
$user = wp_get_current_user(); | |
$id = $user->ID; | |
$status = get_transient( $key .'_'. $id ); |
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 gr_sanitize_danish($title) { | |
if (!seems_utf8($title)) return $title; | |
$filter_chars = array( | |
// Character mapping from UTF-8 characters to ASCII characters. | |
chr(195).chr(32) => '_', // whitespace to underscore | |
chr(195).chr(133) => 'AA', // Å to AA | |
chr(195).chr(134) => 'AE', // Æ to Ae | |
chr(195).chr(143) => 'AA', // Å to AA | |
chr(195).chr(145) => 'ae', // æ to ae | |
chr(195).chr(146) => 'AE', // Æ to Ae |
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
/* | |
* GET SAVED LIX BY ID | |
*/ | |
if ( !function_exists( 'get_lix' ) ) { | |
function get_lix( $id = NULL ) { | |
global $post; | |
if ( is_user_logged_in() && !is_home() && !is_front_page() ) { | |
if ( empty( $id ) && is_object( $post ) ) { | |
$id = $post->ID; | |
} |
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
/* | |
* Get standard settings upon installation | |
*/ | |
function gr_set_defaults(){ | |
$o = array( | |
'avatar_default' => 'blank', | |
'avatar_rating' => 'G', | |
'category_base' => '', | |
'comment_max_links' => 0, | |
'comment_whitelist' => 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
/** | |
* Browser language | |
*/ | |
if ( !function_exists('gr_language') ) { | |
function gr_language() { | |
$lang = substr( $_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2 ); | |
echo $lang; | |
} | |
} |
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(document).ready(function($) { | |
$.expr[':'].external = function(obj) { | |
return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname); | |
}; | |
$('a:external:not(.nonfadelink)').each(function() { | |
$(this).addClass('external').attr("target","_blank"); | |
var url = $(this).attr("href"); | |
$(this).html(function() { | |
var utms = "<?php echo get_bloginfo('name'); ?>"; | |
var utms = utms.split(' ').join('_'); |
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
/* STEP 1 */ | |
RENAME table `wp_commentmeta` TO `prefix_commentmeta`; | |
RENAME table `wp_comments` TO `prefix_comments`; | |
RENAME table `wp_icl_content_status` TO `prefix_icl_content_status`; | |
RENAME table `wp_icl_core_status` TO `prefix_icl_core_status`; | |
RENAME table `wp_icl_flags` TO `prefix_icl_flags`; | |
RENAME table `wp_icl_languages` TO `prefix_icl_languages`; | |
RENAME table `wp_icl_languages_translations` TO `prefix_icl_languages_translations`; | |
RENAME table `wp_icl_locale_map` TO `prefix_icl_locale_map`; | |
RENAME table `wp_icl_message_status` TO `prefix_icl_message_status`; |
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
<div id="fund"></div><script type="text/javascript">window.onload=function(){var e=window.location.search.substring(1),n="https://onlinefundraising.dk/showcase/?"+e,t=document.getElementById("fund").offsetWidth,d=document.createElement("iframe");d.frameBorder=0,d.width=t,d.height="1450px",d.id="fundraising",d.frameborder="0",d.scrolling="no",d.setAttribute("src",n),document.getElementById("fund").appendChild(d)};</script> |
OlderNewer