Bug in DB option names for grid format header/footer
-
In
em-functions.php
, the wrong names are used for the database option names when getting the event and location grid format header and footer. This means that if the user has defined grid format headers and/or footers in/user/wordpress/wp-content/themes/my-theme-of-choice/plugins/events-manager/formats
, the relevant files won’t be found.Luckily, this is an easy fix, as shown below, where the fix is given in bold and line numbers (for EM 6.4.5.1) are shown in square brackets.
[892] function em_output_events_view( $args, $view = null ){ … [911] if( empty($args['format_header']) ){ $args['format_header'] = get_option('dbem_event_grid_item_format_header'); } [914] if( empty($args['format_footer']) ){ $args['format_footer'] = get_option('dbem_event_grid_item_format_footer'); } … }
[954] function em_output_locations_view( $args, $view = null ){ … [973] if( empty($args['format_header']) ){ $args['format_header'] = get_option('dbem_location_grid_item_format_header'); } [976] if( empty($args['format_footer']) ){ $args['format_footer'] = get_option('dbem_location_grid_item_format_footer'); } … }
Essentially, the database option names are missing
_item
between_grid
and_format
. Easy mistake to make.As far as I can tell, the correct database option names are used elsewhere.
- The topic ‘Bug in DB option names for grid format header/footer’ is closed to new replies.