Changeset 58963 for trunk/src/wp-admin/options.php
- Timestamp:
- 09/02/2024 12:11:39 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options.php
r58425 r58963 159 159 $allowed_options['privacy'] = array(); 160 160 161 $mail_options = array( 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass' ); 161 /** 162 * Filters whether the post-by-email functionality is enabled. 163 * 164 * @since 3.0.0 165 * 166 * @param bool $enabled Whether post-by-email configuration is enabled. Default true. 167 */ 168 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { 169 $allowed_options['writing'][] = 'mailserver_url'; 170 $allowed_options['writing'][] = 'mailserver_port'; 171 $allowed_options['writing'][] = 'mailserver_login'; 172 $allowed_options['writing'][] = 'mailserver_pass'; 173 } 162 174 163 175 if ( ! is_utf8_charset() ) { … … 181 193 $allowed_options['general'][] = 'default_role'; 182 194 183 $allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options );184 195 if ( '1' === get_option( 'blog_public' ) ) { 185 196 $allowed_options['writing'][] = 'ping_sites'; … … 198 209 $allowed_options['media'][] = 'upload_path'; 199 210 $allowed_options['media'][] = 'upload_url_path'; 200 }201 } else {202 /**203 * Filters whether the post-by-email functionality is enabled.204 *205 * @since 3.0.0206 *207 * @param bool $enabled Whether post-by-email configuration is enabled. Default true.208 */209 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {210 $allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options );211 211 } 212 212 }
Note: See TracChangeset
for help on using the changeset viewer.