Skip to content

Instantly share code, notes, and snippets.

View akamola's full-sized avatar

Arne akamola

View GitHub Profile
@akamola
akamola / README.md
Last active May 13, 2021 05:09
PHP: Quick Helper Functions

PHP: Quick Helper Functions

This is a small collection of quick helper functions for debugging and working with PHP.

Functions

axyz_d()

axyz_d( $var )
@akamola
akamola / functions.php
Created February 16, 2021 09:06
WordPress + Advanced Custom Fields Pro: Enable Google Maps API
<?php
// Add this code to the themes functions.php
const GOOGLE_MAPS_API_KEY = 'Your Google Maps API Key';
// Ensure Advanced Custom Fields Pro (ACF Pro) is enabled
//
// Check if plugin is enabled without additionally include the plugin manager for is_plugin_active()
// @see https://developer.wordpress.org/reference/functions/is_plugin_active/#comment-2427
if ( in_array( 'advanced-custom-fields-pro/acf.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {