WordPress Release: 2.1.0

Tag Name: 2.1.0

Release Date: 1/23/2007

WordPress LogoWordPress

World's most popular open-source content management system powering over 40% of all websites. Offers extensive plugin ecosystem, themes, and robust community support for blogs, e-commerce, and corporate websites. Highly customizable and scalable platform suitable for beginners and advanced developers.

TL;DR

WordPress 2.1 introduces significant performance improvements through caching mechanisms, a standardized terminology change from "Bookmarks" to "Links", and an upgraded TinyMCE editor (version 2.0.8). This release focuses on enhancing speed, usability, and adding new features like custom image headers, while fixing numerous bugs. The autosave functionality has been improved to prevent data loss, and several security enhancements have been implemented. This is a recommended upgrade for all WordPress users due to the performance benefits and security fixes.

Highlight of the Release

    • Performance improvements through caching for categories, bookmarks, pages, and calendar
    • Terminology standardization from 'Bookmarks' to 'Links'
    • TinyMCE editor upgraded to version 2.0.8
    • Improved autosave functionality with 2-minute intervals
    • New custom image header feature
    • Faster wptexturize function
    • Better handling of post slugs with automatic redirection to new slugs
    • Enhanced upload management and attachment handling
    • New hooks and filters for developers

Migration Guide

Terminology Change: Bookmarks to Links

WordPress 2.1 standardizes on using "Links" instead of "Bookmarks" throughout the system. If you have custom code or plugins that reference "Bookmarks," you may need to update them to use the new terminology.

Theme Updates

If your theme includes custom header functionality, you may want to review the new custom image header feature to see if it can replace your custom code. Additionally, ensure your theme header includes the new language_attributes() function for proper language support.

Plugin Compatibility

Some plugins may need updates to work with the new caching mechanisms. If you notice any plugin behaving strangely after upgrading, check for updated versions or contact the plugin developer.

Custom JavaScript

If you've customized any of the WordPress JavaScript files (particularly quicktags.js), note that the compressed versions have been removed. Your customizations should continue to work, but be aware of potential conflicts with the updated JavaScript files.

Database Changes

The linkcategories table has been dropped in this release. If you were using this table directly in custom code, you'll need to update your code to use the new category system.

Upgrade Recommendations

Priority Level: High

WordPress 2.1 is a recommended upgrade for all WordPress users due to:

  1. Performance Improvements: The new caching mechanisms significantly improve site performance, especially for sites with many categories, links, or pages.

  2. Security Enhancements: Several security fixes have been implemented, including better URL validation and file upload security.

  3. Autosave Improvements: The enhanced autosave functionality helps prevent content loss during editing.

  4. Bug Fixes: Numerous bugs have been fixed, improving overall stability and functionality.

Before Upgrading:

  • Back up your database and files
  • Check plugin compatibility with WordPress 2.1
  • Review any custom code that might reference "Bookmarks" instead of "Links"
  • Ensure your server meets the minimum requirements (MySQL 4.0.0 or higher)

After Upgrading:

  • Test your site's functionality, especially if you use custom themes or plugins
  • Review your category structure and link management
  • Check that your uploads and attachments are working correctly

Bug Fixes

Upload and Attachment Handling

  • Fixed issues with upload JavaScript functionality
  • Improved handling of non-image uploads
  • Fixed attachment metadata creation for XML-RPC uploads
  • Fixed thumbnail creation issues
  • Improved "Send to Editor" functionality for uploads

Category and Link Management

  • Fixed category checkbox spacing in IE
  • Fixed hierarchical category count issues
  • Corrected empty category query handling
  • Fixed AJAX functionality in category management
  • Ensured checked categories appear first in lists

Editor and Content Formatting

  • Fixed line break handling after the letter 'Z'
  • Prevented form submission during autosave
  • Fixed issues with the rich text editor link behavior
  • Improved handling of HTML tags in content formatting
  • Fixed issues with the autosave functionality to prevent duplicate drafts

Feed and URL Handling

  • Fixed feed links when using %category% permalink structure
  • Corrected XML representation of comments on posts
  • Fixed issues with URL protocols and sanitization
  • Improved pingback excerpt fetching

Interface and Display

  • Fixed logo link and styling in database error pages
  • Corrected ID and comments centering in admin interface
  • Fixed funky category checkbox spacing in IE
  • Improved login screen markup and styling
  • Fixed parse error in link-add.php

New Features

Custom Image Header

A new feature allowing users to customize their site's header image through the admin interface. This provides greater theme customization without requiring code editing.

Automatic Redirection for Changed Post Slugs

WordPress now remembers old post slugs and automatically redirects visitors to the new URL when a post's slug is changed, ensuring that links to your content remain functional.

New Developer Hooks and Filters

Several new hooks and filters have been added, including:

  • query filter for SQL queries
  • commentrss2_item action hook
  • Hooks for registration
  • Hooks for the link manager
  • Filters for prev/next queries

Category Ancestor Function

New cat_is_ancestor_of() function to check if a category is an ancestor of another category, useful for theme developers.

Language Attributes Function

New language_attributes() function for theme headers to properly set language attributes based on the site's locale settings.

Hierarchical Categories in Sidebar

Categories can now be displayed hierarchically in the sidebar, providing better organization for sites with complex category structures.

Security Updates

URL Protocol Validation

  • Updated allowed protocols list for better security
  • Added KSES protocol checking to clean_url() function to prevent potential security issues with malicious URLs

File Upload Security

  • Improved XML-RPC filename sanitization to prevent potential security issues
  • Added sanitize_file_name() function to ensure uploaded files have safe filenames
  • Fixed issues with uploads being hidden

Input Sanitization

  • Improved sanitization of plugin metadata
  • Enhanced JavaScript escaping with new js_escape() function
  • Added attribute_escape() function for safely escaping within HTML attributes

Trackback Security

  • Delayed trackback data escaping until after character encoding conversion to prevent potential security issues (props to Stefan Esser)

Performance Improvements

Caching Mechanisms

WordPress 2.1 introduces significant caching improvements for frequently used functions:

  • Added caching for get_categories()
  • Added caching for get_bookmarks()/get_links()
  • Added caching for get_pages()
  • Added caching for get_calendar()
  • Implemented blog ID-based cache keys for multi-blog setups

Query Optimization

  • Fixed a typo in logic that was causing extra page queries
  • Improved query handling to reduce database load
  • Optimized category and page retrieval

Faster Text Processing

  • Made wptexturize() function significantly faster (props to ecb29)
  • Improved handling of newlines and content normalization

Script Compression

While JavaScript compression was attempted to reduce load times (saving about 27kb), it was ultimately reverted due to compatibility concerns and to allow for easier customization.

Cron Improvements

  • Attempted to eliminate cron contention issues
  • Made scheduled tasks more efficient

Impact Summary

WordPress 2.1 represents a significant step forward in performance and functionality. The introduction of caching mechanisms for frequently used functions like categories, links, pages, and calendar will result in noticeable speed improvements for most sites, especially those with complex category structures or many pages.

The standardization on "Links" instead of "Bookmarks" brings consistency to the terminology but may require adjustments for users and developers familiar with the old naming. The upgrade to TinyMCE 2.0.8 enhances the content editing experience, while the improved autosave functionality (now set to 2-minute intervals) provides better protection against data loss.

For developers, the new hooks and filters offer greater extensibility, particularly the powerful "query" filter for SQL queries. The addition of functions like cat_is_ancestor_of() and language_attributes() provides tools for creating more sophisticated themes and plugins.

Security improvements in URL handling, file uploads, and input sanitization make this update important from a security perspective. The enhanced handling of post slugs with automatic redirection ensures that content remains accessible even when URLs change.

Overall, WordPress 2.1 delivers a more robust, faster, and more secure platform while maintaining backward compatibility and adding useful new features like custom image headers.

Statistics:

File Changed300
Line Additions9,534
Line Deletions7,330
Line Changes16,864
Total Commits250

User Affected:

  • Benefit from improved caching mechanisms for categories, bookmarks, pages, and calendar
  • Can use the new custom image header feature
  • Will need to adjust to terminology change from 'Bookmarks' to 'Links'
  • Experience improved upload management and attachment handling

Contributors:

ryanborenmarkjaquithm