Skip to content

Instantly share code, notes, and snippets.

Avatar
🧚‍♂️

Janw Oostendorp janw-me

🧚‍♂️
View GitHub Profile
View env-config.php
<?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 Sep 19, 2019
Gravity Forms IBAN
View gform-iban.php
<?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
Foreach & for performance test
View looptest.php
<?php
echo '<pre>';
$test_array = array();
for ( $i = 0; $i <= 10000; $i ++ ) {
$test_array[] = [
'index' => $i,
'include' => ( $i % 3 === 0 ) ? true : false,
];
}