]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/options-writing.php
WordPress 4.7.2
[autoinstalls/wordpress.git] / wp-admin / options-writing.php
1 <?php
2 /**
3  * Writing settings administration panel.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /** WordPress Administration Bootstrap */
10 require_once( dirname( __FILE__ ) . '/admin.php' );
11
12 if ( ! current_user_can( 'manage_options' ) )
13         wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
14
15 $title = __('Writing Settings');
16 $parent_file = 'options-general.php';
17
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 ) );
24
25 /** This filter is documented in wp-admin/options.php */
26 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 install 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&#8217;s a good idea to keep this address very secret.' ) . '</p>',
31         ) );
32 }
33
34 /** This filter is documented in wp-admin/options-writing.php */
35 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 }
42
43 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>'
47 );
48
49 include( ABSPATH . 'wp-admin/admin-header.php' );
50 ?>
51
52 <div class="wrap">
53 <h1><?php echo esc_html( $title ); ?></h1>
54
55 <form method="post" action="options.php">
56 <?php settings_fields('writing'); ?>
57
58 <table class="form-table">
59 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?>
60 <tr>
61 <th scope="row"><?php _e('Formatting') ?></th>
62 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend>
63 <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>
67 </fieldset></td>
68 </tr>
69 <?php endif; ?>
70 <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));
75 ?>
76 </td>
77 </tr>
78 <?php
79 $post_formats = get_post_format_strings();
80 unset( $post_formats['standard'] );
81 ?>
82 <tr>
83 <th scope="row"><label for="default_post_format"><?php _e('Default Post Format') ?></label></th>
84 <td>
85         <select name="default_post_format" id="default_post_format">
86                 <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
87 <?php foreach ( $post_formats as $format_slug => $format_name ): ?>
88                 <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 <?php endforeach; ?>
90         </select>
91 </td>
92 </tr>
93 <?php
94 if ( get_option( 'link_manager_enabled' ) ) :
95 ?>
96 <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'));
101 ?>
102 </td>
103 </tr>
104 <?php endif; ?>
105
106 <?php
107 do_settings_fields('writing', 'default');
108 do_settings_fields('writing', 'remote_publishing'); // A deprecated section.
109 ?>
110 </table>
111
112 <?php
113 /** This filter is documented in wp-admin/options.php */
114 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {
115 ?>
116 <h2 class="title"><?php _e( 'Post via email' ) ?></h2>
117 <p><?php
118 printf(
119         /* translators: 1, 2, 3: examples of random email addresses */
120         __( 'To post to WordPress by email you must set up a secret email account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: %1$s, %2$s, %3$s.' ),
121         sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
122         sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ),
123         sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) )
124 );
125 ?></p>
126
127 <table class="form-table">
128 <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'); ?>
154 </table>
155 <?php } ?>
156
157 <?php
158 /**
159  * Filters whether to enable the Update Services section in the Writing settings screen.
160  *
161  * @since 3.0.0
162  *
163  * @param bool $enable Whether to enable the Update Services settings area. Default true.
164  */
165 if ( apply_filters( 'enable_update_services_configuration', true ) ) {
166 ?>
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 _e( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="https://codex.wordpress.org/Update_Services">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ) ?></label></p>
172
173 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
174
175 <?php else : ?>
176
177         <p><?php printf(__('WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site&#8217;s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p>
178
179 <?php endif; ?>
180 <?php } // multisite ?>
181
182 <?php do_settings_sections('writing'); ?>
183
184 <?php submit_button(); ?>
185 </form>
186 </div>
187
188 <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>