Add new utilities.php with a custom logging function

This commit is contained in:
Braad
2015-06-02 14:05:59 -07:00
parent 68aa66d549
commit e45223311a
2 changed files with 24 additions and 0 deletions
+3
View File
@@ -33,6 +33,9 @@ require_once dirname( __FILE__ ) . '/includes/classes/class-tgm-plugin-activatio
// Better Font Awesome Library.
require_once dirname( __FILE__ ) . '/lib/better-font-awesome-library/better-font-awesome-library.php';
// Utility functions.
require_once dirname( __FILE__ ) . '/includes/functions/utilities.php';
add_action( 'genesis_setup', 'trestle_theme_setup', 15 );
/**
+21
View File
@@ -0,0 +1,21 @@
<?php
/**
* Utility functions.
*
* @since 2.1.0
*
* @package Trestle
*/
/**
* Custom logging function for development purposes.
*/
function trestle_log( $log ) {
if ( true === WP_DEBUG ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}