charliespider
Forum Replies Created
-
Forum: Plugins
In reply to: [Event Espresso - Event Registration & Ticketing Sales] Google Mapsthat’s a great idea, I’m going to add that to our Feature Request list if it’s not there already.
thanks
there are settings for the /events/ archive page in the WP admin under:
Event Espresso > General Settings > Templates
Scroll down to “Event List Pages“
The setting you want is “Display Expired Events”Forum: Plugins
In reply to: [amr ical events lists] plugin is conflicting with Event EspressoHi anmari,
Collectively, the Event Espresso tEEm has spent hundreds of hours wrestling with datetime and timezone issues (it gets even trickier when you roll translations and PHP 5.2 into the mix – yuk) so I understand how you can be wary of changing something that, for the most part, has been working for you. I feel your pain, I really do.
Anyways, one thing that I forgot to mention in my first post is that the ONLY real reason you need to use date_default_timezone_set() is if you are using the PHP date() function anywhere in your code, and need to have the dates it produces corrected for your timezone offset. So removing date_default_timezone_set() is fine, but you will ALSO have to search through your plugin, and as the first article I linked to on the WP VIP site stated, use the WP current_time() function instead of date(). The current_time() function will apply the WP timezone offset that is saved in the WP settings.
You can find the current_time() function in wp-includes/functions.php.
Hope that helps a bit more.
Take care and good luck.
Forum: Plugins
In reply to: [amr ical events lists] plugin is conflicting with Event EspressoHi midsouthflyfishers and anmari,
I’m the lead Dev for Event Espresso.
The reason that the amr_set_defaults_for_datetime() function is throwing off your Event Espresso datetimes is because it uses the PHP function date_default_timezone_set() which is highly discouraged by WordPress.
see:
- https://vip.wordpress.com/documentation/use-current_time-not-date_default_timezone_set/
- https://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/
- https://www.taupecat.com/2010/10/using-time-in-your-wordpress-plugin/
WordPress expects the timezone to ALWAYS be set to UTC+0, and as you can read in the last article I linked to, it is the official position of the core WordPress developers.
If you need to adjust the timezone, your best bet is to create PHP Datetime objects (see: https://www.php.net//manual/en/class.datetime.php) which allows you to set the timezone for each object.
Overriding the base WordPress timezone with date_default_timezone_set() throws everything off and should never be done.
Event Espresso 3 at one point used date_default_timezone_set() and it caused problems for other plugins, so we know all about this issue.
In Event Espresso 4, ALL of our datetime fields in the db are now stored in UTC+0 and then have their timezone offset applied immediately after being pulled from the db. For some of our larger clients running events in multiple timezones, this is the only possible way to handle this correctly.
Hope this helps.
Forum: Themes and Templates
In reply to: [Customizr] No sidebar.php fileThanks for getting back to me.
I’m the lead developer for Event Espresso (www.eventespresso.com) and was just trying out a bunch of themes with an upcoming version of our core plugin that isn’t publicly available yet.there’s a hook in get_sidebar() (/wp-includes/general-template.php line 85)
do_action( 'get_sidebar', $name );
that would have allowed an easy fix if only your sidebar file had been named:
sidebar-class-content.php instead of class-content-sidebar.php
So i don’t know off the top of my head what another easy solution would be.
This doesn’t really affect what I’m doing at all, I’m just trying to help you out. I like this theme btw.
but here’s some more errors:
created a new user role that I ONLY want to have admin access to their user profile, not the dashboard or anything else, so on the Main Menu tab for the Access Manager, I checked off “whole branch” for every page except, Users, where I checked off everything except “Your Profile”
Then after logging out and loggin in as one of these new user roles, I get this error in the sidebar menu:
Notice: Undefined offset: 2 in /wp-admin/menu-header.php on line 52 Notice: Undefined offset: 2 in /wp-admin/menu-header.php on line 57 Notice: Undefined offset: 2 in /wp-admin/menu-header.php on line 57 Notice: Undefined offset: 0 in /wp-admin/menu-header.php on line 75
just read another thread re: SOAP
You should look into using the WordPress HTTP API, because then you wouldn’t have to worry about these kinds of issues.
figured it out.
the plugin I’m working on splits the code into admin and frontend areas, and the query_vars were being added in the frontend area and therefore were not accessible to your plugin in the admin.
MY BAD
thanks again for a great plugin
@michalskiluc they’re talking about the WP native List tables class for generating the tables you see in the WP admin, for example: the list of all posts ( /wp-admin/edit.php ).
You can learn more about list tables here: https://codex.www.ads-software.com/Class_Reference/WP_List_Table