Edit Flow v0.6.4: Bulk edit custom statuses and bug fixes

Late on the release blog post for this one, sorry. A week or so ago, we finished Edit Flow v0.6.4, which you can now download from the WordPress.org forums.

The most significant improvement is that you can properly bulk edit posts and pages with custom statuses.

For editorial metadata, we’ve added a “Number” metadata type, along with a link to easily clear the field when dealing with date metadata.

Lastly, we’ve added filters for the “Posts I’m Following” widget on the dashboard, and for the posts that appear in the calendar. If you’ve wanted to add custom post types to either of these interfaces, now’s your chance!

Check out our full changes in the changelog. Also, we’ll be moving from our Google Group to a development P2 if you’d like to follow along.

Edit Flow v0.6.3: Email bug fix and seeing unpublished content

We released Edit Flow v0.6.3 on Monday to fix/add a few things. First, we restored email notifications to old delivery method instead of queueing with WP cron because of reliability issues. This should fix any and all notification delivery problems. Second, per a request in the forums, we’ve added the ability to see just “unpublished” content on the story budget and editorial calendar. This could be pretty useful for those newsrooms with a lot of content published on a daily basis.

As always, please hit us with feedback, ideas, and questions in the WordPress.org forum.

Code Sample: Changing the number of posts on the Story Budget

We received a question from Quint Randle about how to customize the number of posts displayed in the Story Budget view of Edit Flow (which is 10 by default), so I thought I’d write up a quick tutorial here. It’s simple, and enabled in Edit Flow by this bit of code.

To increase (or decrease) the number of posts from the default of 10, just add a small code snippet to the functions.php file in your theme. For instance, the following would increase the number of stories shown per category to 20:

add_filter( 'ef_story_budget_query_limit', create_function( '', 'return 20;' ) );

Just modify the ’20’ above to whatever number of posts you’d like to see in the Story Budget view. And voilà!

Of course you could split out the create_function call above to actually use a function that you’ve defined elsewhere in your functions.php file, but unless you’re going to have complicated logic to decide how many posts to display, I don’t see the need for anything beyond that one-liner.

Any further tutorials you would like to see on our blog here? There are lots and lots of filters baked into Edit Flow that are just dying to be unlocked by you, our users—let us know in the comments below what you’d like to customize or see in action and we’ll do our best to explain how to use it! And as always, for support questions, please post your question here.

Code Sample: Filtering Custom Statuses by Role

We’ve received a number of requests from Edit Flow users asking for the ability to limit statuses to specific roles. While this isn’t possible via the WordPress admin, you can write a bit of code to implement this. Just add the following snippet to the functions.php file of your active theme and modify as necessary.

The code sample limits authors to only set ‘Draft’ and ‘Pitch’ statuses, whereas editors (and administrators, by omission) have access to all statuses.

 -1,
	'author' => array( 'draft', 'pitch' )
);

add_filter( 'ef_custom_status_list', 'ef_x_filter_statuses_by_role', 10, 2 );

function ef_x_filter_statuses_by_role( $statuses, $post ) {
	global $role_status_map;
	
	$role = ef_x_get_user_role();
	if( isset( $role_status_map[$role] ) && $role_status_map[$role] != -1 ) {
		$statuses = ef_x_filter_by_value( $statuses, 'slug', $role_status_map[$role] );
	}
	
	return $statuses;
}

function ef_x_get_user_role() {
	$user = wp_get_current_user();
	return array_shift( $user->roles );
}

function ef_x_filter_by_value( $array, $property, $value ) { 
	$filtered_array = array();
	foreach( (array) $array as $index => $item ) { 
		if( isset( $item->$property ) ) {
			if ( ( is_array( $value ) && in_array( $item->$property, $value ) ) || $item->$property == $value ) {
				$filtered_array[$index] = $item;
			}
		}
	} 
	return $filtered_array; 
}

Edit Flow v0.6.1: Custom post type support and minor improvements

We released Edit Flow v0.6.1 yesterday. While the version number suggests a minor upgrade, we’ve put a lot of work into this release and have a number of new features, improvements and fixes that you’ll enjoy.

Note: Edit Flow v0.6 and above requires WordPress 3.0

Custom Post Type Support

Edit Flow now supports Custom Post Types

Edit Flow now supports Custom Post Types

It’s a feature many of you have been asking for since Custom Post Types were added in WordPress 3.0. We’re happy to announce that Edit Flow is now custom post type-friendly. You can easily add or remove any Edit Flow feature to your custom post types with a few lines of code. We’ve included some code samples to get you started.

Note: Custom post statuses are now enabled for pages by default as we’ve removed the option from the settings. You can disable them if you’d like with the remove_post_type_support() method.

i18n (Internationalization)

We’ve heard many of our users across the world are interested in translating Edit Flow into their native languages. With this release, we’ve gone through and cleaned up the plugin to make that easy. If you’re interested in providing a translation for Edit Flow, please get in touch and we’ll gladly include it with the plugin. Pig latin is a language too!

Filtering Users and Usergroups

User and Usergroup search and filters

User and Usergroup search and filters

If you have a large list of users, you now how difficult it can be to scroll through and find the exact person you’re looking for. We’ve added filters and search-as-you-type to user and usergroup lists to make that a little easier.

Email Queueing

Emails sent by Edit Flow are now optimized to use queueing for improved performance (and to avoid being flagged as spam).

Bug Fixes

We’ve also fixed a number of bugs:

  • Users without JavaScript no longer see the status dropdown
  • Users with JavaScript no longer see the respond button for editorial comments
  • Contributors should not have the ability to publish through Quick Edit
  • Proper i18n support (Thanks Beto Frega and others)
  • Editorial Comments issue in IE (Thanks asecondwill and James Skaggs)
  • Always email admin feature was not working (Thanks nicomollet)
  • Notifications for scheduled posts did not include links (Thanks erikajurney)

For the full list of changes in this release, view the changelog. If you run into issues, the best place to go for help is the WordPress.org Support Forum.

How to disable email notifications for post status changes

In the WordPress.org forum, a user wanted to know how to disable email notifications for post status changes without also disabling email notifications for new editorial comments. Edit Flow makes this pretty simple to do. Simply add the following snippet to the functions.php file of your active theme and you’re good to go!

As of v0.6, Edit Flow hooks into ‘transition_post_status’ to add an email notification when the post status changes. To disable these email notifications, all you need to do is remove the hook.

Looking for your input: our first Edit Flow survey

As we start putting the finishing touches on v0.6, we’ve realized that we want to hear more from our users. Please fill out the survey at the below link so we can better shape Edit Flow’s future toward your needs. Thanks in advance!

Take our survey here

v0.5.3: Duplication Bug Fix

We just pushed out v0.5.3 which fixes the duplication issue that users have been reporting. Thanks to everyone for letting us know about the issue.

You should be prompted for an upgrade from the WordPress admin, or you can download it here.