5.2.3 Release

Posted on August 31, 2012

This update fixes a couple of bugs and makes some minor amendments to the settings page. Here’s a summary of these changes:

  • Improvement to iCal all-day time format (works with Apple iCal now)
  • Fixed the events_list_grouped shortcode not using formats supplied.
  • Removed ‘remove from page lists’ options for category/event/location pages
  • Added calendar day abbreviations (useful for some languages e.g. Catalan, Welsh)
  • Moved events page calendar options to ‘pages’ tab, event list/archives panel
  • fixed attributes bug using default value even when custom value entered (arose in 5.2.2)
  • added search button custom text setting
  • removed duplicate confirm/error notices in bookings admin area (dashboard-side)
  • fixed #_LOCATIONPOSTID showing location id instead

Important Note (for some)

The¬†“Show events/category/location page in lists?” Options have gone. A few of you may notice your Events/Locations/Categories pages turning up on page lists as a result.

I’ll explain why we removed it, and how to achieve the same result if you are one of the (we hope few) that still need this.

  • We made this option way back in the day before WP menus existed and themes just output your pages as a menu structure. This obviously came in handy for those who couldn’t code and make their own menu, but now you should be able to make custom page lists using the native WP menu builder, there’s far fewer reasons to use this now.
  • We have enough settings and options as is, and inevitably with more on the way these just add to the potentiaconfusion.
  • Adding to point 1, this adds an extra hook that does various (now¬†unnecessary) checks to remove these pages from the page lists, whether or not you use it.
  • In less code, you can achieve the same effect.

Achieve the same effect

Since this is so easy to recreate, and the vast majority now don’t need this functionality, here’s a snippet which will work for ANY page, post or CPT you want to exlcude from lists.

/**
* Filters the get_pages functions so it excludes a page
* @param $data
* @return array
*/
function my_excluded_pages($pages) {
	$output = array();
	$exclude_pages = array(1,2,3); //the page ids you want to exclude
	foreach( $pages as $page_id => $page ) {
		if( in_array($page->ID, $exclude_pages) ){
			unset($pages[$page_id]);
		}
	}
	return $pages;
}
add_filter ( 'get_pages', 'my_excluded_pages' );

You can paste this e.g. into your theme functions.php file, and then modify line 8 so that 1,2,3 match your page ids. To find a page id, go to edit that page in your admin dashboard, and you should see a post=X in your url, X is the page id.

What’s next?

It’s come the time that we need to look at the foundation we’ve built this plugin on. Due to this, we’ll be putting the brakes on new features for a few weeks. I’ve written a blog post about this explaining more as to why this is happening, and what we’re hoping to achieve from it.

Comments are closed.