From 0d58cacca67b415cb0687b8cc15f344623c97796 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 8 Feb 2010 22:17:18 +0000 Subject: [PATCH] Setup some default widgets for the default theme at install. Props azaozz. see #12163 git-svn-id: http://svn.automattic.com/wordpress/trunk@13033 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/upgrade.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 000c2a9707..3bdda13470 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -258,6 +258,15 @@ function wp_install_defaults($user_id) { 'post_content_filtered' => '' )); + // Setup default widgets for default theme. + update_option( 'widget_search', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); + update_option( 'widget_recent-posts', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) ); + update_option( 'widget_recent-comments', array ( 2 => array ( 'title' => '', 'number' => 5 ), '_multiwidget' => 1 ) ); + update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); + update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); + update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); + update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array ( ), 'primary-widget-area' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'secondary-widget-area' => array ( ), 'first-footer-widget-area' => array ( ), 'second-footer-widget-area' => array ( ), 'third-footer-widget-area' => array ( ), 'fourth-footer-widget-area' => array ( ), 'array_version' => 3 ) ); + if ( is_multisite() ) { // Flush rules to pick up the new page. $wp_rewrite->init();