Skip to content

Instantly share code, notes, and snippets.

@neojp
Created October 9, 2012 15:49
Show Gist options
  • Save neojp/3859669 to your computer and use it in GitHub Desktop.
Save neojp/3859669 to your computer and use it in GitHub Desktop.
Wordpress CSS Classes - Widget Context support
// http://wordpress.org/extend/plugins/widget-css-classes/developers/
// widget-css-classes/includes/widget-css-classes.class.php - Line 97
// if Widget Logic plugin is enabled, use it's callback
if ( in_array( 'widget-logic/widget_logic.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
$widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name );
// if Widget Context plugin is enabled, use it's callback
} elseif ( in_array( 'widget-context/widget-context.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
$widget_opt = get_option( $widget_obj['callback_original_wc'][0]->option_name );
// Default callback
} else {
$widget_opt = get_option( $widget_obj['callback'][0]->option_name );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment