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 to replace text in Google Slides with Google Sheet values | |
* @reference https://hudsonatwell.co/2020/10/03/how-to-use-google-slides-to-autogenerate-featured-images/ | |
*/ | |
function generate_featured_image() { | |
/* get spreadsheet from public view link */ | |
var dataSpreadsheetUrl = "https://docs.google.com/spreadsheets/d/1necmbNPUsGJ3fwNiFpgNLbtH6c2RmJDwIQCPuhAfA7s/edit"; //make sure this includes the '/edit at the end | |
var ss = SpreadsheetApp.openByUrl(dataSpreadsheetUrl); | |
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 | |
/** | |
* @credits https://jeroensormani.com/adding-a-custom-woocommerce-product-type/ | |
*/ | |
//error_reporting(E_ALL); | |
//ini_set('display_errors', 1); | |
add_action('init' , 'wc_pm_load_product_type'); | |
function wc_pm_load_product_type() { | |
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 | |
/** | |
* Redirect admins to the dashboard and other users to //kmizs.com/user/ | |
*/ | |
add_filter( 'login_redirect', 'codeable_custom_login_redirect', 11, 3 ); | |
function codeable_custom_login_redirect( $redirect_to, $request, $user ) { | |
if ( is_array( $user->roles ) ) { | |
if ( in_array( 'administrator', $user->roles ) ) { |
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 | |
/** | |
* | |
*/ | |
public static function get_rule_logs( $query ) { | |
if (!isset($query['rule_id']) || !$query['rule_id']) { | |
return []; | |
} |
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 | |
/* | |
* | |
*/ | |
public function get_special_logs( $query ) { | |
if (!isset($query['special_id']) || !$query['special_id']) { | |
return []; | |
} |
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 (!defined('ABSPATH')) exit; | |
/** | |
* Class NF_Action_Save | |
*/ | |
if (class_exists('NF_Abstracts_Action')) { | |
final class NF_Actions_Inbound_Store_Lead extends NF_Abstracts_Action { | |
/** | |
* @var string |
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 | |
class ChildTheme { | |
/** | |
* | |
*/ | |
public function __construct() { | |
$this->load_hooks(); | |
} |
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 | |
namespace Example\Register\Taxonomy; | |
class Profile_Tag { | |
static $taxonomy_name; | |
/** | |
* Initialize Profile_Tag class |
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 | |
$UK = array( | |
'England' => array( | |
'Abingdon', | |
'Accrington', | |
'Acton', | |
'Adlington', | |
'Alcester', |
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 | |
/* This example seeks to help developers understand how to access the /leads/ endpoint. | |
* | |
*/ | |
if ( !class_exists( 'Example_API_Calls' )) { | |
class Example_API_Calls { |
NewerOlder