Skip to content

Instantly share code, notes, and snippets.

View dankerizer's full-sized avatar
:octocat:
kerjaTerus

Hadie Danker dankerizer

:octocat:
kerjaTerus
View GitHub Profile
@dankerizer
dankerizer / check-if-caldera-forms-is-active.php
Last active September 22, 2020 04:12 — forked from Shelob9/check-if-caldera-forms-is-active.php
Check If Caldera Form is Active or Not
<?php
/**
* function to Check if Caldera Forms is active
*/
function is_caldera_form_active(){
if (!function_exists('is_plugin_active')) {
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
if (is_plugin_active('caldera-forms/caldera-core.php') || defined('CFCORE_VER')) {
;(function () {
/**
* Run function when customizer is ready.
*/
wp.customize.bind('ready', function () {
wp.customize.control('slug_select_control', function (control) {
/**
* Run function on setting change of control.
*/
control.setting.bind(function (value) {
@dankerizer
dankerizer / delete-all.php
Created July 22, 2018 19:40 — forked from Shelob9/delete-all.php
Example code for reading, updating and deleting Caldera Forms entries. See: https://calderaforms.com/doc/edit-caldera-forms-entries-php/
<?php
//delete all saved Caldera Forms
$forms = Caldera_Forms_Forms::get_forms( false, true );
if( ! empty( $forms ) ){
foreach( $forms as $form ){
Caldera_Forms_Forms::delete_form( $form );
}
}
@dankerizer
dankerizer / gist:c09a3ff0046be3fa877c90355bbfef1d
Created July 19, 2018 18:33 — forked from mikejolley/gist:3097073
WooCommerce - Unhook/Disable emails
/**
* Code goes in functions.php or a custom plugin.
*/
add_action( 'woocommerce_email', 'unhook_those_pesky_emails' );
function unhook_those_pesky_emails( $email_class ) {
/**
* Hooks for sending emails during store events
**/
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)
License Key PhpStorm 8
User Name : EMBRACE
===== LICENSE BEGIN =====
43136-12042010
00002UsvSON704l"dILe1PVx3y4"B3
49AU6oSDJrsjE8nMOQh"8HTDJHIUUh
gd1BebYc5U"6OxDbVsALB4Eb10PW8"
===== LICENSE END =====
/*
For more detailed instructions on how to use this script, sign up with your email here:
http://adamloving.com/internet-programming/how-toexport-facebook-page-fans
DISCLOSURE: This javascript runs in your browser pretending to be you
looking through your page fans. Facebook should have no problem with this,
but who knows if they will think it is strange to see you looking through
all your fans so quickly (the script waits 3s before requesting each page).
I've had no problem running this so far for 1000s of page fans, but I
@dankerizer
dankerizer / vt_resize.php
Created September 16, 2012 16:16 — forked from seedprod/vt_resize.php
Resize WordPress images on the fly vt_resize w/ multisite support
<?php
/*
* Resize images dynamically using wp built in functions
* Victor Teixeira
*
* php 5.2+
*
* Exemplo de uso:
*
* <?php