Version 2.8

来自WordPress中文文档
跳转至: 导航搜索

wordpress.org.cn

On June 10th, 2009, WordPress Version 2.8, named for noted trumpeter and vocalist Chet Baker, was released to the public. For more information on this enhancement and bug-fix release, read the Development Blog Announcement and see the Changelog for 2.8.

For Version 2.8, the database version (db_version in wp_options) changed to 11548, and the Trac revision was 11549

Highlights

  • New drag-and-drop widgets admin interface and new widgets API
  • Syntax highlighting and function lookup built into plugin and theme editors
  • Browse the theme directory and install themes from the admin
  • Allow the dashboard widgets to be arranged in up to four columns
  • Allow configuring the number of items to show on management pages with an option in Screen Options
  • Support timezones and automatic daylight savings time adjustment
  • Support IIS 7.0 URL Rewrite Module
  • Faster loading of admin pages via script compression and concatenation

New Features

User Features

  • New Theme Installer routines
  • Add CodePress syntax highlighting to Theme and Plugin editors
  • Add Documentation(function) lookup to Theme and Plugin editors
  • Use "Custom Header" for menu text and revise Default theme to reflect change
  • Separate Comments into a separate postbox, from Discussion postbox, on the Edit Post screen
  • Make tags accessible without Javascript on the edit screen
  • Don't ask for confirmation when marking a comment as spam
  • Don't notify post author of own comments
  • Fix comment paging for static front page
  • Allow the dashboard widgets to be arranged in up to four columns as set via the Screen Options tab
  • Make titles into links in Dashboard Right Now module (this was in 2.7.1)
  • Improved Admin icons (grey-to-transparent shadows)
  • Update Blue Admin Color Scheme
  • Press This improvements UI, quoting fixes, plus ability for Contributors to use Press This
  • Add a Cancel Upload button and a Delete link to Administration > Media > Add New
  • Add column "Rating" in Administration > Links > Edit
  • Improve installer to help people entering wrong email addresses
  • Improved Widget user interface
  • Allow editing of all plugin files (Ticket 6732)
  • Improved Plugin search (this was in 2.7.1) on Administration > Plugins > Add New
  • Per Page option for plugins
  • Move "Install a plugin in .zip format" to new Upload tab under Administration > Plugins > Add New
  • Show absolute date instead of relative date for scheduled posts
  • Fix tags suggest for post quick edit and bulk edit
  • Permalink editor changes and fix for pages
  • Autosave post/page when pressing Control/Command+S
  • Add toggle all button to the Gallery tab in the uploader
  • Support more than one gallery on the same page
  • Add per page option to Screen Options for comments, posts, pages, media, categories, and tags
  • Overhaul of LiveJournal importer (also add define WP_IMPORTING)
  • Import category descriptions for Administration > Tools > Import > WordPress
  • Show Tools menu for all users so they can access Turbo
  • Check for new version when visiting Administration > Tools > Upgrade
  • In upgrade process, provide better explanation for database upgrade message
  • Fix most popular link category list
  • Add description field for Tags in Administration > Posts > Tags
  • WAI-ARIA landmark roles to added to WordPress Default theme
  • "Choose a city in the same timezone as you" for Timezone in Administration > Settings > General
  • Remove My Hacks option from Administration > Settings > Miscellaneous
  • Hide email addresses from low privilege users on Administration > Comments
  • Allow case-insensitive logins
  • Login and Registration pages noindex followed
  • Give login screen proper iPhone viewport
  • Enforce unique email addresses in Add/Edit users
  • Make user_nicenames unique during registration
  • Add "Send this password to the new user by email" option to Administration > Users > Add New
  • Don't set user's Website url to http:// in Administration > Users > Add New
  • Add password strength meter to Add User and Edit User
  • Hide things that need to be available to screen readers via offscreen positioning
  • Use invisible class for hiding labels and legends
  • Use a semantic class name for text targeted to screen readers

Development, Themes, Plugins

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Template Description

Link to the source code on http://core.trac.wordpress.org/browser/.

Parameters

  1. filename
  2. (option) path to codetag/code (version) or codetrunk/code. This option is only used for a new function.br /Default: codetrunk/code -- trunk is the latest bleeding edge development version of WordPress.

Usage

Link to the stable version: pre检查到模板循环:模板:Trac/pre

Link to trunk: pre检查到模板循环:模板:Trac/pre

/div

wordpress.org.cn)

  • Let plugins use screen layout columns
  • Add labels to titles and text inputs
  • Add hook for adding info to plugin update message
  • Don't do core version check from front page loads
  • Allow a plugin to vary the comment cookie lifetime (or even remove the cookies altogether)
  • Allow plugin to replace just the default help while preserving the contextual help
  • New escaping naming convention Ticket 9650
  • Deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security (ref. Development Updates)
  • Deprecate sanitize_url() and clean_url() in favor of esc_url_raw() and esc_url() (ref. Development Updates)
  • Add number/offset arguments to get_pages() (same parameters can be used for wp_list_pages()
  • Make login more pluggable
  • Add the_widget() function to output a generic widget anywhere in a template (Ticket 9701)
  • Allow plugins to override tz support enable/disable
  • Fix combining category and tag queries
  • Support IIS 7.0 URL Rewrite Module
  • Recognize Expression Web 2 as IIS
  • Allow multiple search form templates
  • Introduce sanitize_html_class() and use it to give categories, tags, users etc meaningful classnames where possible but fallback to the id if necessary (Ticket 8446)
  • Allow a different role to be set for users when they are created in a call to wp_insert_user()
  • Improve Filesystem method choice for 'direct'; introduce FS_METHOD constant
  • Add a hook in print_footer_scripts as in print_head_scripts
  • Add a comment_moderation_headers filter
  • Move upload_dir filter to before directory is created, so plugins can have a better effect
  • Pass name to sidebar, footer, and header get actions
  • Upgrader improvements, including move curl to last position and fsockopen to 2nd position due to higher compatibility
  • Add filter 'the_content_more_link' allows adding style/rel/title attributes to the more link
  • Updated Trac

Advanced Features

JS script loader Improvements

  • jQuery 1.3.2
  • Improvements to the script loader: allows plugins to queue scripts for the front end head and footer, adds hooks for server side caching of compressed scripts, adds support for ENFORCE_GZIP constant (deflate is used by default since it's faster)
  • Load the minified versions of the scripts by default, define('SCRIPT_DEBUG', true); can be used to load the development versions
  • Remove events from categories checkboxes in quick edit to speed up page unload
  • Make simple form validation and ajax-add new categories compatible with jQuery 1.3.1
  • Load farbtastic.js has to be loaded in the head
  • Note: see Lester Chan's Loading Javascript in Footer blog and Andrew Ozz's Script Loader Updates blog

New Widgets API

WP_Widget is a class that abstracts away much of the complexity involved in writing a widget, especially multi-widgets.

  • Basically, you extend WP_Widget with your own class that provides a constructor and three methods -- widget(), form(), and update().
    • widget() - outputs the actual content of the widget.
    • update() - processes options to be saved.
    • form() - outputs the options form.
  • A widget is registered by passing the name of the widget class to register_widget().
  • All widgets written with WP_Widget are multiple instance capable.
  • Options
    • Options for old single-instance widgets ported to WP_Widget will be upgraded to the new multi-option storage format, which is simply a multi-dimensional array keyed by instance ID.
    • Options for widgets using the old multi-instance pattern should work as is.
    • If your widget has custom option storage needs, you can provide your own get_settings() and save_settings() methods.
  • The WP_Widget source can be viewed here (read the phpdoc for moreinfo on usage): http://core.trac.wordpress.org/browser/trunk/wp-includes/widgets.php
  • You can see examples of how to use it here: http://core.trac.wordpress.org/browser/trunk/wp-includes/default-widgets.php
  • If you author any widgets, try porting them to WP_Widget and give your feedback on what can be improved an Trac Ticket 8441.
  • Props to the MultiWidget class, on which WP_Widget is based: http://blog.firetree.net/2008/11/30/wordpress-multi-widget/
  • The above extracted from Ryan Boren's wp-hackers post.

See also Widgets API.

Menu reordering via plugin

  • Example plugin demonstrates menus with Dashboard, Posts, and Comments in the first menu group. The remaining menus follow in their usual order.
  • When filtering the order array, any menus that are not mentioned in the array will be sorted after ones that are mentioned.
  • Unmentioned menus are sorted in their usual order, relative to other unmentioned menus.
  • Information extracted from Ryan Boren's comments on Trac Ticket 9652

Features That Didn't Make it into Version 2.8

These features didn't make it into Version 2.8 (or Version 2.7).

  • Some default shortcodes, maybe the most popular 10 from WordPress.com
  • oEmbed support, tied in with shortcodes
  • Better UI for post revisions, maybe an optional field to say what changed in a version
  • OAuth support
  • GeoData for posts, comments, attachments, etc.
  • Template tags to do everything the custom gallery on ma.tt does
  • Menu editor
  • Unbalanced tags across more and nextpage tags (Ticket 6297)
  • Sitemaps by default
  • Refresh of the importers (LiveJournal was refreshed)
  • Gallery post_type
  • Versioning of template edits
  • Documentation links for functions used in currently edited template
  • MPTT (Modified Preorder Tree Traversal) for hierarchies

模板:Versions