7 */ |
7 */ |
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( __( 'Sorry, you are not allowed 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 |
|
16 $title = __( 'Writing Settings' ); |
16 $parent_file = 'options-general.php'; |
17 $parent_file = 'options-general.php'; |
17 |
18 |
18 get_current_screen()->add_help_tab( array( |
19 get_current_screen()->add_help_tab( |
19 'id' => 'overview', |
20 array( |
20 'title' => __('Overview'), |
21 'id' => '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 'title' => __( 'Overview' ), |
22 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>', |
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>' . |
23 ) ); |
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 /** This filter is documented in wp-admin/options.php */ |
28 /** This filter is documented in wp-admin/options.php */ |
26 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
29 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
27 get_current_screen()->add_help_tab( array( |
30 get_current_screen()->add_help_tab( |
28 'id' => 'options-postemail', |
31 array( |
29 'title' => __( 'Post Via Email' ), |
32 'id' => 'options-postemail', |
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>', |
33 'title' => __( 'Post Via Email' ), |
31 ) ); |
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 /** This filter is documented in wp-admin/options-writing.php */ |
39 /** This filter is documented in wp-admin/options-writing.php */ |
35 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
40 if ( apply_filters( 'enable_update_services_configuration', true ) ) { |
36 get_current_screen()->add_help_tab( array( |
41 get_current_screen()->add_help_tab( |
37 'id' => 'options-services', |
42 array( |
38 'title' => __( 'Update Services' ), |
43 'id' => 'options-services', |
39 'content' => '<p>' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '</p>', |
44 'title' => __( 'Update Services' ), |
40 ) ); |
45 'content' => '<p>' . __( 'If desired, WordPress will automatically alert various services of your new posts.' ) . '</p>', |
|
46 ) |
|
47 ); |
41 } |
48 } |
42 |
49 |
43 get_current_screen()->set_help_sidebar( |
50 get_current_screen()->set_help_sidebar( |
44 '<p><strong>' . __('For more information:') . '</strong></p>' . |
51 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . |
45 '<p>' . __('<a href="https://codex.wordpress.org/Settings_Writing_Screen">Documentation on Writing Settings</a>') . '</p>' . |
52 '<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>' |
53 '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' |
47 ); |
54 ); |
48 |
55 |
49 include( ABSPATH . 'wp-admin/admin-header.php' ); |
56 include( ABSPATH . 'wp-admin/admin-header.php' ); |
50 ?> |
57 ?> |
51 |
58 |
52 <div class="wrap"> |
59 <div class="wrap"> |
53 <h1><?php echo esc_html( $title ); ?></h1> |
60 <h1><?php echo esc_html( $title ); ?></h1> |
54 |
61 |
55 <form method="post" action="options.php"> |
62 <form method="post" action="options.php"> |
56 <?php settings_fields('writing'); ?> |
63 <?php settings_fields( 'writing' ); ?> |
57 |
64 |
58 <table class="form-table"> |
65 <table class="form-table" role="presentation"> |
59 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> |
66 <?php if ( get_site_option( 'initial_db_version' ) < 32453 ) : ?> |
60 <tr> |
67 <tr> |
61 <th scope="row"><?php _e('Formatting') ?></th> |
68 <th scope="row"><?php _e( 'Formatting' ); ?></th> |
62 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Formatting') ?></span></legend> |
69 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Formatting' ); ?></span></legend> |
63 <label for="use_smilies"> |
70 <label for="use_smilies"> |
64 <input name="use_smilies" type="checkbox" id="use_smilies" value="1" <?php checked('1', get_option('use_smilies')); ?> /> |
71 <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 /> |
72 <?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> |
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 </fieldset></td> |
74 </fieldset></td> |
68 </tr> |
75 </tr> |
69 <?php endif; ?> |
76 <?php endif; ?> |
70 <tr> |
77 <tr> |
71 <th scope="row"><label for="default_category"><?php _e('Default Post Category') ?></label></th> |
78 <th scope="row"><label for="default_category"><?php _e( 'Default Post Category' ); ?></label></th> |
72 <td> |
79 <td> |
73 <?php |
80 <?php |
74 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_category', 'orderby' => 'name', 'selected' => get_option('default_category'), 'hierarchical' => true)); |
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 </td> |
91 </td> |
77 </tr> |
92 </tr> |
78 <?php |
93 <?php |
79 $post_formats = get_post_format_strings(); |
94 $post_formats = get_post_format_strings(); |
80 unset( $post_formats['standard'] ); |
95 unset( $post_formats['standard'] ); |
81 ?> |
96 ?> |
82 <tr> |
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 <td> |
99 <td> |
85 <select name="default_post_format" id="default_post_format"> |
100 <select name="default_post_format" id="default_post_format"> |
86 <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option> |
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 <option<?php selected( get_option( 'default_post_format' ), $format_slug ); ?> value="<?php echo esc_attr( $format_slug ); ?>"><?php echo esc_html( $format_name ); ?></option> |
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 <?php endforeach; ?> |
104 <?php endforeach; ?> |
90 </select> |
105 </select> |
91 </td> |
106 </td> |
92 </tr> |
107 </tr> |
93 <?php |
108 <?php |
94 if ( get_option( 'link_manager_enabled' ) ) : |
109 if ( get_option( 'link_manager_enabled' ) ) : |
95 ?> |
110 ?> |
96 <tr> |
111 <tr> |
97 <th scope="row"><label for="default_link_category"><?php _e('Default Link Category') ?></label></th> |
112 <th scope="row"><label for="default_link_category"><?php _e( 'Default Link Category' ); ?></label></th> |
98 <td> |
113 <td> |
99 <?php |
114 <?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')); |
115 wp_dropdown_categories( |
101 ?> |
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 ); |
|
125 ?> |
102 </td> |
126 </td> |
103 </tr> |
127 </tr> |
104 <?php endif; ?> |
128 <?php endif; ?> |
105 |
129 |
106 <?php |
130 <?php |
107 do_settings_fields('writing', 'default'); |
131 do_settings_fields( 'writing', 'default' ); |
108 do_settings_fields('writing', 'remote_publishing'); // A deprecated section. |
132 do_settings_fields( 'writing', 'remote_publishing' ); // A deprecated section. |
109 ?> |
133 ?> |
110 </table> |
134 </table> |
111 |
135 |
112 <?php |
136 <?php |
113 /** This filter is documented in wp-admin/options.php */ |
137 /** This filter is documented in wp-admin/options.php */ |
114 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
138 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { |
115 ?> |
139 ?> |
116 <h2 class="title"><?php _e( 'Post via email' ) ?></h2> |
140 <h2 class="title"><?php _e( 'Post via email' ); ?></h2> |
117 <p><?php |
141 <p> |
118 printf( |
142 <?php |
119 /* translators: 1, 2, 3: examples of random email addresses */ |
143 printf( |
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.' ), |
144 /* translators: 1, 2, 3: examples of random email addresses */ |
121 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ), |
145 __( '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.' ), |
122 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ), |
146 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ), |
123 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ) |
147 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ), |
124 ); |
148 sprintf( '<kbd>%s</kbd>', wp_generate_password( 8, false ) ) |
125 ?></p> |
149 ); |
126 |
150 ?> |
127 <table class="form-table"> |
151 </p> |
128 <tr> |
152 |
129 <th scope="row"><label for="mailserver_url"><?php _e('Mail Server') ?></label></th> |
153 <table class="form-table" role="presentation"> |
130 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option('mailserver_url'); ?>" class="regular-text code" /> |
154 <tr> |
131 <label for="mailserver_port"><?php _e('Port') ?></label> |
155 <th scope="row"><label for="mailserver_url"><?php _e( 'Mail Server' ); ?></label></th> |
132 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option('mailserver_port'); ?>" class="small-text" /> |
156 <td><input name="mailserver_url" type="text" id="mailserver_url" value="<?php form_option( 'mailserver_url' ); ?>" class="regular-text code" /> |
133 </td> |
157 <label for="mailserver_port"><?php _e( 'Port' ); ?></label> |
134 </tr> |
158 <input name="mailserver_port" type="text" id="mailserver_port" value="<?php form_option( 'mailserver_port' ); ?>" class="small-text" /> |
135 <tr> |
159 </td> |
136 <th scope="row"><label for="mailserver_login"><?php _e('Login Name') ?></label></th> |
160 </tr> |
137 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option('mailserver_login'); ?>" class="regular-text ltr" /></td> |
161 <tr> |
138 </tr> |
162 <th scope="row"><label for="mailserver_login"><?php _e( 'Login Name' ); ?></label></th> |
139 <tr> |
163 <td><input name="mailserver_login" type="text" id="mailserver_login" value="<?php form_option( 'mailserver_login' ); ?>" class="regular-text ltr" /></td> |
140 <th scope="row"><label for="mailserver_pass"><?php _e('Password') ?></label></th> |
164 </tr> |
141 <td> |
165 <tr> |
142 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option('mailserver_pass'); ?>" class="regular-text ltr" /> |
166 <th scope="row"><label for="mailserver_pass"><?php _e( 'Password' ); ?></label></th> |
143 </td> |
167 <td> |
144 </tr> |
168 <input name="mailserver_pass" type="text" id="mailserver_pass" value="<?php form_option( 'mailserver_pass' ); ?>" class="regular-text ltr" /> |
145 <tr> |
169 </td> |
146 <th scope="row"><label for="default_email_category"><?php _e('Default Mail Category') ?></label></th> |
170 </tr> |
147 <td> |
171 <tr> |
148 <?php |
172 <th scope="row"><label for="default_email_category"><?php _e( 'Default Mail Category' ); ?></label></th> |
149 wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'default_email_category', 'orderby' => 'name', 'selected' => get_option('default_email_category'), 'hierarchical' => true)); |
173 <td> |
150 ?> |
174 <?php |
151 </td> |
175 wp_dropdown_categories( |
152 </tr> |
176 array( |
153 <?php do_settings_fields('writing', 'post_via_email'); ?> |
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 </table> |
188 </table> |
155 <?php } ?> |
189 <?php } ?> |
156 |
190 |
157 <?php |
191 <?php |
158 /** |
192 /** |