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
$email_template = file_get_contents(LF_BASE_DIR.'emails/generic-email.html'); | |
$vars = array('[mail_headline]', '[banner_image_url]','[email_message]','[button_link]', '[button_text]'); | |
$vals = array('We Received Your Query!', 'https://www.evernote.com/l/AV3XAO0XEA9GZrYqCTRLH_IKrrz_HLOmmxwB/image.jpg', $user_email_data['message'],'http://liveforms.org/query-status/', 'Check Query Status'); | |
$email_message = str_replace($vars, $vals, $email_template); | |
wp_mail($email, $user_email_data['subject'], $email_message, $headers); | |
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
<!-- WPDM Link Template: Panel 1/3 --> | |
<div class="col-md-4"> | |
<div class="panel panel-default"> | |
<div class="panel-body"> | |
<div class="media"> | |
<a class="pull-left" href="[page_url]"> | |
[thumb_60x60] | |
</a> | |
<div class="media-body"> | |
<h4 class="media-heading" style="padding-top: 0px;border:0px;margin: 0px;height: 20px;overflow: hidden">[page_link]</h4> |
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 tempStorage = { | |
get: function (name) { | |
var now = Math.floor(Date.now() / 1000); | |
var _lsd = localStorage.getItem(name); | |
if(_lsd == null) return null; | |
var obj = JSON.parse(_lsd); | |
if(obj.expire >= now){ | |
return obj.data; | |
} else { | |
localStorage.removeItem(name); |
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
define('AUTH_KEY', 'put your unique phrase here'); | |
define('SECURE_AUTH_KEY', 'put your unique phrase here'); | |
define('LOGGED_IN_KEY', 'put your unique phrase here'); | |
define('NONCE_KEY', 'put your unique phrase here'); | |
define('AUTH_SALT', 'put your unique phrase here'); | |
define('SECURE_AUTH_SALT', 'put your unique phrase here'); | |
define('LOGGED_IN_SALT', 'put your unique phrase here'); | |
define('NONCE_SALT', 'put your unique phrase here'); |
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 (!class_exists('wpmps_testpay')) { | |
class wpmps_testpay { | |
var $TestMode; | |
var $GatewayUrl = "https://test.pay/purchase"; | |
var $Account; | |
var $ReturnUrl; |
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 | |
function wpdm__number_format($number, $plus = true){ | |
$origin_number = $number; | |
if($number > 1000000){ | |
$number = number_format(($number/1000000), 1); | |
$number = $origin_number > $number && $plus ? $number.'M+':$number.'M'; | |
return $number; | |
} | |
if($number > 1000){ | |
$number = number_format(($number/1000), 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
<?php | |
function wpdm_remove_search($query) { | |
if ($query->is_search) { | |
$post_type = array('post', 'page'); | |
$query->set('post_type', $post_type); | |
}; | |
return $query; | |
}; | |
add_filter('pre_get_posts', 'wpdm_remove_search'); |
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 | |
function wpdm_send_update_notification($ID, $post, $update){ | |
global $wpdb; | |
if (get_post_type() != 'wpdmpro' || wp_is_post_revision( $ID ) || $post->post_status !== 'publish') return; | |
$users = $wpdb->get_results("select uid from {$wpdb->prefix}ahm_download_stats where pid = '{$ID}' and uid != 0"); | |
$emails = []; | |
foreach ($users as $user){ | |
if((int)$user->uid > 0) | |
$emails[] = get_user_by('ID', $user->uid)->user_email; |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<form> | |
<label>Due Date</label> | |
<input type="datetime-local" id="test-date"> | |
<button id="btn" onclick='convertdate()'>Convert</button> |
OlderNewer