Last active
August 29, 2015 14:00
-
-
Save will83/11177590 to your computer and use it in GitHub Desktop.
Wordpress function.php include function
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
<?php | |
if ( ! function_exists( 'get_function_files' ) ) { | |
function get_function_files($path){ | |
$function_files = glob($folder.$path, GLOB_BRACE); | |
foreach($function_files as $function_file){ | |
if (substr($function_file, -8) != '-off.php'){ | |
require_once($function_file); | |
} | |
} | |
} | |
} | |
get_function_files(dirname(__FILE__).'/functions/*.{php}'); | |
get_function_files(dirname(__FILE__).'/functions/*/*.{php}'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment