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 | |
// Load WordPress environment | |
require_once('wp-load.php'); | |
// Function to fetch JSON data from a URL | |
function fetch_json_data($url) { | |
$response = file_get_contents($url); | |
if ($response === FALSE) { | |
die("Error: Unable to fetch data from $url\n"); | |
} |
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
# WP Config Settings | |
wp config set AUTOMATIC_UPDATER_DISABLED true | |
wp config set CORE_UPGRADE_SKIP_NEW_BUNDLED true | |
# Changing Site URL to https | |
wp option get siteurl | sed "s/http:/https:/g" | xargs -I {} wp option update siteurl {} | |
wp option get home | sed "s/http:/https:/g" | xargs -I {} wp option update home {} | |
# Install themes & plugins |
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 xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
<head> | |
<title> | |
</title> | |
<!--[if !mso]><!-- --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!--<![endif]--> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-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 | |
header('Content-type: application/json'); | |
if( isset($_GET['list_uid']) && isset($_GET['api_token']) && isset($_GET['EMAIL']) ){ | |
$list_uid = $_GET['list_uid']; | |
$api_token = $_GET['api_token']; | |
$email = $_GET['EMAIL']; | |
$request_uri = $_SERVER['HTTP_REFERER']; |
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($){ | |
function validateEmail(str) { | |
var lastAtPos = str.lastIndexOf('@'); | |
var lastDotPos = str.lastIndexOf('.'); | |
return (lastAtPos < lastDotPos && lastAtPos > 0 && str.indexOf('@@') == -1 && lastDotPos > 2 && (str.length - lastDotPos) > 2); | |
} | |
$(document).ready(function(el){ |
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 | |
$button_text = 'I am in!'; | |
$error = 'Please enter valid email address'; | |
$email_exists_msg = 'This email is taken, please use another.'; | |
$welcome_msg = 'Congratulations, your registration is sucessful!'; | |
?> | |
<div style="max-width:400px;display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;align-items:center;" id="ssrm-list-main-form" data-api="{{YOUR_API_KEY}}" data-list-id="{{YOUR_LIST_ID}}"> | |
<input style="padding:10px 20px;" class="form-control" type="email" name="sub_email" /> | |
<button type="button" id="ssrm-main-subscribe"><?php echo $button_text; ?></button> |
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 | |
add_shortcode('simple-test', function(){ | |
$st_data = 'data'; | |
return $st_data; | |
}); | |
?> |
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 show_meta_boxes($mb_info){ | |
// Get our repeater elements so we can do the foreach in the switch later | |
$repeater_1 = rwmb_meta('repeater_field_1_id'); | |
$repeater_2 = rwmb_meta('repeater_field_2_id'); | |
// Initialize our return value used to return the data we want depending on the case | |
$return_data = ''; |
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
/* | |
Facebook - /((http|https):\/\/|)(www\.|)facebook\.com\/[a-zA-Z0-9.]{1,}/ | |
Twitter - /((http|https):\/\/|)(www\.|)twitter\.com\/[a-zA-Z0-9.]{1,}/ | |
Instagram - /((http|https):\/\/|)(www\.|)instagram\.com\/[a-zA-Z0-9.]{1,}/ | |
IMDB url - /((http|https):\/\/|)(www\.|)imdb\.com\/[a-zA-Z0-9.]{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
* { | |
background: #000 !important; | |
color: #0f0 !important; | |
outline: solid #f00 1px !important; | |
} |