Dylan Barlett
Forum Replies Created
-
get_recurrence_days()is in /wp-content/plugins/events-manager/classes/em-event.php, but that was not the cause of the bug. In my case,date_default_timezone_set()was called in the theme’s functions.php.IE 10. To clarify, the admin pages themselves load, it is
http://example.com/fonts/em-dashicons.eotthat returns a 404 (visible in Developer Tools and server logs). See http://i.imgur.com/4CeR4y8.png.I dug deeper and found that the root cause of the incorrect timestamps in
get_recurrence_days()was a call todate_default_timezone_set()in our theme. Removing it and saving the recurring events recreated the recurrences with the correct dates.Site timezone: America/New_York (DST ends 2014-11-02 0200 local)
Week starts on: SundayI created an event that recurs weekly every Tuesday from 2014-10-28 to 2014-11-11. Stepping through
get_recurrence_days()in classes\em-event.php,$matching_daysends up with the following timestamps:- 1414468800: 2014-10-28 0400 UTC = 2014-10-28 0000 local
- 1415073600: 2014-11-04 0400 UTC = 2014-11-03 2300 local (one day early)
- 1415678400: 2014-11-11 0400 UTC = 2014-11-10 2300 local (one day early)
The All/Published/Draft counts don’t filter by date. If you change the dropdown from “Future events” to “All events”, the counts should match the number of events displayed.
Simpler version:
add_filter( 'wpfc_js_vars', 'my_wpfc_js_vars', 10, 1 ); function my_wpfc_js_vars( $js_vars ) { $js_vars['ajaxurl'] = set_url_scheme( $js_vars['ajaxurl'], null ); return $js_vars; }This can be filtered in your theme or plugin instead:
add_filter( 'wpfc_js_vars', 'my_wpfc_js_vars', 10, 1 ); function my_wpfc_js_vars( $js_vars ) { if ( is_ssl() ) { $js_vars['ajaxurl'] = admin_url( 'admin-ajax.php', 'https' ); } else { $js_vars['ajaxurl'] = admin_url( 'admin-ajax.php', 'http' ); } return $js_vars; }Forum: Plugins
In reply to: [Gravity Forms Directory] bug in anchor linking with 3.6.3This is caused by the change to using
GFCommon::get_lead_field_display(), which formats the URL as a link, so the URL regex on line 193 of template-row.php does not match, in turn causing a call toesc_html()before the link is output.As a workaround, add
add_filter( 'kws_gf_directory_format_value', '__return_false' );to your theme functions.php.You can modify
localize_script()in wp-fullcalendar.php so that admin-ajax.php is always called over HTTP://$js_vars['ajaxurl'] = admin_url('admin-ajax.php'); $js_vars['ajaxurl'] = admin_url('admin-ajax.php', 'http');Yes, it is a Genesis Framework child theme. All the custom taxonomy code is in the theme so I can’t just switch to the parent. It’s from the Location with category paste.
Consider the following scenario. There are three locations:
- id=5, location_type=”office”
- id=10, location_type=”fire_station”
- id=15, location_type=”fire_station”
When the AJAX call containing
location_types=fire-stationis processed:EM_Locations::get()queries the DB and gets an array$results[0 => 5, 1 => 10, 2 => 15]- Filter
em_locations_getis applied, which unsets$results[0] EM_Object::json_encode()calls PHP’sjson_encode()
Because the array passed to
json_encode()no longer contains a zero-indexed element, it is encoded as key-value pairs with string keys. From the documentation:When encoding an array, if the keys are not a continuous numeric sequence starting from 0, all keys are encoded as strings, and specified explicitly for each key-value pair.
That explains the difference in output formats, and means that unless the filter unsets only contiguous locations at the end of
$results,[locations_map]won’t work.If the filter reindexes the array with
array_values()(diff) before returning it, the problem seems to be avoided. Is there a more efficient way?Forum: Plugins
In reply to: [Gravity Forms Directory] Extra characters in custom CSS tableThat field is meant for a class name, not CSS rules. Add the CSS to your theme (or use a plugin like Simple Custom CSS) with a new class name (e.g.
my-table-class), then set the class name. See also http://css-tricks.com/complete-guide-table-element/.Forum: Plugins
In reply to: [Gravity Forms Directory] Lightbox not workingThis is fixed in version 3.5.3.
Changing line 315 of edit-forms.php to
if(version_compare(str_replace('beta', '', GFCommon::$version), '1.8', '<')) {eliminates the fatal error in Addons 3.5.1/GF 1.7.13/WP 3.8.Line 315 of edit-form.php throws a fatal error:
Access to undeclared static property: GFForms::$version