Skip to content

Instantly share code, notes, and snippets.

View bmdinteractive's full-sized avatar

Brian Douglas bmdinteractive

View GitHub Profile
@bmdinteractive
bmdinteractive / acf-ninja-form-dropdown.php
Created August 6, 2017 22:41
Load All Ninja Forms into Advance Custom Fields Dropdown
function acf_load_ninja_form_field_choices( $field ) {
// reset choices
$field['choices'] = array();
$ninja_forms = Ninja_Forms()->form()->get_forms();
foreach($ninja_forms as $nf):
$value = '[ninja_forms id='.$nf->get_id().']';
$nf_settings = $nf->get_settings();
$label = $nf_settings['title'];
@bmdinteractive
bmdinteractive / custom-search-acf-wordpress.php
Last active May 6, 2016 10:14 — forked from jserrao/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request. I updated this original script with better documentation and XSS / SQL injection support.
/*
##############################
########### Search ###########
##############################
*/
/**
*
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]