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
add_action('gform_after_submission_34', 'add_row', 10, 2); | |
function add_row($entry, $form){ | |
$email = $entry[1]; | |
// Follow this tutorial to create a GOOGLE SHEETS SCRIPT | |
// https://ctrlq.org/code/20047-gravity-forms-to-google-spreadsheet | |
$post_url = 'https://script.google.com/a/logocore.com/macros/s/GOOGLE-SHEETS-SCRIPT/exec'; | |
// Put all the form fields (names and values) in this array, comma seperated. |
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 | |
/* | |
* Plugin Name: CUSTOM FORGOT EMAILS | |
* Version: 1.01 | |
* Description: Uses a filter to change the content of 'forgot passowrd' emails that Wordpress sends out. It allows you to use HTML instead of plain text. | |
* Author: LogoCore | |
* Author URI: www.logocore.com | |
* Plugin URI: www.logocore.com | |
*/ |
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
// Retrieve a product given its slug. | |
function get_product_id_by_sku($sku = false) | |
{ | |
global $wpdb; | |
if (!$sku) return null; | |
$product_id = $wpdb->get_var($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='_sku' AND meta_value='%s' LIMIT 1", $sku)); |
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
// Path must exclude original domain. | |
// Path example "contact" | |
// Function was originally written to let users choose a custom URL on Gravity Forms. However, I didn't want to compare the form input to previous results | |
// that would let a user claim an infinite amount of URL's for themselves. Until a page is published, the form can be filled out without actually | |
// claiming a unique URL. | |
function URL_availability($path) { | |
$post = get_page_by_path($path, OBJECT, 'post'); |
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
// Currently there is an issue in our PHP server error logs. | |
// PHP Notice: is_page was called incorrectly. | |
// Conditional query tags do not work before the query is run. Before then, they always return false. | |
// This is the wrong way to call is_page. | |
// is_page() only work within template files. | |
// To use it within plugin files, you need to use it with the combination of template_redirect action hook. | |
// function wordpress_theme_enqueue_styles() { | |
// if (is_page(2072)) { |
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
var docRef=activeDocument; | |
var layerCount=docRef.layers.length; | |
alert("All ungrouped layers are now seperate layers. You are now ready to import into After Effects. "); | |
for(i=layerCount-1;i>=0;i--) // This runs for each layer. Woot Woot! | |
{ | |
var currLayer=docRef.layers[i]; | |
if(currLayer.layers.length>0){ | |
for(j=currLayer.layers.length-1;j>=0;j--){ | |
currLayer.layers[j].move(currLayer,ElementPlacement.PLACEAFTER); | |
} |
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
function custom_price_shortcode( $atts ) { | |
$atts = shortcode_atts( array( | |
'id' => null, | |
), $atts, 'product_price' ); | |
if( intval( $atts['id'] ) > 0 && function_exists( 'wc_get_product' ) ){ | |
// Get an instance of the WC_Product object | |
$product = wc_get_product( intval( $atts['id'] ) ); |
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
import csv | |
import time | |
import json | |
import requests | |
file_location = 'email-verify.csv' | |
print("Do not Close file or End Process.") | |
with open(file_location) as f_obj: |
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
/*Afghanistan*/ | |
'AF' => | |
/*Aland Islands*/ | |
'AX' => | |
/*Albania*/ | |
'AL' => | |
/*Algeria*/ | |
'DZ' => | |
/*American Samoa*/ | |
'AS' => |
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
$headers = array( | |
'User-Agent' => 'Stripe Connect' | |
); | |
$response = wp_remote_post( $endpoint, array( | |
'headers' => $headers, | |
'body' => http_build_query( $data ), | |
) | |
); |
OlderNewer