| 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( __('<p>You do not have permission to access this page.</p>') ); |
|---|
| 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 | | |
|---|
| 24 | | <fieldset class="options"> |
|---|
| 25 | | <legend><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></legend> |
|---|
| 26 | | <table width="100%" cellspacing="2" cellpadding="5" class="editform"> |
|---|
| 27 | | <tr valign="top"> |
|---|
| 28 | | <th scope="row"><?php _e('Site Name:') ?></th> |
|---|
| 29 | | <td> |
|---|
| 30 | | <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> |
|---|
| 31 | | <br /> |
|---|
| 32 | | <?php _e('What you would like to call this website.') ?> |
|---|
| 33 | | </td> |
|---|
| 34 | | </tr> |
|---|
| 35 | | |
|---|
| 36 | | <tr valign="top"> |
|---|
| 37 | | <th scope="row"><?php _e('Site Admin Email:') ?></th> |
|---|
| 38 | | <td> |
|---|
| 39 | | <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> |
|---|
| 40 | | <br /> |
|---|
| 41 | | <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> |
|---|
| 42 | | </td> |
|---|
| 43 | | </tr> |
|---|
| 44 | | |
|---|
| 45 | | <tr valign="top"> |
|---|
| 46 | | <th scope="row"><?php _e('Allow new registrations') ?></th> |
|---|
| 47 | | <?php |
|---|
| 48 | | if( !get_site_option('registration') ) |
|---|
| 49 | | update_site_option( 'registration', 'all' ); |
|---|
| 50 | | ?> |
|---|
| 51 | | <td> |
|---|
| 52 | | <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> |
|---|
| 53 | | <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for all. Blogs and user accounts can be created.'); ?></label><br /> |
|---|
| 54 | | <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for users only. Only user account can be created.'); ?></label><br /> |
|---|
| 55 | | <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for blogs only. Only logged in users can create new blogs.'); ?></label><br /> |
|---|
| 56 | | <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?> |
|---|
| 57 | | </td> |
|---|
| 58 | | </tr> |
|---|
| 59 | | |
|---|
| 60 | | <tr valign="top"> |
|---|
| 61 | | <th scope="row"><?php _e('Registration notification') ?></th> |
|---|
| 62 | | <?php |
|---|
| 63 | | if( !get_site_option('registrationnotification') ) |
|---|
| 64 | | update_site_option( 'registrationnotification', 'yes' ); |
|---|
| 65 | | ?> |
|---|
| 66 | | <td> |
|---|
| 67 | | <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> |
|---|
| 68 | | <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> |
|---|
| 69 | | <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> |
|---|
| 70 | | </td> |
|---|
| 71 | | </tr> |
|---|
| 72 | | |
|---|
| 73 | | <tr valign="top"> |
|---|
| 74 | | <th scope="row"><?php _e('Welcome Email:') ?></th> |
|---|
| 75 | | <td> |
|---|
| 76 | | <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> |
|---|
| 77 | | <br /> |
|---|
| 78 | | <?php _e('The welcome email sent to new blog owners.') ?> |
|---|
| 79 | | </td> |
|---|
| 80 | | </tr> |
|---|
| 81 | | |
|---|
| 82 | | <tr valign="top"> |
|---|
| 83 | | <th scope="row"><?php _e('First Post:') ?></th> |
|---|
| 84 | | <td> |
|---|
| 85 | | <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> |
|---|
| 86 | | <br /> |
|---|
| 87 | | <?php _e('First post on a new blog.') ?> |
|---|
| 88 | | </td> |
|---|
| 89 | | </tr> |
|---|
| 90 | | |
|---|
| 91 | | <tr valign="top"> |
|---|
| 92 | | <th scope="row"><?php _e('Banned Names:') ?></th> |
|---|
| 93 | | <td> |
|---|
| 94 | | <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> |
|---|
| 95 | | <br /> |
|---|
| 96 | | <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> |
|---|
| 97 | | </td> |
|---|
| 98 | | </tr> |
|---|
| 99 | | |
|---|
| 100 | | <tr valign="top"> |
|---|
| 101 | | <th scope="row"><?php _e('Limited Email Registrations:') ?></th> |
|---|
| 102 | | <td> |
|---|
| 103 | | <input name="limited_email_domains" type="text" id="limited_email_domains" style="width: 95%" value="<?php echo get_site_option('limited_email_domains') == '' ? '' : @implode( " ", get_site_option('limited_email_domains') ); ?>" size="45" /> |
|---|
| 104 | | <br /> |
|---|
| 105 | | <?php _e('If you want to limit blog registrations to certain domains. Separate domains by spaces.') ?> |
|---|
| 106 | | </td> |
|---|
| 107 | | </tr> |
|---|
| 108 | | |
|---|
| 109 | | <tr valign="top"> |
|---|
| 110 | | <th scope="row"><?php _e('Banned Email Domains:') ?></th> |
|---|
| 111 | | <td> |
|---|
| 112 | | <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> |
|---|
| 113 | | <br /> |
|---|
| 114 | | <?php _e('If you want to ban certain email domains from blog registrations. One domain per line.') ?> |
|---|
| 115 | | </td> |
|---|
| 116 | | </tr> |
|---|
| 117 | | |
|---|
| 118 | | <tr valign="top"> |
|---|
| 119 | | <th scope="row"><?php _e('Blog upload space:') ?></th> |
|---|
| 120 | | <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> |
|---|
| 121 | | </tr> |
|---|
| 122 | | |
|---|
| 123 | | <tr valign="top"> |
|---|
| 124 | | <th scope="row"><?php _e('Upload File Types:') ?></th> |
|---|
| 125 | | <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> |
|---|
| 126 | | </tr> |
|---|
| 127 | | |
|---|
| 128 | | <tr valign="top"> |
|---|
| 129 | | <th scope="row"><?php _e('Max upload file size:') ?></th> |
|---|
| 130 | | <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td> |
|---|
| 131 | | </tr> |
|---|
| 132 | | </table> |
|---|
| 133 | | </fieldset> |
|---|
| 134 | | |
|---|
| 135 | | <fieldset class="options"> |
|---|
| 136 | | <legend><?php _e('Administration Settings') ?></legend> |
|---|
| 137 | | <table width="100%" cellspacing="2" cellpadding="5" class="editform"> |
|---|
| 138 | | <tr valign="top"> |
|---|
| 139 | | <th scope="row"><?php _e('Site Admins:') ?></th> |
|---|
| 140 | | <td> |
|---|
| 141 | | <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" /> |
|---|
| 142 | | <br /> |
|---|
| 143 | | <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?> |
|---|
| 144 | | </td> |
|---|
| 145 | | </tr> |
|---|
| 146 | | </table> |
|---|
| 147 | | </fieldset> |
|---|
| 148 | | |
|---|
| 149 | | <fieldset class="options"> |
|---|
| 150 | | <legend><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></legend> |
|---|
| 151 | | <table width="100%" cellspacing="2" cellpadding="5" class="editform"> |
|---|
| 152 | | <?php |
|---|
| 153 | | $lang_files = glob( ABSPATH . LANGDIR . '/*.mo' ); |
|---|
| 154 | | $lang = get_site_option('WPLANG'); |
|---|
| 155 | | if( is_array( $lang_files ) ) { |
|---|
| 156 | | ?> |
|---|
| 157 | | <tr valign="top"> |
|---|
| 158 | | <th width="33%" scope="row"><?php _e('Default Language:') ?></th> |
|---|
| 159 | | <td> |
|---|
| 160 | | <select name="WPLANG" id="WPLANG"> |
|---|
| 161 | | <?php |
|---|
| 162 | | echo '<option value=""'.((empty($lang)) ? ' selected="selected"' : '').'>'.__('English')."</option>"; |
|---|
| 163 | | foreach ( (array) $lang_files as $key => $val ) { |
|---|
| 164 | | $code_lang = basename( $val, '.mo' ); |
|---|
| 165 | | echo '<option value="'.$code_lang.'"'.(($lang == $code_lang) ? ' selected="selected"' : '').'> '.format_code_lang($code_lang).'</option>'; |
|---|
| 166 | | } |
|---|
| 167 | | ?> |
|---|
| 168 | | </select> |
|---|
| 169 | | </td> |
|---|
| 170 | | </tr> |
|---|
| 171 | | <?php |
|---|
| 172 | | } // languages |
|---|
| 173 | | ?> |
|---|
| 174 | | </table> |
|---|
| 175 | | </fieldset> |
|---|
| 176 | | |
|---|
| 177 | | <fieldset class="options"> |
|---|
| 178 | | <legend><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></legend> |
|---|
| 179 | | <table cellspacing="2" cellpadding="5" class="editform"> |
|---|
| 180 | | <tr> |
|---|
| 181 | | <th scope='row'><?php _e("Menu"); ?></th> |
|---|
| 182 | | <th scope='row'><?php _e("Enabled"); ?></th> |
|---|
| 183 | | </tr> |
|---|
| 184 | | <?php |
|---|
| 185 | | $menu_perms = get_site_option( "menu_items" ); |
|---|
| 186 | | $menu_items = array('plugins'); |
|---|
| 187 | | foreach ( (array) $menu_items as $key => $val ) { |
|---|
| 188 | | $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; |
|---|
| 189 | | echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>"; |
|---|
| 190 | | } |
|---|
| 191 | | ?> |
|---|
| 192 | | </table> |
|---|
| 193 | | </fieldset> |
|---|
| 194 | | |
|---|
| 195 | | <?php |
|---|
| 196 | | // Add more options here |
|---|
| 197 | | do_action( 'wpmu_options' ); |
|---|
| 198 | | ?> |
|---|
| 199 | | |
|---|
| 200 | | <p class="submit"> |
|---|
| 201 | | <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> |
|---|
| 202 | | </form> |
|---|
| 203 | | </div> |
|---|
| 204 | | |
|---|
| 205 | | <?php include('./admin-footer.php'); ?> |
|---|
| | 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( __('<p>You do not have permission to access this page.</p>') ); |
|---|
| | 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 | |
|---|
| | 24 | <h3><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></h3> |
|---|
| | 25 | <table class="form-table"> |
|---|
| | 26 | <tr valign="top"> |
|---|
| | 27 | <th scope="row"><?php _e('Site Name') ?></th> |
|---|
| | 28 | <td> |
|---|
| | 29 | <input name="site_name" type="text" id="site_name" style="width: 95%" value="<?php echo $current_site->site_name ?>" size="45" /> |
|---|
| | 30 | <br /> |
|---|
| | 31 | <?php _e('What you would like to call this website.') ?> |
|---|
| | 32 | </td> |
|---|
| | 33 | </tr> |
|---|
| | 34 | |
|---|
| | 35 | <tr valign="top"> |
|---|
| | 36 | <th scope="row"><?php _e('Site Admin Email') ?></th> |
|---|
| | 37 | <td> |
|---|
| | 38 | <input name="admin_email" type="text" id="admin_email" style="width: 95%" value="<?php echo stripslashes( get_site_option('admin_email') ) ?>" size="45" /> |
|---|
| | 39 | <br /> |
|---|
| | 40 | <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?> |
|---|
| | 41 | </td> |
|---|
| | 42 | </tr> |
|---|
| | 43 | |
|---|
| | 44 | <tr valign="top"> |
|---|
| | 45 | <th scope="row"><?php _e('Allow new registrations') ?></th> |
|---|
| | 46 | <?php |
|---|
| | 47 | if( !get_site_option('registration') ) |
|---|
| | 48 | update_site_option( 'registration', 'all' ); |
|---|
| | 49 | ?> |
|---|
| | 50 | <td> |
|---|
| | 51 | <label><input name="registration" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked="checked"' : ''; ?> /> <?php _e('Disabled'); ?></label><br /> |
|---|
| | 52 | <label><input name="registration" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for all. Blogs and user accounts can be created.'); ?></label><br /> |
|---|
| | 53 | <label><input name="registration" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for users only. Only user account can be created.'); ?></label><br /> |
|---|
| | 54 | <label><input name="registration" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked="checked"' : ''; ?> /> <?php _e('Enabled for blogs only. Only logged in users can create new blogs.'); ?></label><br /> |
|---|
| | 55 | <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?> |
|---|
| | 56 | </td> |
|---|
| | 57 | </tr> |
|---|
| | 58 | |
|---|
| | 59 | <tr valign="top"> |
|---|
| | 60 | <th scope="row"><?php _e('Registration notification') ?></th> |
|---|
| | 61 | <?php |
|---|
| | 62 | if( !get_site_option('registrationnotification') ) |
|---|
| | 63 | update_site_option( 'registrationnotification', 'yes' ); |
|---|
| | 64 | ?> |
|---|
| | 65 | <td> |
|---|
| | 66 | <input name="registrationnotification" type="radio" id="registrationnotification1" value='yes' <?php echo get_site_option('registrationnotification') == 'yes' ? 'checked="checked"' : ''; ?> /> <?php _e('Yes'); ?><br /> |
|---|
| | 67 | <input name="registrationnotification" type="radio" id="registrationnotification2" value='no' <?php echo get_site_option('registrationnotification') == 'no' ? 'checked="checked"' : ''; ?> /> <?php _e('No'); ?><br /> |
|---|
| | 68 | <?php _e('Send the site admin an email notification every time someone registers a blog or user account.') ?> |
|---|
| | 69 | </td> |
|---|
| | 70 | </tr> |
|---|
| | 71 | |
|---|
| | 72 | <tr valign="top"> |
|---|
| | 73 | <th scope="row"><?php _e('Welcome Email') ?></th> |
|---|
| | 74 | <td> |
|---|
| | 75 | <textarea name="welcome_email" id="welcome_email" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('welcome_email') ) ?></textarea> |
|---|
| | 76 | <br /> |
|---|
| | 77 | <?php _e('The welcome email sent to new blog owners.') ?> |
|---|
| | 78 | </td> |
|---|
| | 79 | </tr> |
|---|
| | 80 | |
|---|
| | 81 | <tr valign="top"> |
|---|
| | 82 | <th scope="row"><?php _e('First Post') ?></th> |
|---|
| | 83 | <td> |
|---|
| | 84 | <textarea name="first_post" id="first_post" rows='5' cols='45' style="width: 95%"><?php echo stripslashes( get_site_option('first_post') ) ?></textarea> |
|---|
| | 85 | <br /> |
|---|
| | 86 | <?php _e('First post on a new blog.') ?> |
|---|
| | 87 | </td> |
|---|
| | 88 | </tr> |
|---|
| | 89 | |
|---|
| | 90 | <tr valign="top"> |
|---|
| | 91 | <th scope="row"><?php _e('Banned Names') ?></th> |
|---|
| | 92 | <td> |
|---|
| | 93 | <input name="illegal_names" type="text" id="illegal_names" style="width: 95%" value="<?php echo implode( " ", get_site_option('illegal_names') ); ?>" size="45" /> |
|---|
| | 94 | <br /> |
|---|
| | 95 | <?php _e('Users are not allowed to register these blogs. Separate names by spaces.') ?> |
|---|
| | 96 | </td> |
|---|
| | 97 | </tr> |
|---|
| | 98 | |
|---|
| | 99 | <tr valign="top"> |
|---|
| | 100 | <th scope="row"><?php _e('Limited Email Registrations') ?></th> |
|---|
| | 101 | <td> |
|---|
| | 102 | <input name="limited_email_domains" type="text" id="limited_email_domains" style="width: 95%" value="<?php echo get_site_option('limited_email_domains') == '' ? '' : @implode( " ", get_site_option('limited_email_domains') ); ?>" size="45" /> |
|---|
| | 103 | <br /> |
|---|
| | 104 | <?php _e('If you want to limit blog registrations to certain domains. Separate domains by spaces.') ?> |
|---|
| | 105 | </td> |
|---|
| | 106 | </tr> |
|---|
| | 107 | |
|---|
| | 108 | <tr valign="top"> |
|---|
| | 109 | <th scope="row"><?php _e('Banned Email Domains') ?></th> |
|---|
| | 110 | <td> |
|---|
| | 111 | <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> |
|---|
| | 112 | <br /> |
|---|
| | 113 | <?php _e('If you want to ban certain email domains from blog registrations. One domain per line.') ?> |
|---|
| | 114 | </td> |
|---|
| | 115 | </tr> |
|---|
| | 116 | |
|---|
| | 117 | <tr valign="top"> |
|---|
| | 118 | <th scope="row"><?php _e('Blog upload space') ?></th> |
|---|
| | 119 | <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> |
|---|
| | 120 | </tr> |
|---|
| | 121 | |
|---|
| | 122 | <tr valign="top"> |
|---|
| | 123 | <th scope="row"><?php _e('Upload File Types') ?></th> |
|---|
| | 124 | <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> |
|---|
| | 125 | </tr> |
|---|
| | 126 | |
|---|
| | 127 | <tr valign="top"> |
|---|
| | 128 | <th scope="row"><?php _e('Max upload file size') ?></th> |
|---|
| | 129 | <td><input name="fileupload_maxk" type="text" id="fileupload_maxk" value="<?php echo get_site_option('fileupload_maxk', 300) ?>" size="5" /> KB</td> |
|---|
| | 130 | </tr> |
|---|
| | 131 | </table> |
|---|
| | 132 | |
|---|
| | 133 | <h3><?php _e('Administration Settings') ?></h3> |
|---|
| | 134 | <table class="form-table"> |
|---|
| | 135 | <tr valign="top"> |
|---|
| | 136 | <th scope="row"><?php _e('Site Admins') ?></th> |
|---|
| | 137 | <td> |
|---|
| | 138 | <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" /> |
|---|
| | 139 | <br /> |
|---|
| | 140 | <?php _e('These users may login to the main blog and administer the site. Space separated list of usernames.') ?> |
|---|
| | 141 | </td> |
|---|
| | 142 | </tr> |
|---|
| | 143 | </table> |
|---|
| | 144 | |
|---|
| | 145 | <h3><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></h3> |
|---|
| | 146 | <table class="form-table"> |
|---|
| | 147 | <?php |
|---|
| | 148 | $lang_files = glob( ABSPATH . LANGDIR . '/*.mo' ); |
|---|
| | 149 | $lang = get_site_option('WPLANG'); |
|---|
| | 150 | if( is_array( $lang_files ) ) { |
|---|
| | 151 | ?> |
|---|
| | 152 | <tr valign="top"> |
|---|
| | 153 | <th width="33%"><?php _e('Default Language') ?></th> |
|---|
| | 154 | <td> |
|---|
| | 155 | <select name="WPLANG" id="WPLANG"> |
|---|
| | 156 | <?php |
|---|
| | 157 | echo '<option value=""'.((empty($lang)) ? ' selected="selected"' : '').'>'.__('English')."</option>"; |
|---|
| | 158 | foreach ( (array) $lang_files as $key => $val ) { |
|---|
| | 159 | $code_lang = basename( $val, '.mo' ); |
|---|
| | 160 | echo '<option value="'.$code_lang.'"'.(($lang == $code_lang) ? ' selected="selected"' : '').'> '.format_code_lang($code_lang).'</option>'; |
|---|
| | 161 | } |
|---|
| | 162 | ?> |
|---|
| | 163 | </select> |
|---|
| | 164 | </td> |
|---|
| | 165 | </tr> |
|---|
| | 166 | <?php |
|---|
| | 167 | } // languages |
|---|
| | 168 | ?> |
|---|
| | 169 | </table> |
|---|
| | 170 | |
|---|
| | 171 | <h3><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></h3> |
|---|
| | 172 | <table class="form-table"> |
|---|
| | 173 | <tr> |
|---|
| | 174 | <th scope="row"><?php _e("Menu"); ?></th> |
|---|
| | 175 | <th scope="row"><?php _e("Enabled"); ?></th> |
|---|
| | 176 | </tr> |
|---|
| | 177 | <?php |
|---|
| | 178 | $menu_perms = get_site_option( "menu_items" ); |
|---|
| | 179 | $menu_items = array('plugins'); |
|---|
| | 180 | foreach ( (array) $menu_items as $key => $val ) { |
|---|
| | 181 | $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; |
|---|
| | 182 | echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>"; |
|---|
| | 183 | } |
|---|
| | 184 | ?> |
|---|
| | 185 | </table> |
|---|
| | 186 | |
|---|
| | 187 | <?php do_action( 'wpmu_options' ); // Add more options here ?> |
|---|
| | 188 | |
|---|
| | 189 | <p class="submit"> |
|---|
| | 190 | <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p> |
|---|
| | 191 | </form> |
|---|
| | 192 | </div> |
|---|
| | 193 | |
|---|
| | 194 | <?php include('./admin-footer.php'); ?> |