';
print_r($all_options);
echo '';
}
}
add_action('wp_footer', 'example_debug_all_options');
/**
* EXAMPLE 20: Check if specific feature is enabled
*/
function example_check_feature() {
// Multiple ways to check boolean options
// Method 1: Using helper function
if (roi_is_option_enabled('enable_breadcrumbs')) {
// Breadcrumbs are enabled
}
// Method 2: Using get_option with default
if (roi_get_option('enable_related_posts', true)) {
// Related posts are enabled
}
// Method 3: Direct check
$options = roi_get_all_options();
if (isset($options['enable_lazy_loading']) && $options['enable_lazy_loading']) {
// Lazy loading is enabled
}
}