8 |
8 |
9 /** WordPress Administration Bootstrap */ |
9 /** WordPress Administration Bootstrap */ |
10 require_once( dirname( __FILE__ ) . '/admin.php' ); |
10 require_once( dirname( __FILE__ ) . '/admin.php' ); |
11 |
11 |
12 if ( ! current_user_can( 'manage_options' ) ) |
12 if ( ! current_user_can( 'manage_options' ) ) |
13 wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); |
13 wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); |
14 |
14 |
15 $title = __('Writing Settings'); |
15 $title = __('Writing Settings'); |
16 $parent_file = 'options-general.php'; |
16 $parent_file = 'options-general.php'; |
17 |
17 |
18 get_current_screen()->add_help_tab( array( |
18 get_current_screen()->add_help_tab( array( |
25 /** This filter is documented in wp-admin/options.php */ |
25 /** This filter is documented in wp-admin/options.php */ |
26 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
26 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
27 get_current_screen()->add_help_tab( array( |
27 get_current_screen()->add_help_tab( array( |
28 'id' => 'options-postemail', |
28 'id' => 'options-postemail', |
29 'title' => __( 'Post Via Email' ), |
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 e-mail 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>', |
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 ) ); |
31 ) ); |
32 } |
32 } |
33 |
33 |
34 /** This filter is documented in wp-admin/options-writing.php */ |
34 /** This filter is documented in wp-admin/options-writing.php */ |
35 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
35 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
40 ) ); |
40 ) ); |
41 } |
41 } |
42 |
42 |
43 get_current_screen()->set_help_sidebar( |
43 get_current_screen()->set_help_sidebar( |
44 '<p><strong>' . __('For more information:') . '</strong></p>' . |
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>' . |
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/" target="_blank">Support Forums</a>') . '</p>' |
46 '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>' |
47 ); |
47 ); |
48 |
48 |
49 include( ABSPATH . 'wp-admin/admin-header.php' ); |
49 include( ABSPATH . 'wp-admin/admin-header.php' ); |
50 ?> |
50 ?> |
51 |
51 |
52 <div class="wrap"> |
52 <div class="wrap"> |
53 <h2><?php echo esc_html( $title ); ?></h2> |
53 <h1><?php echo esc_html( $title ); ?></h1> |
54 |
54 |
55 <form method="post" action="options.php"> |
55 <form method="post" action="options.php"> |
56 <?php settings_fields('writing'); ?> |
56 <?php settings_fields('writing'); ?> |
57 |
57 |
58 <table class="form-table"> |
58 <table class="form-table"> |
|
59 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> |
59 <tr> |
60 <tr> |
60 <th scope="row"><?php _e('Formatting') ?></th> |
61 <th scope="row"><?php _e('Formatting') ?></th> |
61 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend> |
62 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend> |
62 <label for="use_smilies"> |
63 <label for="use_smilies"> |
63 <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> /> |
64 <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> /> |
64 <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br /> |
65 <?php _e('Convert emoticons like <code>:-)</code> and <code>:-P</code> to graphics on display') ?></label><br /> |
65 <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> |
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> |
66 </fieldset></td> |
67 </fieldset></td> |
67 </tr> |
68 </tr> |
|
69 <?php endif; ?> |
68 <tr> |
70 <tr> |
69 <th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th> |
71 <th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th> |
70 <td> |
72 <td> |
71 <?php |
73 <?php |
72 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); |
74 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); |
109 |
111 |
110 <?php |
112 <?php |
111 /** This filter is documented in wp-admin/options.php */ |
113 /** This filter is documented in wp-admin/options.php */ |
112 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
114 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
113 ?> |
115 ?> |
114 <h3 class="title"><?php _e('Post via e-mail') ?></h3> |
116 <h2 class="title"><?php _e( 'Post via email' ) ?></h2> |
115 <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’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> |
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’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> |
116 |
126 |
117 <table class="form-table"> |
127 <table class="form-table"> |
118 <tr> |
128 <tr> |
119 <th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th> |
129 <th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th> |
120 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" /> |
130 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" /> |
144 </table> |
154 </table> |
145 <?php } ?> |
155 <?php } ?> |
146 |
156 |
147 <?php |
157 <?php |
148 /** |
158 /** |
149 * Filter whether to enable the Update Services section in the Writing settings screen. |
159 * Filters whether to enable the Update Services section in the Writing settings screen. |
150 * |
160 * |
151 * @since 3.0.0 |
161 * @since 3.0.0 |
152 * |
162 * |
153 * @param bool $enable Whether to enable the Update Services settings area. Default true. |
163 * @param bool $enable Whether to enable the Update Services settings area. Default true. |
154 */ |
164 */ |
155 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
165 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
156 ?> |
166 ?> |
157 <h3 class="title"><?php _e('Update Services') ?></h3> |
167 <h2 class="title"><?php _e( 'Update Services' ) ?></h2> |
158 |
168 |
159 <?php if ( 1 == get_option('blog_public') ) : ?> |
169 <?php if ( 1 == get_option('blog_public') ) : ?> |
160 |
170 |
161 <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 <abbr title="Universal Resource Locator">URL</abbr>s with line breaks.') ?></label></p> |
171 <p><label for="ping_sites"><?php |
162 |
172 printf( |
163 <textarea name="ping_sites" id="ping_sites" class="large-text code" rows="3"><?php echo esc_textarea( get_option('ping_sites') ); ?></textarea> |
173 /* translators: %s: Codex URL */ |
|
174 __( 'When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see <a href="%s">Update Services</a> on the Codex. Separate multiple service URLs with line breaks.' ), |
|
175 __( 'https://codex.wordpress.org/Update_Services' ) |
|
176 ); |
|
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> |
164 |
180 |
165 <?php else : ?> |
181 <?php else : ?> |
166 |
182 |
167 <p><?php printf(__('WordPress is not notifying any <a href="https://codex.wordpress.org/Update_Services">Update Services</a> because of your site’s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p> |
183 <p><?php |
|
184 printf( |
|
185 /* translators: 1: Codex URL, 2: Reading Settings URL */ |
|
186 __( 'WordPress is not notifying any <a href="%1$s">Update Services</a> because of your site’s <a href="%2$s">visibility settings</a>.' ), |
|
187 __( 'https://codex.wordpress.org/Update_Services' ), |
|
188 'options-reading.php' |
|
189 ); |
|
190 ?></p> |
168 |
191 |
169 <?php endif; ?> |
192 <?php endif; ?> |
170 <?php } // multisite ?> |
193 <?php } // enable_update_services_configuration ?> |
171 |
194 |
172 <?php do_settings_sections('writing'); ?> |
195 <?php do_settings_sections('writing'); ?> |
173 |
196 |
174 <?php submit_button(); ?> |
197 <?php submit_button(); ?> |
175 </form> |
198 </form> |