Changeset 42343 for trunk/src/wp-admin/options-writing.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/options-writing.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options-writing.php
r42201 r42343 10 10 require_once( dirname( __FILE__ ) . '/admin.php' ); 11 11 12 if ( ! current_user_can( 'manage_options' ) ) 12 if ( ! current_user_can( 'manage_options' ) ) { 13 13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); 14 15 $title = __('Writing Settings'); 14 } 15 16 $title = __( 'Writing Settings' ); 16 17 $parent_file = 'options-general.php'; 17 18 18 get_current_screen()->add_help_tab( array( 19 'id' => 'overview', 20 'title' => __('Overview'), 21 'content' => '<p>' . __('You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.') . '</p>' . 22 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>', 23 ) ); 19 get_current_screen()->add_help_tab( 20 array( 21 'id' => 'overview', 22 'title' => __( 'Overview' ), 23 'content' => '<p>' . __( 'You can submit content in several different ways; this screen holds the settings for all of them. The top section controls the editor within the dashboard, while the rest control external publishing methods. For more information on any of these methods, use the documentation links.' ) . '</p>' . 24 '<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>', 25 ) 26 ); 24 27 25 28 /** This filter is documented in wp-admin/options.php */ 26 29 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { 27 get_current_screen()->add_help_tab( array( 28 'id' => 'options-postemail', 29 'title' => __( 'Post Via Email' ), 30 'content' => '<p>' . __( 'Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.' ) . '</p>', 31 ) ); 30 get_current_screen()->add_help_tab( 31 array( 32 'id' => 'options-postemail', 33 'title' => __( 'Post Via Email' ), 34 'content' => '<p>' . __( 'Post via email settings allow you to send your WordPress installation an email with the content of your post. You must set up a secret email account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.' ) . '</p>', 35 ) 36 ); 32 37 } 33 38 34 39 /** This filter is documented in wp-admin/options-writing.php */ 35 40 if ( apply_filters( 'enable_update_services_configuration', true ) ) { 36 get_current_screen()->add_help_tab( array( 37 'id' => 'options-services', 38 'title' => __( 'Update Services' ), 39 'content' => '<p>' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '</p>', 40 ) ); 41 get_current_screen()->add_help_tab( 42 array( 43 'id' => 'options-services', 44 'title' => __( 'Update Services' ), 45 'content' => '<p>' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '</p>', 46 ) 47 ); 41 48 } 42 49 43 50 get_current_screen()->set_help_sidebar( 44 '<p><strong>' . __( 'For more information:') . '</strong></p>' .45 '<p>' . __( '<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>') . '</p>' .46 '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'51 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 52 '<p>' . __( '<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>' ) . '</p>' . 53 '<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>' 47 54 ); 48 55 … … 54 61 55 62 <form method="post" action="options.php"> 56 <?php settings_fields( 'writing'); ?>63 <?php settings_fields( 'writing' ); ?> 57 64 58 65 <table class="form-table"> 59 66 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> 60 67 <tr> 61 <th scope="row"><?php _e( 'Formatting')?></th>62 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting')?></span></legend>68 <th scope="row"><?php _e( 'Formatting' ); ?></th> 69 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting' ); ?></span></legend> 63 70 <label for="use_smilies"> 64 <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option('use_smilies')); ?> />65 <?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display')?></label><br />66 <label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option('use_balanceTags')); ?> /> <?php _e('WordPress should correct invalidly nested XHTML automatically')?></label>71 <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked( '1', get_option( 'use_smilies' ) ); ?> /> 72 <?php _e( 'Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display' ); ?></label><br /> 73 <label for="use_balanceTags"><input name="use_balanceTags" type="checkbox" id="use_balanceTags" value="1" <?php checked( '1', get_option( 'use_balanceTags' ) ); ?> /> <?php _e( 'WordPress should correct invalidly nested XHTML automatically' ); ?></label> 67 74 </fieldset></td> 68 75 </tr> 69 76 <?php endif; ?> 70 77 <tr> 71 <th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th> 72 <td> 73 <?php 74 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); 78 <th scope="row"><label for="default_category"><?php _e( 'Default Post Category' ); ?></label></th> 79 <td> 80 <?php 81 wp_dropdown_categories( 82 array( 83 'hide_empty' => 0, 84 'name' => 'default_category', 85 'orderby' => 'name', 86 'selected' => get_option( 'default_category' ), 87 'hierarchical' => true, 88 ) 89 ); 75 90 ?> 76 91 </td> … … 81 96 ?> 82 97 <tr> 83 <th scope="row"><label for="default_post_format"><?php _e( 'Default Post Format')?></label></th>98 <th scope="row"><label for="default_post_format"><?php _e( 'Default Post Format' ); ?></label></th> 84 99 <td> 85 100 <select name="default_post_format" id="default_post_format"> 86 101 <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option> 87 <?php foreach ( $post_formats as $format_slug => $format_name ) : ?>102 <?php foreach ( $post_formats as $format_slug => $format_name ) : ?> 88 103 <option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option> 89 104 <?php endforeach; ?> … … 95 110 ?> 96 111 <tr> 97 <th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th> 98 <td> 99 <?php 100 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_link_category', 'orderby' => 'name', 'selected' => get_option('default_link_category'), 'hierarchical' => true, 'taxonomy' => 'link_category')); 112 <th scope="row"><label for="default_link_category"><?php _e( 'Default Link Category' ); ?></label></th> 113 <td> 114 <?php 115 wp_dropdown_categories( 116 array( 117 'hide_empty' => 0, 118 'name' => 'default_link_category', 119 'orderby' => 'name', 120 'selected' => get_option( 'default_link_category' ), 121 'hierarchical' => true, 122 'taxonomy' => 'link_category', 123 ) 124 ); 101 125 ?> 102 126 </td> … … 105 129 106 130 <?php 107 do_settings_fields( 'writing', 'default');108 do_settings_fields( 'writing', 'remote_publishing'); // A deprecated section.131 do_settings_fields( 'writing', 'default' ); 132 do_settings_fields( 'writing', 'remote_publishing' ); // A deprecated section. 109 133 ?> 110 134 </table> … … 114 138 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { 115 139 ?> 116 <h2 class="title"><?php _e( 'Post via email' ) ?></h2> 117 <p><?php 140 <h2 class="title"><?php _e( 'Post via email' ); ?></h2> 141 <p> 142 <?php 118 143 printf( 119 144 /* translators: 1, 2, 3: examples of random email addresses */ … … 123 148 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ) 124 149 ); 125 ?></p> 150 ?> 151 </p> 126 152 127 153 <table class="form-table"> 128 154 <tr> 129 <th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th> 130 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" /> 131 <label for="mailserver_port"><?php _e('Port') ?></label> 132 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" /> 133 </td> 134 </tr> 135 <tr> 136 <th scope="row"><label for="mailserver_login"><?php _e('Login Name') ?></label></th> 137 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" class="regular-text ltr" /></td> 138 </tr> 139 <tr> 140 <th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th> 141 <td> 142 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" /> 143 </td> 144 </tr> 145 <tr> 146 <th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th> 147 <td> 148 <?php 149 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true)); 150 ?> 151 </td> 152 </tr> 153 <?php do_settings_fields('writing', 'post_via_email'); ?> 155 <th scope="row"><label for="mailserver_url"><?php _e( 'Mail Server' ); ?></label></th> 156 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option( 'mailserver_url' ); ?>" class="regular-text code" /> 157 <label for="mailserver_port"><?php _e( 'Port' ); ?></label> 158 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option( 'mailserver_port' ); ?>" class="small-text" /> 159 </td> 160 </tr> 161 <tr> 162 <th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ); ?></label></th> 163 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td> 164 </tr> 165 <tr> 166 <th scope="row"><label for="mailserver_pass"><?php _e( 'Password' ); ?></label></th> 167 <td> 168 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option( 'mailserver_pass' ); ?>" class="regular-text ltr" /> 169 </td> 170 </tr> 171 <tr> 172 <th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th> 173 <td> 174 <?php 175 wp_dropdown_categories( 176 array( 177 'hide_empty' => 0, 178 'name' => 'default_email_category', 179 'orderby' => 'name', 180 'selected' => get_option( 'default_email_category' ), 181 'hierarchical' => true, 182 ) 183 ); 184 ?> 185 </td> 186 </tr> 187 <?php do_settings_fields( 'writing', 'post_via_email' ); ?> 154 188 </table> 155 189 <?php } ?> … … 165 199 if ( apply_filters( 'enable_update_services_configuration', true ) ) { 166 200 ?> 167 <h2 class="title"><?php _e( 'Update Services' ) ?></h2> 168 169 <?php if ( 1 == get_option('blog_public') ) : ?> 170 171 <p><label for="ping_sites"><?php 201 <h2 class="title"><?php _e( 'Update Services' ); ?></h2> 202 203 <?php if ( 1 == get_option( 'blog_public' ) ) : ?> 204 205 <p><label for="ping_sites"> 206 <?php 172 207 printf( 173 208 /* translators: %s: Codex URL */ … … 175 210 __( 'https://codex.wordpress.org/Update_Services' ) 176 211 ); 177 ?></label></p> 178 179 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea> 212 ?> 213 </label></p> 214 215 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option( 'ping_sites' ) ); ?></textarea> 180 216 181 217 <?php else : ?> 182 218 183 <p><?php 219 <p> 220 <?php 184 221 printf( 185 222 /* translators: 1: Codex URL, 2: Reading Settings URL */ … … 188 225 'options-reading.php' 189 226 ); 190 ?></p> 227 ?> 228 </p> 191 229 192 230 <?php endif; ?> 193 231 <?php } // enable_update_services_configuration ?> 194 232 195 <?php do_settings_sections( 'writing'); ?>233 <?php do_settings_sections( 'writing' ); ?> 196 234 197 235 <?php submit_button(); ?>
Note: See TracChangeset
for help on using the changeset viewer.