From b0bfc398bd139923d6dc9a8a4071b1999d35ee84 Mon Sep 17 00:00:00 2001 From: Ben Keith Date: Mon, 24 Oct 2016 20:02:30 -0400 Subject: [PATCH] Add error message about using of_get_option without an initialized options framework --- lib/options-framework/options-framework.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/options-framework/options-framework.php b/lib/options-framework/options-framework.php index fadc61cc0..61e6f034f 100644 --- a/lib/options-framework/options-framework.php +++ b/lib/options-framework/options-framework.php @@ -396,6 +396,8 @@ function of_get_option( $name, $default = false ) { $config = get_option( 'optionsframework' ); if ( ! isset( $config['id'] ) ) { + var_log( "It looks like you are calling of_get_option on a site that has not initialized the options framework. Running `get_option( 'optionsframework' )` returns the following value, which does not have an index 'id' or is not an array:"); + var_log( $config ); return $default; }