v0.7.4: Enhancements and bugfixes

Some small enhancements, and a laundry bag of fixes:

  • Added ‘Scheduled’ as one of the statuses you see in the ‘Posts At A Glance’ widget. ‘Private’ and other core statuses can be added with a filter.
  •  Sort posts on the Manage Posts view by visible editorial metadata date fields.
  • Modify email notifications with two filters.
  • Bug fix: Proper support for unicode characters in custom status and editorial metadata descriptions.
  • Bug fix: Show the proper last modified value on the story budget when the server’s timezone is not set to GMT. Props danls.
  • Bug fix: Make the jQuery UI theme for Edit Flow more specific so it doesn’t conflict with core modals.
  • Bug fix: Use the proper singlular label for a post type when generating notification text.
  • Bug fix: Post slug now updates when the post has a custom status.
  • Bug fix: When determining whether a user can change a post’s status, check the ‘edit_posts’ cap for the post type.

See Github for all of the closed issues.

As always, please hit us with questions, feature requests, and bug reports in the WordPress.org forums. If you’d like to help out, check out our guide to contributing.

v0.7.2: Custom statuses for contributors

Thanks to an awesome contribution from Daniel Chesterton, we have an oft-requested feature to give you today: custom statuses for contributors. Previously, your contributors and other users without the ‘publish_posts’ capability had two options, “Save as Draft” or “Submit for Review”. With Edit Flow v0.7.2, they can save content to any stage of your workflow.

Here’s what the submit meta box now looks like for your contributors:

You can use a simple filter to restrict your contributors to only changing specific statuses. If you did so, it would look like this:

In this release, we’ve also incorporated the following changes:

  • Support for trashing posts from the calendar. Thanks Dan York for the idea and a bit of code.
  • Updated codebase to use PHP5-style OOP references.
  • Fixed some script and stylesheet references that had a double ‘//’ in the URI path
  • New edit_flow_supported_module_post_types_args filter allows you to enable custom statuses and other modules for private post types

See Github for all of the closed issues.

As always, please hit us with questions, feature requests, and bug reports in the WordPress.org forums. If you’d like to help out, check out our guide to contributing.

Edit Flow v0.7.1: Enhancements and bugfixes

Coming to you live from a rainy Portland afternoon: Edit Flow v0.7.1. This is mostly a enhancements and bugfixes release with the following points of interest:

  • Shows the year on the calendar and story budget if it’s not the current year.
  • Allows users to save post subscriptions the first time they save the post. This also fixes the bug where a user wouldn’t be subscribed until they saved the post twice.
  • Changed the behavior of notifications for the user changing a status or leaving a comment. Previously, they’d receive an email with the action they just performed; now they do not. This can be changed with a filter.
  • New Italian localization thanks to Luca Patané.
  • Bug fix: Auto-subscribe the post author to their posts by default but make it filterable.
  • Bug fix: Only show “authors”, or contributors and above, in the user dropdown for the calendar and the story budget. This new behavior can be filtered out however.
  • Bug fix: Metaboxes are registered with proper priority. Props benbalter
  • Bug fix: If a user hasn’t ever opened the calendar before, the date should default to today, not the Unix Epoch
  • Bug fix: Prevent editorial metadata filters from stomping on others’ uses by actually returning the original value when we don’t want to manipulate it
  • Bug fix: Specify a max-width on <select> dropdowns in the calendar and story budget so long values don’t break formatting

See Github for all of the closed issues.

On that note, getting involved with the code side of the project is now easier than ever. We’ve moved all of our project management to Github.

One way to get acquainted with the code base is by producing a functional code snippet. We have a list of code snippets requested at one point or another, including:

  • Remove the publish capability for certain statuses so you don’t accidentally publish a pitch or similar pre-production post (#55)
  • Send out reminders to users based on the value in an editorial metadata date field (#48)
  • Include users listed in the “User” editorial metadata field as recipients of notifications (#46)

If your code snippet works well and meets our standards, we’ll add it to our site documentation and thank you profusely.

Use Edit Flow with files of any format

This is a guest post from Ben Balter, the developer behind WP Document Revisions, a 2011 Google Summer of Code project.

The coolest thing about the WordPress community, is that well, it’s a community. Developers don’t just write code in vacuum and send it on its way, but rather are part of an ecosystem of mutual inspiration and informal collaboration.

WP Document Revisions a document management and collaboration plugin for WordPress announced recently that the latest release will automatically detect Edit Flow, if installed, and will pull Edit Flow’s workflow tools into its own interface — cool, huh?

While this is undoubtedly a great pat on the back for Edit Flow and its efforts, the bigger news for the community is that now teams can use Edit Flow’s proven workflow tools in their newsroom with virtually any file format — Word, Adobe, images, anything.

If you want to give it a try, simply download and activate WP Document Revisions and begin working, no additional configuration required if you’ve already got Edit Flow installed.

Edit Flow v0.6.5: Fixes post timestamp issue when using custom statuses

Out just a moment ago, Edit Flow v0.6.5 has one purpose: to fix an issue with the post timestamp being set when you set a post to a custom status.

Basically, if you set a post or a page to a custom post status, the publication timestamp would be set and saved. Upon publication of the piece, the publication date was set to whenever you originally saved the post with a custom post status. Our fix works around some of the limitations of WordPress core on this issue.

WordPress.org user saomay deserves our thanks for their patience in helping track down the issue, and testing the fixes. It was originally reported in the forum.

It’s worth noting that we’re actively working on v0.7. You can follow our discussion on our development blog. We’ll be looking for beta testers, translators, and documentation writers shortly. If you’d like to help out, let us know in the comments.

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; 
}