Ticket #22942: 22942_updated.diff
File 22942_updated.diff, 4.5 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/schema.php
369 369 'comments_notify' => 1, 370 370 'posts_per_rss' => 10, 371 371 'rss_use_excerpt' => 0, 372 'mailserver_url' => 'mail.example.com',373 'mailserver_login' => 'login@example.com',374 'mailserver_pass' => 'password',375 'mailserver_port' => 110,376 372 'default_category' => 1, 377 373 'default_comment_status' => 'open', 378 374 'default_ping_status' => 'open', … … 476 472 477 473 // 3.5 478 474 'link_manager_enabled' => 0, 475 476 // 3.6 477 'post_by_email_enabled' => 0, 479 478 ); 480 479 481 480 // 3.3 -
wp-admin/includes/upgrade.php
402 402 if ( $wp_current_db_version < 22422 ) 403 403 upgrade_350(); 404 404 405 if ( $wp_current_db_version < 22441 ) 406 upgrade_360(); 407 405 408 maybe_disable_link_manager(); 406 409 407 410 maybe_disable_automattic_widgets(); 408 411 412 maybe_disable_post_by_email(); 413 409 414 update_option( 'db_version', $wp_db_version ); 410 415 update_option( 'db_upgraded', true ); 411 416 } … … 1209 1214 } 1210 1215 1211 1216 /** 1217 * Execute changes made in WordPress 3.6. 1218 * 1219 * @since 3.6.0 1220 */ 1221 function upgrade_360() { 1222 global $wp_current_db_version; 1223 1224 if ( $wp_current_db_version < 22441 && 'mail.example.com' != get_option( 'mailserver_url' ) ) 1225 update_option( 'post_by_email_enabled', 1 ); // Previosuly set to 0 by populate_options() 1226 } 1227 1228 /** 1212 1229 * Execute network level changes 1213 1230 * 1214 1231 * @since 3.0.0 … … 1953 1970 } 1954 1971 1955 1972 /** 1973 * Disables Post by Email options if, at the time of upgrade, the settings have not been changed from original defaults. 1974 * 1975 * @since 3.6.0 1976 */ 1977 function maybe_disable_post_by_email() { 1978 global $wp_current_db_version; 1979 1980 if ( $wp_current_db_version >= 22441 && get_option( 'post_by_email_enabled' ) && 'mail.example.com' == get_option( 'mailserver_url' ) ) 1981 update_option( 'post_by_email_enabled', 0 ); 1982 } 1983 1984 /** 1956 1985 * Runs before the schema is upgraded. 1957 1986 * 1958 1987 * @since 2.9.0 -
wp-admin/options-writing.php
28 28 'content' => '<p>' . __('Press This is a bookmarklet that makes it easy to blog about something you come across on the web. You can use it to just grab a link, or to post an excerpt. Press This will even allow you to choose from images included on the page and use them in your post. Just drag the Press This link on this screen to your bookmarks bar in your browser, and you’ll be on your way to easier content creation. Clicking on it while on another website opens a popup window with all these options.') . '</p>', 29 29 ) ); 30 30 31 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) {31 if ( get_option( 'post_by_email_enabled' ) && apply_filters( 'enable_post_by_email_configuration', true ) ) { 32 32 get_current_screen()->add_help_tab( array( 33 33 'id' => 'options-postemail', 34 34 'title' => __( 'Post Via Email' ), … … 124 124 <p><textarea rows="5" cols="120" readonly="readonly"><?php echo htmlspecialchars( get_shortcut_link() ); ?></textarea></p> 125 125 </div> 126 126 127 <?php if ( apply_filters( 'enable_post_by_email_configuration', true ) ) { ?>127 <?php if ( get_option( 'post_by_email_enabled' ) && apply_filters( 'enable_post_by_email_configuration', true ) ) { ?> 128 128 <h3><?php _e('Post via e-mail') ?></h3> 129 129 <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> 130 130 -
wp-includes/default-filters.php
288 288 // This option no longer exists; tell plugins we always support auto-embedding. 289 289 add_filter( 'default_option_embed_autourls', '__return_true' ); 290 290 291 // If the upgrade hasn't run yet, assume the post by mail options are set. 292 add_filter( 'default_option_post_by_email_enabled', '__return_true' ); 293 291 294 unset($filter, $action);