WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Version 3.1

On February 23, 2011, WordPress Version 3.1 "Reinhardt", named in honor of the jazz guitarist Django Reinhardt, was released to the public. For more information on this enhancement and bug release, read the WordPress Blog, and see the Changelog for 3.1.

For Version 3.1, the database version (db_version in wp_options) changed to 17056, and the Trac revision was 17485.

Highlights

  • Internal Linking - click a button for an internal link and it allows you to search for a post or browse a list of existing content and select it for inclusion.
  • Admin Bar - contains various links to useful admin screens. By default, the admin bar is displayed when a user is logged in and visiting the site and is not displayed in admin screens for single blog installs. For multisite installs, the admin bar is displayed both when visiting the site and in the admin screens.
  • Streamlined Writing Interface - new users of WordPress will find the write screen much less cluttered than before, as more of the options are hidden by default. You can click on Screen Options in the top right to bring them back.
  • Post Formats - meta information that can be used by themes to customize presentation of a post. Read more in the article Post Formats.
  • Network Admin - move Super Admin menus and related pages out of the regular admin and into a new Network Admin screen.
  • List-type Admin Screens - sortable columns for list-type screens and better pagination.
  • Exporter/Importer Overhaul - many under the hood changes including adding author information, better handling for taxonomies and terms, and proper support for navigation menus.
  • Custom Content Type Improvements - allows developers to generate archive pages, and have better menu and capability controls. Read more in the article Post Types.
  • Advanced Queries - allows developers to query multiple taxonomies and custom fields.
  • Refreshed Blue Admin Color Scheme - puts the focus more squarely on your content.

User Features

General

  • Admin Blue theme refresh (#15207)
  • Clean Up Admin CSS Files (#14770)
  • Custom post type archive pages (#13818)
  • Hierarchical Taxonomies (#12659)
  • Implement the screen options toggle sprite across color schemes
  • Improved admin list type screens, including making most columns sortable, introduction of a new pagination style, improved API, improved search, and filterable bulk actions. (#14579)
  • Licensing text updates (Changeset 17301)
  • Multi-taxonomy Queries (#12891)

Dashboard

  • Round bottom-right corner of the screen options dropdown
  • Use 'Visit Site' in header if blog has no name
  • Add 'Check Again' button and timestamp to update-core. Also return the same error message for themes as we do for plugins when no checkboxes are checked
  • Contextual help updates
  • Standardize on "Update" rather than "Upgrade
  • Support post formats in Press This

Posts

  • Post Formats (#14746)
  • Internal Linking (#11420)
  • Editor utilizes the new "formats" option in TinyMCE, fixes errors in IE when pressing Enter inside a caption box, fixes resizing of the caption box when the user soft-resizes the image in the editor
  • Simplified the post/page edit screens by hiding several meta-boxes--use Screen Options to expose those boxes.

Media

Links

Comments

  • Link directly to comment in email notification
  • Don't notify the author when they posted or moderated the comment

Appearance

  • Improved theme searching and browsing (#14936)
  • Duplicate Save button for Appearance->Menus panel at the bottom
  • Standardize on 'Display as dropdown' and list those before post counts in default widgets
  • Add 'Visual Editor RTL Stylesheet' to the list of theme file descriptions
  • Enhance theme removal routines
  • RTL for theme installer
  • New template file, archive-{post_type}.php, for Custom Post Types (#13818)

Plugins

Tools

Users

  • Streamline password reset process (#5919)
  • Only show the password strength meter when JavaScript is available
  • Login page improvements including removing poor code, use the script loader properly on the login page, ensure have convertEntities available on the login page. introduce a login_footer action, hook in the script loader to the login_header and login_footer actions.

Settings

  • Disable static page dropdowns when 'latest posts' is selected on Settings->Reading.

Install Process

  • Improved response to incorrect database credentials to show error message with an opportunity to try again
  • Improved the string for the default Sample About (sample-about) page

Multisite

  • Add contextual help for Network screens
  • Add delete support to network themes
  • Add plugin update notifications, plugin install, plugin update to the network admin screen
  • Admin Bar similar to that used in wordpress.com blogs (#14772)
  • Move network version of Tools->Network to the network admin
  • Move theme installer to the network admin for multisite installs
  • Network Admin (#14435)
  • Network Wide Settings->Language Settings
  • New Network Admins page for Theme enable/disable/upgrade
  • Pass more information to notification filters
  • Rename Update menu to Updates in network admin
  • Revamp User-new.php including separate caps for adding users vs. creating users, allowing supes to add via email or username, split adding existing users and creating new users into separate forms
  • Support wildcard domains in WP_PROXY_BYPASS_HOSTS and WP_ACCESSIBLE_HOSTS
  • Tabbed interface for site editing
  • User Admin feature creates a separate "personal" dashboard to provide a single endpoint for accessing profile information, cross-site preferences, a launching point for accessing all of a user's blogs, collation of stats across all of a user's blogs, a place for a multisite aware quick press, etc. (#14696)

Development, Themes, Plugins

  • Add AuthorName to get_plugins() and use it when deleting a plugin
  • Add a Sticky filter on the edit posts page, add post_in and post_not_in as private query vars in the WP class to support this
  • Add filters to *_metadata() functions
  • Add get_meta_sql filter
  • Add support for ID style classes in get_body_class()
  • Add user_meta to global groups
  • Add 'who' and 'include_selected' arguments to wp_dropdown_users()
  • Allow capability_type for register_post_type() to be an array, for odd plural situations such as story/storys/stories. After registration it reverts to a singular string.
  • Allow disabling of custom header uploads via remove_theme_support()
  • Allow fields with a paragraph tag to align to top in the form-table on settings pages.
  • Allow flagging of a blog as mature via a URL and move some actions into update_blog_status()
  • Allow is_feed() to drill down the feed being checked
  • Allow page rewrites to be disabled
  • Allow plugins to add more options to the comment status meta box easily.
  • Allow plugins to manipulate the meta query args
  • Allow turning off the admin bar via show_admin_bar() function or the show_admin_bar filter
  • Allow wp_tag_cloud() to accept an array of taxonomies
  • Always include wp-db.php -- prevents a conditional include and allows db dropins to cleanly extend the wpdb class and also move require_wp_db() to load.php for consistency with bootloader helpers.
  • Body classes for custom taxonomies and terms
  • Clarify is_single() inline doc
  • Deprecate 'caller_get_posts' WP_Query parameter infavor of 'ignore_sticky_posts' parameter
  • Deprecate get_author_user_ids(), get_editable_authors(), get_editable_user_ids(), get_nonauthor_user_ids(), and get_users_of_blog(), in favor get_users()
  • Define 'IFRAME_REQUEST' only for framed requests
  • Display mysql_connect errors when 'WP_DEBUG' is enabled and always die if we can't connect to the database
  • Don't call activation hooks when upgrading
  • Don't require category__in, tag__in etc. to be arrays necessarily
  • For function get_term_link() make the second (taxonomy) parameter optional if a term object is passed as the first argument (which has the taxonomy in it).
  • Introduce _doing_it_wrong to mark places where plugins / themes are calling functions incorrectly (#15824)
  • Improve is_serialized() to work faster
  • Improve get_objects_in_term() to include term children when querying by slug
  • Improve wp_list_authors() by adding arguments for orderby, order, and number
  • Improve map_meta_cap for custom post types
  • Improve oEmbed toggle label
  • Improve regex performance in wptexturize()
  • Introduce can_edit_site to replace inline checks on whether or not the site_id is for the current Network (#15716)
  • Introduce edit_term_link() and get_term_link() to retrieve or display edit term link. (#9702)
  • Introduce get_ancestors() to get an array of ancestor IDs for a given object. (#12443)
  • Introduce get_current_blog_id() to retrieve the current blog id. (#15233)
  • Introduce _get_list_table() to fetch an instance of a WP_List_Table class (#14579)
  • Introduce _get_meta_sql() given a meta query, generates SQL clauses to be appended to a main query
  • Introduce get_post_type_archive_feed_link(), get_post_type_archive_link(), and post_type_archive_title() to support index/archive pages for custom post types (#13818)
  • Introduce get_theme_feature_list() to replace install_themes_feature_list() and also does translation and works if feature_list is not accessible from api.wordpress.org (#14936)
  • Introduce get_users() to retrieve list of users matching criteria
  • Introduce has_term() to check if the current post has any of given terms. (#12526)
  • Introduce is_blog_admin() to determine if the current request is for a blog admin screen /wp-admin/ (#14763) Note: Does not inform on whether the user is a blog admin--Use capability checks for that.
  • Introduce remove_menu_page() and remove_submenu_page(). Remove a top level menu page and a sub menu page. (#14666)
  • Introduce remove_custom_image_header(), remove_custom_background(), and remove_editor_styles(), to support better theme removal process
  • Introduce remove_theme_support()
  • Introduce set_post_thumbnail() to set a post thumbnail (#15192)
  • Introduce show_admin_bar() to retrieve or set the admin bar display state
  • Introduce single_term_title() to display or retrieve title for taxonomy term archive (#14161)
  • Introduce submit_button() to echo a submit button with provided text and appropriate class (#15064)
  • Introduce wp_array_slice_assoc() to extract a slice of an array, given a list of keys
  • Introduce WP_List_Table as the base class for displaying a list of items in an ajaxified HTML table
  • Introduce 'DO_NOT_UPGRADE_GLOBAL_TABLES' (originally introduced in 3.0.1) (#14221)
  • Introduce 'edit_comment' meta capability (#14520)
  • Introduce esc_textarea for obvious textarea escaping (#15454)
  • Introduce get_terms_args filter
  • Introduce hierarchical taxonomy URL's, Can be enabled by setting 'hierarchical_url' to true upon taxonomy registration
  • Introduce 'ignore_sticky_posts' WP_Query parameter to be used in place of 'caller_get_posts' parameter
  • Introduce items_wrap arg to wp_nav_menu()
  • Introduce menu_name label for register_post_type() and register_taxonomy()
  • Introduce 'relation' operator between tax queries
  • Introduce show_in_menu for register_post_type() and also allow post types to be a submenu and accept boolean, and also a parent base.
  • Introduce translate_nooped_plural(), _n_noop() and _nx_noop() now return associative arrays for greater clarity, translate_nooped_plural() takes one such associative array and translates it, it works on both the result from _n_noop() and from _nx_noop(), translate_nooped_plural() is applied where applicable
  • Introduce unregister_nav_menu(). (originally introduced in 3.0.1)
  • Introduce wp_basename() and use it for media handling and WP_Query
  • Introduce WP_HTTP_IXR_Client. Extends IXR_Client and switches it to using the WordPress HTTP API instead of fsockopen
  • Introduce user_can() to check any user's capabilities (#14602)
  • Limit wp_old_slug_redirect() to redirecting to only posts of the same post_type kind
  • Make get_header_image() ssl-aware
  • Make menus manipulation easier for plugin developers by adding wp_nav_menu_objects filter which gets a sorted list of all menu node objects in the currently rendered menu, adding current, current_item_ancestor and current_item_parent boolean member variables to each menu node object, which are true when the item has the current-menu-item, current-menu-ancestor or current-menu-parent CSS class respectively
  • More efficient calendar queries.
  • Move post and taxonomy functions from admin/includes to wp-includes in preparation for QuickPress template tag
  • Move registration.php functions to user.php, deprecate registration.php, everything is now included by default
  • Move the is_*() functionality (aka Conditional Tags) into the WP_Query class
  • Move the Super Admin menus and related pages out of the regular admin and into wp-admin/network/
  • Pass $args to login_form_* filters.
  • Remove Lucida Grande from the sans serif font stack
  • Remove post_type params from is_archive(); use is_post_type_archive() for full context
  • Remove WP_USE_MULTIPLE_DB. Introduce init_charset() and set_charset() class methods.
  • Require an argument in wp_insert_post()
  • Retire IIS 3,4,5 Set-Cookie redirection workaround
  • Save _wp_old_slug for all published post_type's, brings old-slug redirection to posts and custom post types
  • Schedule update checks from an init hook
  • Simplify sanitize_key() and use it in more places
  • Specify feed type in the_category_rss()
  • Split wp-includes/classes.php into single-class files
  • Support custom post type links in wp_list_pages()
  • TwentyTen Theme - Add 'View Galleries' link for post formats
  • TwentyTen Theme - Deprecate twentyten_remove_gallery_css in favor of the use_default_gallery_style filter
  • TwentyTen Theme – Fixes header positioning in the IE9 beta
  • TwentyTen Theme – Fixes to font issues in IE6 due to incompatible selector
  • TwentyTen Theme – Image handling adjustments
  • TwentyTen Theme - Make sure we have a header image before showing it
  • TwentyTen Theme - Use get_template_part() in single.php, attachment.php, page.php, onecolumn-page.php. Introduces loop-page/single/attachment.php. This is a backwards compatible change, as any child theme currently overriding single.php or loop.php will be entirely unaffected. Child themes can now override the loop in these files individually, by using loop-single.php, loop-page.php, or loop-attachment.php. (In loop-page.php, they can also use in_page_template() for the extra level of context.)
  • Update Incutio XML-RPC Library to version 1.7.4
  • Update jQuery to 1.4.4 (#15227)
  • Update jQuery UI to 1.8.9
  • Update TinyMCE to 3.3 (#12574)
  • Update TinyMCE 3.3.9.3-dev. fixes (#15111)
  • Update TinyMCE Spellchecker to 2.0.3
  • Updated phpdocs including @since, whitespace, wp-admin/user, wp-admin/network, wp-admin/includes/file.php, argument/@param, _wp_link_page(), ms-functions.php, ms-blogs.php, nav menus, the_terms, wp_find_hierarchy_loop, WP_Query, meta capabilities, post types, register_post_type, list tables, new media XMLRPC, wp_list_widgets, network admin multisite, get_file_data(), get_post_format_slugs,
  • Use a 'create_users' capability for Sites > Add New
  • Use Absolute URL's & API's in header redirects
  • Use wp_get_current_user() and get_current_user_id() instead of global (originally introduced in 3.0.1) (#13934)
  • Use get_queried_object() wrappers
  • WP_User_Query constructor improvements
  • XML-RPC expose post format details, new method: 'wp.getPostFormats', new field in methods dealing with posts: wp_post_format
  • XML-RPC introduce 'wp.getMediaItem' and 'wp.getMediaLibrary'
  • XML-RPC move to seperate class file
  • XML-RPC switch the following api calls to support an optional number of posts, 'blogger.getRecentPosts', 'metaWeblog.getRecentPosts', 'mt.getRecentPostTitles'
See also: other WordPress Versions.