Check basename(). see #4169

git-svn-id: http://svn.automattic.com/wordpress/trunk@5345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rob1n 2007-04-29 21:00:54 +00:00
parent 32c3de1779
commit 61059a3dc7
1 changed files with 6 additions and 3 deletions

View File

@ -1116,9 +1116,12 @@ function wp_check_mysql_version() {
function maybe_disable_automattic_widgets() { function maybe_disable_automattic_widgets() {
$plugins = __get_option( 'active_plugins' ); $plugins = __get_option( 'active_plugins' );
if ( in_array( 'widgets/widgets.php', $plugins ) ) { foreach ( $plugins as $plugin ) {
array_splice( $plugins, array_search( 'widgets/widgets.php', $plugins ), 1 ); if ( basename( $plugin ) == 'widgets.php' ) {
array_splice( $plugins, array_search( $plugin, $plugins ), 1 );
update_option( 'active_plugins', $plugins ); update_option( 'active_plugins', $plugins );
break;
}
} }
} }