{"id":13192,"date":"2011-05-08T10:54:14","date_gmt":"2011-05-08T10:54:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/simple-events\/"},"modified":"2013-11-08T21:44:27","modified_gmt":"2013-11-08T21:44:27","slug":"simple-events","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/simple-events\/","author":1285,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.2","stable_tag":"trunk","tested":"3.7.41","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Simple Events","header_author":"Steve Taylor","header_description":"","assets_banners_color":"","last_updated":"2013-11-08 21:44:27","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.babyloniantimes.co.uk\/index.php?page=donate","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/simple-events\/","header_author_uri":"http:\/\/sltaylor.co.uk","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3763,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","2.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[1487,1486],"plugin_category":[40],"plugin_contributors":[80080],"plugin_business_model":[],"class_list":["post-13192","plugin","type-plugin","status-closed","hentry","plugin_tags-custom-post-types","plugin_tags-events","plugin_category-calendar-and-events","plugin_contributors-gyrus","plugin_committers-gyrus"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/simple-events.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>If the plugin detects that there is a custom post type registered with a particular name (either 'event' or '*_event'), it steps in and does a number of useful additional things:<\/p>\n\n<ul>\n<li>For front-end queries fetching events, returned posts are sorted chronologically, the oldest first.<\/li>\n<li>For front-end queries fetching events, by default only future events are returned. This can be overridden by setting the custom parameter <code>slt_all_events<\/code> in your posts query to <code>true<\/code>. Alternatively, use <code>slt_past_events<\/code> (set to <code>true<\/code>) to get only past events.<\/li>\n<li>By default the current time is used to compare dates for selecting past or future events. To change the time used for the cut-off, use the filter <code>slt_se_listing_time_offset<\/code>. It defaults to <code>0<\/code> (no change from the current time). To set the cut-off to 24 hours ahead of the current time, hook a function to this filter that returns that value in seconds, i.e. <code>60 * 60 * 24<\/code>.<\/li>\n<li>By default events are ordered chronologically. To reverse the order, set <code>slt_reverse_events<\/code> to <code>true<\/code>.<\/li>\n<li>In the admin listing page for events, an 'Event date' column is added.<\/li>\n<li>For particular queries, all actions performed by this plugin can be disabled by setting the custom parameter <code>disable_simple_events<\/code> in your posts query to <code>true<\/code>.<\/li>\n<\/ul>\n\n<p><strong>IMPORTANT:<\/strong> The automatic event filtering only kicks in with front-end queries done using <code>WP_Query<\/code>. Use this rather than <code>get_posts<\/code>.<\/p>\n\n<p>In addition, this function is provided for convenience. If an event date exists for the post in question, it returns that; if not, it returns the standard post date.<\/p>\n\n<pre><code>&lt;?php slt_se_get_date( $the_post = null ) ?&gt;\n<\/code><\/pre>\n\n<ul>\n<li><strong>$the_post<\/strong> (object) (optional) (default: global $post object)<\/li>\n<\/ul>\n\n<p><strong>NOTE:<\/strong> An Event Date custom field will be added to the event edit screen automatically if <a href=\"http:\/\/sltaylor.co.uk\/wordpress\/plugins\/slt-custom-fields\/\">my Custom Fields plugin<\/a> is active. Otherwise, make sure your event post type supports <code>custom-fields<\/code> (see <code>[register_post_type](http:\/\/codex.wordpress.org\/Function_Reference\/register_post_type)<\/code>, and add dates to events with the format YYYY\/MM\/DD, e.g. 2011\/12\/21 - this format is required to allow sorting by this field.<\/p>\n\n<p><strong>NOTE:<\/strong> The filtering performed by this plugin currently doesn't work well with <code>get_posts<\/code> - for now, create custom loops with <code>WP_Query<\/code>.<\/p>\n\n<p>Development code hosted at <a href=\"https:\/\/github.com\/gyrus\/Simple-Events\">GitHub<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>simple-events<\/code> directory into the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.2<\/h4>\n\n<ul>\n<li>Added <code>slt_se_listing_time_offset<\/code> filter<\/li>\n<li>Fixed bug in <code>slt_se_get_date()<\/code> testing of <code>$date_parts<\/code> length<\/li>\n<li>More tests for Developer's Custom Fields functions<\/li>\n<\/ul>\n\n<h4>0.1.6<\/h4>\n\n<ul>\n<li>Set the priority of the init action very low so that any custom post types are definitely registered first (thanks lowe_22!)<\/li>\n<\/ul>\n\n<h4>0.1.5<\/h4>\n\n<ul>\n<li>Changed <code>slt_se_get_date<\/code> so the call to <code>slt_cf_field_value<\/code> works when a post object is passed<\/li>\n<\/ul>\n\n<h4>0.1.4<\/h4>\n\n<ul>\n<li>Added <code>slt_past_events<\/code> and <code>slt_reverse_events<\/code> query vars<\/li>\n<li>Corrected mistake in adding admin listing event date column, needed to use post type in filter name<\/li>\n<\/ul>\n\n<h4>0.1.3<\/h4>\n\n<ul>\n<li>Added a test for whether the query is singular - previously the hooks were preventing the display of past event singular pages<\/li>\n<\/ul>\n\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>Added <code>disable_simple_events<\/code> parameter for posts queries<\/li>\n<li>Added function to consolidate tests for whether a hook should be applied<\/li>\n<li>Changed order in <code>slt_se_parse_query<\/code> to <code>ASC<\/code> (nearest upcoming events first in list)<\/li>\n<li>Changed detection of event post type to \"event\" or \"*_event\"<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Changed date format to allow proper sorting<\/li>\n<li>Removed <code>posts_join<\/code> and <code>posts_where<\/code> filters for WP 3.1.1+ - doesn't seem to be necessary<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>First version<\/li>\n<\/ul>","raw_excerpt":"Provides theme developers with simple extensions to sites with events as a custom post type.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13192"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/gyrus"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13192"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13192"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13192"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13192"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13192"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}