Skip to content

Instantly share code, notes, and snippets.

@shaunandrews
Created December 16, 2013 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaunandrews/7989121 to your computer and use it in GitHub Desktop.
Save shaunandrews/7989121 to your computer and use it in GitHub Desktop.
Making wp_widget_control() pluggable for the Better Widgets 0.2 plugin.
Index: src/wp-admin/includes/widgets.php
===================================================================
--- src/wp-admin/includes/widgets.php (revision 26862)
+++ src/wp-admin/includes/widgets.php (working copy)
@@ -136,6 +136,7 @@
return $number;
}
+if( ! function_exists('wp_widget_control') ) :
/**
* Meta widget used to display the control form for a widget.
*
@@ -239,3 +240,4 @@
echo $sidebar_args['after_widget'];
return $sidebar_args;
}
+endif;
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment