Commit 1d1ff660 authored by Erick Hitter's avatar Erick Hitter
Browse files

An action for cleanup, and no silly check for class existence. Moar cleanup!

parent 14b5aa05
......@@ -118,6 +118,7 @@ class taxonomy_dropdown_widget_plugin {
if ( ! add_filter( 'taxonomy_dropdown_widget_run_cleanup', true ) )
return;
// Remove unused options
$legacy_options = array(
'widget_TagDropdown',
'widget_TagDropdown_exclude',
......@@ -128,6 +129,9 @@ class taxonomy_dropdown_widget_plugin {
foreach ( $legacy_options as $legacy_option ) {
delete_option( $legacy_option );
}
// Let others play too
do_action( 'taxonomy_dropdown_widget_cleanup' );
}
/**
......@@ -137,8 +141,7 @@ class taxonomy_dropdown_widget_plugin {
* @return null
*/
public function action_widgets_init() {
if ( class_exists( 'taxonomy_dropdown_widget' ) )
register_widget( 'taxonomy_dropdown_widget' );
register_widget( 'taxonomy_dropdown_widget' );
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment