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 | |
/* | |
Place in theme's functions.php or /wp-content/mu-plugins folder | |
Assumes: | |
- PHP 7 | |
- WP 5.2 | |
- Gravity Forms | |
- Edit this file for the appropriate invite code => gform_id relationships (lines 32-37) | |
- Edit this file for the appropriate invite code user meta key (line 41) | |
*/ |
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 | |
// Sample code for reference | |
global $wpdb; | |
$year = (int) ( $_GET['year'] ?? date_i18n( 'Y' ) ); | |
$sql = "SELECT * FROM transactions WHERE DATE( datetime_created ) LIKE %s"; | |
$sql = $wpdb->prepare( $sql, $year . '-01-%' ); |
NewerOlder