Skip to content

Instantly share code, notes, and snippets.

View zackeryfretty's full-sized avatar

Zackery Fretty zackeryfretty

View GitHub Profile
@Pross
Pross / functions.php
Created November 17, 2023 17:45
Show hook location with fl_hooks $_GET is used in Beaver Builder
<php
/**
* Show hook location with fl_hooks $_GET is used.
*/
add_action( 'template_redirect', function() {
if ( ! isset( $_REQUEST['fl_hooks'] ) ) {
return false;
}
@psaikali
psaikali / acf-gravity-forms-field.php
Created January 4, 2019 13:43
Populate ACF select field options with Gravity Forms to select a specific form
<?php
/**
* Populate ACF select field options with Gravity Forms forms
*/
function acf_populate_gf_forms_ids( $field ) {
if ( class_exists( 'GFFormsModel' ) ) {
$choices = [];
foreach ( \GFFormsModel::get_forms() as $form ) {
$choices[ $form->id ] = $form->title;