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
// Validate CPR-nr. | |
function is_cpr_valid($cpr) { | |
$cleaned = preg_replace("/[^0-9]/", "", $cpr); | |
if (strlen($cleaned) != 10) { | |
return FALSE; | |
} | |
$valid_dates = Array('010165', '010166', '010170', '010180', '010187', '010190'); |
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
// Validate CPR-nr. | |
function is_cpr_valid(cpr) { | |
var res = cpr.replace(/[^0-9]/ig, ""); | |
if (res.length != 10) { | |
return false; | |
} | |
var validDates = ['010165', '010166', '010170', '010180', '010187', '010190']; |
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
// Define constants | |
$cd_url = 'https://analytics-eu.clickdimensions.com/forms/h/foobar'; // copy from ClickDimensions | |
$cd_accountkey = 'foo'; // copy from ClickDimensions | |
$cd_domain = 'bar'; // copy from ClickDimensions | |
// Build fields (array) to ClickDimensions, matching keys and values | |
$fields = array( | |
'FirstName' => 'John', // retrieve from posted form | |
'LastName' => 'Doe', // retrieve from posted form | |
'Email' => '[email protected]', // retrieve from posted form |
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 id="fund" class="fund"></div> | |
<script type="text/javascript"> | |
var s = document.createElement('script'); | |
s.type = 'text/javascript'; | |
s.async = true; | |
s.src = "https://onlinefundraising.dk/js/3.5/iframe.js"; | |
var x = document.getElementsByTagName('script')[0]; | |
x.parentNode.insertBefore(s, x); | |
function OFfit() { | |
if (window.iFrameResize) { |
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
/* | |
* Force download of documents due to bug in version 1.9.4 | |
* Open bg-group-documents/include/filters.php and replace line 117-131 with this: | |
*/ | |
$file_name = basename( $doc_path ); | |
switch( strtolower( substr( strrchr( $file_name, '.' ), 1 ) ) ) { | |
case 'pdf' : $mime = 'application/pdf'; break; | |
case 'zip' : $mime = 'application/zip'; break; | |
case 'jpeg': $mime = 'image/jpg'; break; |
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 | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
global $download_base_dir; | |
$download_base_dir = dirname(__FILE__); | |
global $download_prefix; | |
$download_prefix = 'download_'; | |
function gr_download_init() { |
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 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> |
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
/* 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 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($) { | |
$.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 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
/** | |
* Browser language | |
*/ | |
if ( !function_exists('gr_language') ) { | |
function gr_language() { | |
$lang = substr( $_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2 ); | |
echo $lang; | |
} | |
} |
NewerOlder