| [ Root ] [ Search ] [ Index ] |
PHP Cross Reference of WordPress MU 2.9.2Provided by Yoast |
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('admin.php'); 3 $title = __('WordPress MU › Admin › Site Options'); 4 $parent_file = 'wpmu-admin.php'; 5 6 include ('admin-header.php'); 7 8 if( is_site_admin() == false ) { 9 wp_die( __('You do not have permission to access this page.') ); 10 } 11 12 if (isset($_GET['updated'])) { 13 ?> 14 <div id="message" class="updated fade"><p><?php _e('Options saved.') ?></p></div> 15 <?php 16 } 17 ?> 18 19 <div class="wrap"> 20 <h2><?php _e('Site Options') ?></h2> 21 <form method="post" action="wpmu-edit.php?action=siteoptions"> 22 <?php wp_nonce_field( "siteoptions" ); ?> 23 <h3><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></h3> 24 <table class="form-table"> 25 <tr valign="top"> 26 <th scope="row"><?php _e('Site Name') ?></th> 27 <td> 28 <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> 29 <br /> 30 <?php _e('What you would like to call this website.') ?> 31 </td> 32 </tr> 33 34 <tr valign="top"> 35 <th scope="row"><?php _e('Site Admin Email') ?></th> 36 <td> 37 <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> 38 <br /> 39 <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> 40 </td> 41 </tr> 42 43 <tr valign="top"> 44 <th scope="row"><?php _e('Allow new registrations') ?></th> 45 <?php 46 if( !get_site_option('registration') ) 47 update_site_option( 'registration', 'all' ); 48 ?> 49 <td> 50 <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> 51 <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled. Blogs and user accounts can be created.'); ?></label><br /> 52 <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Only user account can be created.'); ?></label><br /> 53 <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Only logged in users can create new blogs.'); ?></label><br /> 54 <p><?php _e('Disable or enable registration and who or what can be registered. (Default=all)'); ?></p> 55 <?php if( constant( 'VHOST' ) == 'yes' ) { 56 echo "<p>" . __('If registration is disabled, please set "NOBLOGREDIRECT" in wp-config.php to a url you will redirect visitors to if they visit a non existant blog.') . "</p>"; 57 } ?> 58 </td> 59 </tr> 60 61 <tr valign="top"> 62 <th scope="row"><?php _e('Registration notification') ?></th> 63 <?php 64 if( !get_site_option('registrationnotification') ) 65 update_site_option( 'registrationnotification', 'yes' ); 66 ?> 67 <td> 68 <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> 69 <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> 70 <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> 71 </td> 72 </tr> 73 74 <tr valign="top"> 75 <th scope="row"><?php _e('Add New Users') ?></th> 76 <td> 77 <a name='addnewusers'></a> 78 <input name="add_new_users" type="radio" id="add_new_users1" value='1' <?php echo get_site_option('add_new_users') == 1 ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> 79 <input name="add_new_users" type="radio" id="add_new_users2" value='0' <?php echo get_site_option('add_new_users') == 0 ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> 80 <?php _e('Allow blog administrators to add new users to their blog via the Users->Add New page.') ?> 81 </td> 82 </tr> 83 84 <tr valign="top"> 85 <th scope="row"><?php _e('Dashboard Blog') ?></th> 86 <td> 87 <?php 88 if ( $dashboard_blog = get_site_option( 'dashboard_blog' ) ) { 89 $details = get_blog_details( $dashboard_blog ); 90 $blogname = untrailingslashit( sanitize_user( str_replace( '.', '', str_replace( $current_site->domain . $current_site->path, '', $details->domain . $details->path ) ) ) ); 91 } else { 92 $blogname = ''; 93 }?> 94 <input name="dashboard_blog_orig" type="hidden" id="dashboard_blog_orig" value="<?php echo $blogname; ?>" /> 95 <input name="dashboard_blog" type="text" id="dashboard_blog" value="<?php echo $blogname; ?>" size="30" /> 96 <br /> 97 <?php _e( "Blogname ('dashboard', 'control', 'manager', etc) or blog id.<br />New users are added to this blog as subscribers (or the user role defined below) if they don't have a blog. Leave blank for the main blog. 'Subscriber' users on old blog will be moved to the new blog if changed. New blog will be created if it does not exist." ); ?> 98 </td> 99 </tr> 100 <tr valign="top"> 101 <th scope="row"><?php _e('Dashboard User Default Role') ?></th> 102 <td> 103 <select name="default_user_role" id="role"><?php 104 wp_dropdown_roles( get_site_option( 'default_user_role', 'subscriber' ) ); 105 ?> 106 </select> 107 <br /> 108 <?php _e( "The default role for new users on the Dashboard blog. This should probably be 'Subscriber' or maybe 'Contributor'." ); ?> 109 </td> 110 </tr> 111 112 <tr valign="top"> 113 <th scope="row"><?php _e('Banned Names') ?></th> 114 <td> 115 <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> 116 <br /> 117 <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> 118 </td> 119 </tr> 120 121 <tr valign="top"> 122 <th scope="row"><?php _e('Limited Email Registrations') ?></th> 123 <td> 124 <?php $limited_email_domains = get_site_option('limited_email_domains'); 125 $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); ?> 126 <textarea name="limited_email_domains" id="limited_email_domains" cols='40' rows='5'><?php echo $limited_email_domains == '' ? '' : @implode( "\n", $limited_email_domains ); ?></textarea> 127 <br /> 128 <?php _e('If you want to limit blog registrations to certain domains. One domain per line.') ?> 129 </td> 130 </tr> 131 132 <tr valign="top"> 133 <th scope="row"><?php _e('Banned Email Domains') ?></th> 134 <td> 135 <textarea name="banned_email_domains" id="banned_email_domains" cols='40' rows='5'><?php echo get_site_option('banned_email_domains') == '' ? '' : @implode( "\n", get_site_option('banned_email_domains') ); ?></textarea> 136 <br /> 137 <?php _e('If you want to ban certain email domains from blog registrations. One domain per line.') ?> 138 </td> 139 </tr> 140 141 <tr valign="top"> 142 <th scope="row"><?php _e('Welcome Email') ?></th> 143 <td> 144 <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> 145 <br /> 146 <?php _e('The welcome email sent to new blog owners.') ?> 147 </td> 148 </tr> 149 <tr valign="top"> 150 <th scope="row"><?php _e('Welcome User Email') ?></th> 151 <td> 152 <textarea name="welcome_user_email" id="welcome_user_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_user_email') ) ?></textarea> 153 <br /> 154 <?php _e('The welcome email sent to new users.') ?> 155 </td> 156 </tr> 157 <tr valign="top"> 158 <th scope="row"><?php _e('First Post') ?></th> 159 <td> 160 <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> 161 <br /> 162 <?php _e('First post on a new blog.') ?> 163 </td> 164 </tr> 165 <tr valign="top"> 166 <th scope="row"><?php _e('First Page') ?></th> 167 <td> 168 <textarea name="first_page" id="first_page" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_page') ) ?></textarea> 169 <br /> 170 <?php _e('First page on a new blog.') ?> 171 </td> 172 </tr> 173 <tr valign="top"> 174 <th scope="row"><?php _e('First Comment') ?></th> 175 <td> 176 <textarea name="first_comment" id="first_comment" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_comment') ) ?></textarea> 177 <br /> 178 <?php _e('First comment on a new blog.') ?> 179 </td> 180 </tr> 181 <tr valign="top"> 182 <th scope="row"><?php _e('First Comment Author') ?></th> 183 <td> 184 <input type="text" size='40' name="first_comment_author" id="first_comment_author" value="<?php echo get_site_option('first_comment_author') ?>" /> 185 <br /> 186 <?php _e('Author of first comment on a new blog.') ?> 187 </td> 188 </tr> 189 <tr valign="top"> 190 <th scope="row"><?php _e('First Comment URL') ?></th> 191 <td> 192 <input type="text" size='40' name="first_comment_url" id="first_comment_url" value="<?php echo get_site_option('first_comment_url') ?>" /> 193 <br /> 194 <?php _e('URL on first comment on a new blog.') ?> 195 </td> 196 </tr> 197 198 <tr valign="top"> 199 <th scope="row"><?php _e('Upload media button') ?></th> 200 <?php $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); ?> 201 <td><label><input type='checkbox' id="mu_media_buttons_image" name="mu_media_buttons[image]" value='1' <?php if( $mu_media_buttons[ 'image' ] ) { echo 'checked=checked '; } ?>/> <?php _e( 'Images' ); ?></label><br /> 202 <label><input type='checkbox' id="mu_media_buttons_video" name="mu_media_buttons[video]" value='1' <?php if( $mu_media_buttons[ 'video' ] ) { echo 'checked=checked '; } ?>/> <?php _e( 'Videos' ); ?></label><br /> 203 <label><input type='checkbox' id="mu_media_buttons_audio" name="mu_media_buttons[audio]" value='1' <?php if( $mu_media_buttons[ 'audio' ] ) { echo 'checked=checked '; } ?>/> <?php _e( 'Music' ); ?></label><br /> 204 <?php _e( 'The media upload buttons to display on the "Write Post" page. Make sure you update the "Upload File Types" below as well.' ); ?></td> 205 </tr> 206 <tr valign="top"> 207 <th scope="row"><?php _e('Blog upload space check') ?></th> 208 <td> 209 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='0' <?php if( !get_site_option( 'upload_space_check_disabled' ) ) { echo 'checked=checked '; } ?>/> <?php _e( 'Enabled' ); ?></label><br /> 210 <label><input type='radio' id="upload_space_check_disabled" name="upload_space_check_disabled" value='1' <?php if( get_site_option( 'upload_space_check_disabled' ) ) { echo 'checked=checked '; } ?>/> <?php _e( 'Disabled' ); ?></label><br /> 211 <?php _e( 'By default there is a limit on the total size of files uploaded but it can be disabled here.' ); ?></td> 212 </tr> 213 <tr valign="top"> 214 <th scope="row"><?php _e('Blog upload space') ?></th> 215 <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo get_site_option('blog_upload_space', 10) ?>" size="3" /> MB</td> 216 </tr> 217 218 <tr valign="top"> 219 <th scope="row"><?php _e('Upload File Types') ?></th> 220 <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo get_site_option('upload_filetypes', 'jpg jpeg png gif') ?>" size="45" /></td> 221 </tr> 222 223 <tr valign="top"> 224 <th scope="row"><?php _e('Max upload file size') ?></th> 225 <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td> 226 </tr> 227 <tr valign="top"> 228 <th scope="row"><?php _e('Admin Notice Feed') ?></th> 229 <td><input name="admin_notice_feed" style="width: 95%" type="text" id="admin_notice_feed" value="<?php echo get_site_option( 'admin_notice_feed' ) ?>" size="80" /><br /> 230 <?php _e( 'Display the latest post from this RSS or Atom feed on all blog dashboards. Leave blank to disable.' ); ?><br /> 231 <?php if( get_site_option( 'admin_notice_feed' ) != 'http://' . $current_site->domain . $current_site->path . 'feed/' ) 232 echo __( "A good one to use would be the feed from your main blog: " ) . 'http://' . $current_site->domain . $current_site->path . 'feed/'; ?></td> 233 </tr> 234 </table> 235 236 <h3><?php _e('Administration Settings') ?></h3> 237 <table class="form-table"> 238 <tr valign="top"> 239 <th scope="row"><?php _e('Site Admins') ?></th> 240 <td> 241 <input name="site_admins" type="text" id="site_admins" style="width: 95%" value="<?php echo implode(' ', get_site_option( 'site_admins', array( 'admin' ) ) ) ?>" size="45" /> 242 <br /> 243 <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?> 244 </td> 245 </tr> 246 </table> 247 248 <h3><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></h3> 249 <table class="form-table"> 250 <?php 251 if( is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) ) 252 while( ( $lang_file = readdir( $dh ) ) !== false ) 253 if( substr( $lang_file, -3 ) == '.mo' ) 254 $lang_files[] = $lang_file; 255 $lang = get_site_option('WPLANG'); 256 if( is_array($lang_files) && !empty($lang_files) ) { 257 ?> 258 <tr valign="top"> 259 <th width="33%"><?php _e('Default Language') ?></th> 260 <td> 261 <select name="WPLANG" id="WPLANG"> 262 <?php mu_dropdown_languages( $lang_files, get_site_option('WPLANG') ); ?> 263 </select> 264 </td> 265 </tr> 266 <?php 267 } // languages 268 ?> 269 </table> 270 271 <h3><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></h3> 272 <table class="form-table"> 273 <tr> 274 <th scope="row"><?php _e("Menu"); ?></th> 275 <th scope="row"><?php _e("Enabled"); ?></th> 276 </tr> 277 <a name='menu'></a> 278 <?php 279 $menu_perms = get_site_option( "menu_items" ); 280 $menu_items = apply_filters( 'mu_menu_items', array('plugins' => __('Plugins')) ); 281 foreach ( (array) $menu_items as $key => $val ) { 282 echo "<tr><th scope='row'>" . wp_specialchars($val) . "</th><td><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . (( $menu_perms[$key] == '1' ) ? ' checked="checked"' : '') . " /></td></tr>"; 283 } 284 ?> 285 </table> 286 287 <?php do_action( 'wpmu_options' ); // Add more options here ?> 288 289 <p class="submit"> 290 <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> 291 </form> 292 </div> 293 294 <?php include ('./admin-footer.php'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon May 3 12:25:32 2010 | Cross-referenced by PHPXref 0.7 |