Skip to content

Instantly share code, notes, and snippets.

View janw-me's full-sized avatar
🧚‍♂️

Janw Oostendorp janw-me

🧚‍♂️
View GitHub Profile
<?php
/**
* Remove an object filter.
*
* @param string $tag Hook name.
* @param string|array $callback Class name or array with class and method.
* @param string|int|void $priority Priority, leave empty for all.
* @return bool true if removed, false if not.
*
* @link https://wordpress.stackexchange.com/a/140989
<?php
// Valid values: development, staging and production. To get this value use: wp_get_environment_type()
defined( 'WP_ENVIRONMENT_TYPE' ) or define( 'WP_ENVIRONMENT_TYPE', 'production' );
define('DB_NAME', 'fill in db name');
define('DB_USER', 'fill in username');
define('DB_PASSWORD', 'fill in db password');
define('DB_HOST', 'localhost');
@janw-me
janw-me / gform-iban.php
Created September 19, 2019 07:56
Gravity Forms IBAN
<?php
/*
Plugin Name: Gravity Forms IBAN
Plugin URI: https://wordpress.org/plugins/gravity-forms-iban/
Description: Adds an IBAN mask and IBAN validation to Gravity Forms.
Author: Admium and Jeroen Schmit, Slim & Dapper
Version: 1.0
Author URI: www.admium.nl
GitHub Plugin URI: AdmiumNL/adm-gravity-iban
*/
@janw-me
janw-me / looptest.php
Last active May 23, 2019 10:05
Foreach & for performance test
<?php
echo '<pre>';
$test_array = array();
for ( $i = 0; $i <= 10000; $i ++ ) {
$test_array[] = [
'index' => $i,
'include' => ( $i % 3 === 0 ) ? true : false,
];
}
@janw-me
janw-me / xhgui.vvv.test.txt
Last active May 20, 2019 08:10
xhgui.vvv.test error