WordPress.org

Make WordPress Core

Ticket #10981: rewrite_rules.002.diff

File rewrite_rules.002.diff, 3.1 KB (added by markjaquith, 9 years ago)

Remove rewrite_rules from deprecated options list.

  • wp-includes/version.php

     
    1515 *
    1616 * @global int $wp_db_version
    1717 */
    18 $wp_db_version = 12024;
     18$wp_db_version = 12060;
    1919
    2020/**
    2121 * Holds the TinyMCE version
  • wp-includes/rewrite.php

     
    16071607         * @return array Rewrite rules.
    16081608         */
    16091609        function wp_rewrite_rules() {
    1610                 $this->rules = get_transient('rewrite_rules');
     1610                $this->rules = get_option('rewrite_rules');
    16111611                if ( empty($this->rules) ) {
    16121612                        $this->matches = 'matches';
    16131613                        $this->rewrite_rules();
    1614                         set_transient('rewrite_rules', $this->rules);
     1614                        update_option('rewrite_rules', $this->rules);
    16151615                }
    16161616
    16171617                return $this->rules;
     
    18221822         *
    18231823         * @since 2.0.1
    18241824         * @access public
    1825          * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
     1825         * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
    18261826         */
    18271827        function flush_rules($hard = true) {
    1828                 delete_transient('rewrite_rules');
     1828                delete_option('rewrite_rules');
    18291829                $this->wp_rewrite_rules();
    18301830                if ( $hard && function_exists('save_mod_rewrite_rules') )
    18311831                        save_mod_rewrite_rules();
  • wp-admin/includes/schema.php

     
    353353
    354354        // Delete unused options
    355355        $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins', 'can_compress_scripts',
    356                 'page_uris', 'rewrite_rules', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length');
     356                'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length');
    357357        foreach ($unusedoptions as $option)
    358358                delete_option($option);
    359359}