├── .gitmodules ├── changelog.txt ├── README.md ├── languages └── defaulttheme-default.pot └── default-theme.php /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/dash-notice"] 2 | path = external/dash-notice 3 | url = git@bitbucket.org:incsub/wpmudev-dashboard-notification.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Plugin Name: Default Theme 2 | Author: Aaron Edwards 3 | 4 | Change Log: 5 | ---------------------------------------------------------------------- 6 | ---------------------------------------------------------------------- 7 | 8 | 1.0.4 - 3/10/2016 9 | ---------------------------------------------------------------------- 10 | - Fix depreciated notices 11 | 12 | 1.0.3.1 - 11/13/2015 13 | ---------------------------------------------------------------------- 14 | - Update dash notification 15 | 16 | 1.0.3.1 - 12/17/2011 17 | ---------------------------------------------------------------------- 18 | - WordPress 3.8 compatibility 19 | 20 | 1.0.3 - 3/15/2011 21 | ---------------------------------------------------------------------- 22 | - Fix Child theme support again 23 | 24 | 1.0.2 - 1/05/2011 25 | ---------------------------------------------------------------------- 26 | - WP 3.1 Compatibility 27 | - Changed install location for autoupdate ability 28 | - Fully Localized 29 | 30 | 1.0.1 - 2010-3-28 31 | ---------------------------------------------------------------------- 32 | - Child theme support 33 | 34 | 1.0.0 - 12/02/2008 35 | ---------------------------------------------------------------------- 36 | - Initial Release. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Default Theme 2 | 3 | **INACTIVE NOTICE: This plugin is unsupported by WPMUDEV, we've published it here for those technical types who might want to fork and maintain it for their needs.** 4 | 5 | ## Translations 6 | 7 | Translation files can be found at https://github.com/wpmudev/translations 8 | 9 | ## Default Theme lets you set a custom default theme for new sites on your network. 10 | 11 | ### It's Simple 12 | 13 | Once activated, visit **Network Admin > Settings**, and select the theme that you'd like to appear first up on all newly created sites. 14 | 15 | ![image](http://premium.wpmudev.org/wp-content/uploads/2008/12/default51.jpg) 16 | 17 | So now you can easily go from this! 18 | 19 | ![image](http://premium.wpmudev.org/wp-content/uploads/2008/12/default54.jpg) 20 | 21 | To this! 22 | 23 | ![image](http://premium.wpmudev.org/wp-content/uploads/2008/12/default55.jpg) 24 | 25 | Simple huh :) 26 | 27 | ## Usage 28 | 29 | For help with installing plugins please refer to our [Plugin installation guide](https://premium.wpmudev.org/wpmu-manual/installing-regular-plugins-on-wpmu/). Once installed visit **Network Admin -> Plugins** and Network Activate it. 30 | 31 | ### To use: 32 | 33 | 1.  Go to **Network Admin > Settings** 34 | 35 | 2.  Scroll down to Theme Settings. 36 | 37 | 3.  Select the theme you'd like to see appear on all newly created Sites. 38 | 39 | ![image](https://premium.wpmudev.org/wp-content/uploads/2008/12/default51.jpg) 40 | 41 | 4.  Click **Save Changes** 42 | -------------------------------------------------------------------------------- /languages/defaulttheme-default.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Default Theme 2 | # This file is distributed under the same license as the Default Theme package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Default Theme 1.0.3\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/default-theme\n" 7 | "POT-Creation-Date: 2013-10-15 07:24:25+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | 15 | #: default-theme.php:32 16 | msgid "Default Theme is only compatible with Multisite installs." 17 | msgstr "" 18 | 19 | #: default-theme.php:91 20 | msgid "Theme Settings" 21 | msgstr "" 22 | 23 | #. #-#-#-#-# defaulttheme-default.pot (Default Theme 1.0.3) #-#-#-#-# 24 | #. Plugin Name of the plugin/theme 25 | #: default-theme.php:94 26 | msgid "Default Theme" 27 | msgstr "" 28 | 29 | #: default-theme.php:103 30 | msgid "Default theme applied to new blogs." 31 | msgstr "" 32 | 33 | #: default-theme.php:121 34 | msgid "" 35 | "Please install the latest version of our free " 37 | "Update Notifications plugin which helps you stay up-to-date with the " 38 | "most stable, secure versions of WPMU DEV themes and plugins. More information »" 41 | msgstr "" 42 | 43 | #. Plugin URI of the plugin/theme 44 | msgid "http://premium.wpmudev.org/project/default-theme" 45 | msgstr "" 46 | 47 | #. Description of the plugin/theme 48 | msgid "Allows you to easily select a new default theme for new blog signups" 49 | msgstr "" 50 | 51 | #. Author of the plugin/theme 52 | msgid "Aaron Edwards (for Incsub)" 53 | msgstr "" 54 | 55 | #. Author URI of the plugin/theme 56 | msgid "http://uglyrobot.com" 57 | msgstr "" 58 | -------------------------------------------------------------------------------- /default-theme.php: -------------------------------------------------------------------------------- 1 | $theme ) { 62 | $stylesheet = esc_html( $theme['Stylesheet'] ); 63 | $template = esc_html( $theme['Template'] ); 64 | if ( $default_theme == $stylesheet || $default_theme == $template ) { 65 | $new_stylesheet = $stylesheet; 66 | $new_template = $template; 67 | } 68 | } 69 | 70 | //activate it 71 | switch_to_blog( $blog_ID ); 72 | switch_theme( $new_template, $new_stylesheet ); 73 | restore_current_blog(); 74 | } 75 | 76 | function default_theme_site_admin_options_process() { 77 | update_site_option( 'default_theme', $_POST['default_theme'] ); 78 | } 79 | 80 | //------------------------------------------------------------------------// 81 | //---Output Functions-----------------------------------------------------// 82 | //------------------------------------------------------------------------// 83 | 84 | function default_theme_site_admin_options() { 85 | 86 | $themes = wp_get_themes(); 87 | 88 | $default_theme = get_site_option( 'default_theme' ); 89 | if ( empty( $default_theme ) ) { 90 | $default_theme = 'default'; 91 | } 92 | ?> 93 |

94 | 95 | 96 | 97 | 106 | 107 |
105 |
108 | 48, 'name' => 'Default Theme', 'screens' => array( 'settings-network' ) ); 113 | include_once( plugin_dir_path( __FILE__ ) . 'external/dash-notice/wpmudev-dash-notification.php' ); 114 | --------------------------------------------------------------------------------