Skip to content

Instantly share code, notes, and snippets.

View mainiomooses's full-sized avatar
😵
<-- Constantly that

Jaakko Pöntinen mainiomooses

😵
<-- Constantly that
View GitHub Profile
@mainiomooses
mainiomooses / gf.php
Last active November 13, 2023 16:11
GFAPI::get_entries usage with is_read and is_starred field filters alongside other filters
<?php
// Correct way to use "is_read" and/or "is_starred" with GFAPI::get_entries
$search_criteria = array(
'status' => 'active',
'field_filters' => array(
'mode' => 'all',
array(
'key' => '8',
'value' => 'abc',
<?php
/**
* Debug helper, place near the top of your functions.php
* Use with write_log($var) to write $var contents into debug.log
*/
function write_log( $data ) {
if ( true === WP_DEBUG ) {
if ( is_array( $data ) || is_object( $data ) ) {
error_log( print_r( $data, true ) );
} else {