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 | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$_SERVER['CASCADE_URI'] = ''; | |
$_SERVER['CASCADE_USER'] = ''; | |
$_SERVER['CASCADE_PASS'] = ''; |
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
<cffunction name="phoneFormat"> | |
<cfargument name="phoneNumber"> | |
<cfset areacode = left(phoneNumber, 3)> | |
<cfset firstthree = mid(phoneNumber, 4, 3)> | |
<cfset lastfour = right(phoneNumber, 4)> | |
<cfreturn "(#areacode#) #firstthree#-#lastFour#"> | |
</cffunction> |
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() { | |
var isSet = function(val) { | |
return val !== null && val !== ''; | |
}; | |
var el = {{element}}; | |
var val = ( isSet(el.getAttribute('data-label')) ? el.getAttribute('data-label') : el.text ); | |
while (el && el !== document.body && !isSet(val)) { | |
el = el.parentElement; | |
val = el.getAttribute('data-label'); |
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
<!--- Webhook secrets -- yours, not mine. ---> | |
<cfset secret = ""> | |
<cftry> | |
<cfset _payload = "{}"> | |
<cfset _payload = getHttpRequestData()> | |
<cfset jsonPayload = form.payload> | |
<cfset hash = RemoveChars(_payload.headers['X-Hub-Signature'], 1, 5)> | |
<cfset payload_hash = hmac(_payload.content, secret, 'HMACSHA1')> | |
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($) { | |
$(document).on("click", ".upload_image_button", function() { | |
jQuery.data(document.body, 'prevElement', $(this).prev()); | |
window.send_to_editor = function(html) { | |
var imgurl = jQuery('img',html).attr('src'); | |
var inputText = jQuery.data(document.body, 'prevElement'); | |
if(inputText != undefined && inputText != '') |
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
/* =WordPress Core | |
-------------------------------------------------------------- */ | |
.alignnone { | |
margin: 5px 20px 20px 0; | |
} | |
.aligncenter { | |
display: block; | |
margin: 5px auto 5px auto; | |
} |
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 class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>Basic PHP Form Processing</title> | |
</head> | |
<body> | |
<h1>Basic Form</h1> | |
<?php if (empty($_POST)) : ?> |
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
/* | |
This code goes in your functions.php | |
Check your themes functions file as they may already be using this. | |
*/ | |
// Add Formats Dropdown Menu To MCE | |
add_filter( 'mce_buttons', 'mce_style_button' ); | |
if ( ! function_exists( 'mce_style_button' ) ) { | |
function mce_style_button( $buttons ) { | |
array_push( $buttons, 'styleselect' ); | |
return $buttons; |
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 divider = (i == 2) ? " | " : | |
(i > 2) ? " - " : ""; |
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 homePage = ""; | |
var pagesTitle = ""; | |
var CatTitle = ""; | |
var Level4Parent = ""; | |
@* - HOMEPAGE TITLE - *@ | |
if ( @Model.Level <= 1 && @Model.AncestorOrSelf(1).HasValue("pageTitle") ) { | |
homePage = @Model.AncestorOrSelf(1).pageTitle; } | |
else { |
NewerOlder