WordPress 3.0 Menu Update

The new menus WordPress 3.0 just got an update, provided by Ptah Dunbar. Thanks Ptah, cool work! I checked out the new version. But first a screenshot of the backend:

WordPress 3.0 Menu Option Page

As you can see, you can build your menu from modules. Right now these are pages, posts, custom links, categories, tags and media. You can sort the entries in your menu via drag & drop. Here an edit menu item screenshot:

Wordpress 3.0 edit menu item screenshot

New Screenshots Of WordPress 3.0

Unfortunately we don't have time right now to write new posts, but at least we want you to show some new screenshots of WordPress 3.0.

WordPress 3.0 Background settings

WordPress background settings

Now you have the option to set positon, repeat and attachment.

WordPress 3.0 Header Image

WordPress 3.0 Header Image8 header images are available in the new theme TwentyTen.

WordPress 3.0 Menu Settings

WordPress 3.0 Menu Screenshot

First Impressions of Custom Post Type

One of the new very interesting things in WordPress 3.0 are individual post-types you can implement with little effort. Back then, you had to expand the database and write your own interface for it, now you just have to add a few lines of code - of course this is just the current state, which can be change until the final release.

After Justin had been playing with these types, we check out the possibilities of types for "Movies".

Simple Solution

function post_type_movies() {
	register_post_type( 'movies',
                array( 'label' => __('Movies'), 'public' => true, 'show_ui' => true ) );
	register_taxonomy_for_object_type('post_tag', 'movies');
}
add_action('init', 'post_type_movies');

default custom post type

More parameters for meta-boxes

Of course there are a number of parameters for this function and so the behavior and appearance of the corresponding edit page can be controlled quite easily, a small sample with additional meta boxes:

function post_type_movies() {
	register_post_type(
                     'movies', 
                     array('label' => __('Movies'), 
                             'public' => true, 
                             'show_ui' => true,
                             'supports' => array(
                                        'post-thumbnails',
                                        'excerpts',
                                        'trackbacks',
                                        'custom-fields',
                                        'comments',
                                        'revisions')
                                ) 
                      );
	register_taxonomy_for_object_type('post_tag', 'movies');
}
add_action('init', 'post_type_movies');

The default arguments

// Args prefixed with an underscore are reserved for internal use.
$defaults = array(
    'label' => false,
    'publicly_queryable' => null,
    'exclude_from_search' => null,
    '_builtin' => false,
    '_edit_link' => 'post.php?post=%d',
    'capability_type' => 'post',
    'hierarchical' => false,
    'public' => false,
    'rewrite' => true,
    'query_var' => true,
    'supports' => array(),
    'register_meta_box_cb' => null,
    'taxonomies' => array(),
    'show_ui' => null
);
  • label - A descriptive name for the post type marked for translation. Defaults to $post_type
  • public - Whether posts of this type should be shown in the admin UI. Defaults to false
  • exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public
  • publicly_queryable - Whether post_type queries can be performed from the front page. Defaults to whatever public is set as
  • show_ui - Whether to generate a default UI for managing this post type. Defaults to true if the type is public, false if the type is not public
  • inherit_type - The post type from which to inherit the edit link and capability type. Defaults to none
  • capability_type - The post type to use for checking read, edit, and delete capabilities. Defaults to "post"
  • edit_cap - The capability that controls editing a particular object of this post type. Defaults to "edit_$capability_type" (edit_post)
  • edit_type_cap - The capability that controls editing objects of this post type as a class. Defaults to "edit_ . $capability_type . s" (edit_posts)
  • edit_others_cap - The capability that controls editing objects of this post type that are owned by other users. Defaults to "edit_others_ . $capability_type . s" (edit_others_posts)
  • edit_others_cap - The capability that controls publishing objects of this post type. Defaults to "publish_ . $capability_type . s" (publish_posts)
  • read_cap - The capability that controls reading a particular object of this post type. Defaults to "read_$capability_type" (read_post)
  • delete_cap - The capability that controls deleting a particular object of this post type. Defaults to "delete_$capability_type" (delete_post)
  • hierarchical - Whether the post type is hierarchical. Defaults to false
  • supports - An alias for calling add_post_type_support() directly. See add_post_type_support() for Documentation. Defaults to none
  • register_meta_box_cb - Provide a callback function that will be called when setting up the meta boxes for the edit form. Do remove_meta_box() and add_meta_box() calls in the callback
  • taxonomies - An array of taxonomy identifiers that will be registered for the post type. Default is no taxonomies. Taxonomies can be registered later with register_taxonomy() or register_taxonomy_for_object_type()

Including Custom Taxonomies

In the following example we include in our Post-Type a Taxonomy with two possibilities; own Tags and categories for Post-Type Movies, the classical tag, without hierarchy and one as category, tag with hierarchies.

function post_type_movies() {
	register_post_type(
                'movies', 
                array(
                        'label' => __('Movies'),
                        'public' => true,
                        'show_ui' => true,
                        'supports' => array(
                                     'post-thumbnails',
                                     'excerpts',
                                     'trackbacks',
                                     'custom-fields',
                                     'comments',
                                     'revisions')
                )
        );
	
	register_taxonomy( 'actor', 'movies', array( 'hierarchical' => true, 'label' => __('Actor') ) ); 
	
        register_taxonomy( 'production', 'movies',
		array(
                         'hierarchical' => false,
			 'label' => __('Production'),
			 'query_var' => 'production',
			 'rewrite' => array('slug' => 'production' )
		)
	);
}
add_action('init', 'post_type_movies');

Definitely a very interesting and useful feature which provides many possibilities to play around with.

WordPress 3.0 Custom Background Support

In WordPress 3.0, it will have, additional to the Custom Header Image support, also a Custom Background Support. A first snapshot is in the current trunk. To use the functionality, the theme needs in functions.php this line:

add_custom_background();

After that, there is in your backend under Appearance the menu Custom Background available.

WordPress 3.0 Custom Background Step 1

After uploading an image, you have the option to activate "Tile the background" and delete the background image.

WordPress 3.0 Custom Background Support Step 2

Here the result with the new Theme Twenty Ten.

Theme Twenty Ten with Custom Background Support

WordPress 3.0 Specific Author Templates

WordPress 3.0 Author TemplateIn WordPress 3.0 it will be possible to use specific author templates. The function get_author_template() has been expanded in wp-includes/theme.php.

Now you can create a author-michael.php or author-123.php, which will be called via the WordPress Template Hierarchy in connection to the author with user_nicename michael or ID 123. Basically the same funtionality as we known for categories.

WordPress 3.0 Multisite Settings

Exclusively 2 Screenshots of the new WordPress 3.0 Multisite Settings. You can find them under Options->Network:
WordPress 3.0 Network settings step 1
After you set the settings, you receive in a second step the content for wp-config.php and .htaccess. Additionally you have to create the subfolder blogs.dir in wp-content , where you put the media-files for each blog.

WordPress 3.0 Network settings step 2

Since WordPress 3.0 is still in development, there might be many changes until the final release.