Created
December 5, 2015 13:50
-
-
Save merianos/cbe9825ff243489b4b65 to your computer and use it in GitHub Desktop.
Loading custom fields in PageBuilder
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
function load_custom_fields() { | |
$base_dir = dirname( __FILE__ ) . '/fields/'; | |
foreach ( glob( $base_dir . '*.php' ) as $file ) { | |
require_once $file; | |
} | |
} | |
add_action( 'admin_init', 'load_custom_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment