]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/options-writing.php
WordPress 4.5.2-scripts
[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( __( 'You do not have sufficient permissions 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" target="_blank">Documentation on Writing Settings</a>') . '</p>' .
46         '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">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 printf(__('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: <kbd>%s</kbd>, <kbd>%s</kbd>, <kbd>%s</kbd>.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?></p>
118
119 <table class="form-table">
120 <tr>
121 <th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th>
122 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" />
123 <label for="mailserver_port"><?php _e('Port') ?></label>
124 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" />
125 </td>
126 </tr>
127 <tr>
128 <th scope="row"><label for="mailserver_login"><?php _e('Login Name') ?></label></th>
129 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" class="regular-text ltr" /></td>
130 </tr>
131 <tr>
132 <th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th>
133 <td>
134 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" />
135 </td>
136 </tr>
137 <tr>
138 <th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th>
139 <td>
140 <?php
141 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true));
142 ?>
143 </td>
144 </tr>
145 <?php do_settings_fields('writing', 'post_via_email'); ?>
146 </table>
147 <?php } ?>
148
149 <?php
150 /**
151  * Filter whether to enable the Update Services section in the Writing settings screen.
152  *
153  * @since 3.0.0
154  *
155  * @param bool $enable Whether to enable the Update Services settings area. Default true.
156  */
157 if ( apply_filters( 'enable_update_services_configuration', true ) ) {
158 ?>
159 <h2 class="title"><?php _e( 'Update Services' ) ?></h2>
160
161 <?php if ( 1 == get_option('blog_public') ) : ?>
162
163 <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>
164
165 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea>
166
167 <?php else : ?>
168
169         <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>
170
171 <?php endif; ?>
172 <?php } // multisite ?>
173
174 <?php do_settings_sections('writing'); ?>
175
176 <?php submit_button(); ?>
177 </form>
178 </div>
179
180 <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>