WordPress.org

Make WordPress Core

Ticket #12996: clean-redundant-options-and-wp-hacks.patch

File clean-redundant-options-and-wp-hacks.patch, 4.6 KB (added by solarissmoke, 3 years ago)

Remove legacy (WP 1.5) wp-hacks support and some redundant options - refreshed patch

  • wp-includes/load.php

     
    481481                } 
    482482        } 
    483483 
    484         // Check for hacks file if the option is enabled 
    485         if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) { 
    486                 _deprecated_file( 'my-hacks.php', '1.5' ); 
    487                 array_unshift( $plugins, ABSPATH . 'my-hacks.php' ); 
    488         } 
    489  
    490484        if ( empty( $active_plugins ) || defined( 'WP_INSTALLING' ) ) 
    491485                return $plugins; 
    492486 
  • wp-admin/includes/file.php

     
    3333        'video.php' => __('Video Attachment Template'), 
    3434        'audio.php' => __('Audio Attachment Template'), 
    3535        'application.php' => __('Application Attachment Template'), 
    36         'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 
    3736        '.htaccess' => __( '.htaccess (for rewrite rules )' ), 
    3837        // Deprecated files 
    3938        'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); 
  • wp-admin/includes/schema.php

     
    231231        'comment_moderation' => 0, 
    232232        'moderation_notify' => 1, 
    233233        'permalink_structure' => '', 
    234         'gzipcompression' => 0, 
    235         'hack_file' => 0, 
    236234        'blog_charset' => 'UTF-8', 
    237235        'moderation_keys' => '', 
    238236        'active_plugins' => array(), 
    239237        'home' => $guessurl, 
    240238        'category_base' => '', 
    241239        'ping_sites' => 'http://rpc.pingomatic.com/', 
    242         'advanced_edit' => 0, 
    243240        'comment_max_links' => 2, 
    244241        'gmt_offset' => date('Z') / 3600, 
    245242 
     
    357354        if ( !__get_option('home') ) update_option('home', $guessurl); 
    358355 
    359356        // Delete unused options 
    360         $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', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page', 'wporg_popular_tags'); 
     357        $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', 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length', 'secret', 'use_linksupdate', 'default_comment_status_page', 'wporg_popular_tags', 'gzipcompression', 'hack_file', 'advanced_edit'); 
    361358        foreach ( $unusedoptions as $option ) 
    362359                delete_option($option); 
    363360