Title: Simon Barnett's Replies | WordPress.org

---

# Simon Barnett

  [  ](https://wordpress.org/support/users/simbasounds/)

 *   [Profile](https://wordpress.org/support/users/simbasounds/)
 *   [Topics Started](https://wordpress.org/support/users/simbasounds/topics/)
 *   [Replies Created](https://wordpress.org/support/users/simbasounds/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/simbasounds/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/simbasounds/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/simbasounds/engagements/)
 *   [Favorites](https://wordpress.org/support/users/simbasounds/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 71 total)

1 [2](https://wordpress.org/support/users/simbasounds/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/simbasounds/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/simbasounds/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/simbasounds/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/simbasounds/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] WooCommerce: ERR_CACHE_MISS with browser back button from basket page](https://wordpress.org/support/topic/woocommerce-err_cache_miss-with-browser-back-button-from-basket-page/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-err_cache_miss-with-browser-back-button-from-basket-page/#post-13606486)
 * Hi Donncha,
 * Many thanks for your reply. My client is resolving this with another developer
   now, so I won’t be able to test the solution, but I’ll take note of your suggestion
   for future reference.
 * Thanks again,
    Simon
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Super Cache] WooCommerce: ERR_CACHE_MISS with browser back button from basket page](https://wordpress.org/support/topic/woocommerce-err_cache_miss-with-browser-back-button-from-basket-page/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/woocommerce-err_cache_miss-with-browser-back-button-from-basket-page/#post-13593655)
 * Thanks Mortelking.
 * This was a client request ie. they and their website users were experiencing 
   the issue, so it wasn’t just happening in my browser.
 * I was able to replicate the issue, and can confirm that it is not browser related
   or browser-specific, especially seeing as the issue does not occur when WP Super
   Cache caching is disabled, so this is an issue with WP Super Cache.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] Recoverable fatal error](https://wordpress.org/support/topic/recoverable-fatal-error-6/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/recoverable-fatal-error-6/#post-12394500)
 * Noted, Jan.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] Recoverable fatal error](https://wordpress.org/support/topic/recoverable-fatal-error-6/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/recoverable-fatal-error-6/#post-12394220)
 * Hi Nayeem, thanks, yes I tried disabling all other plugins, republishing the 
   file post-type using another file post template (default), and the error remained.
 * However when I created another post it worked:
    [https://siliconmountain.co.za/cop/download/test-2/](https://siliconmountain.co.za/cop/download/test-2/)
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[CRM: Contact Management Simplified - UkuuPeople] Holding thumbs](https://wordpress.org/support/?post_type=topic&p=9847024)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [8 years, 3 months ago](https://wordpress.org/support/?post_type=topic&p=9847024#post-9871585)
 * I will attend to this, I promise, Nathan. Deadline on right now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Video Gallery – YouTube Gallery & Responsive Video Playlist] This plugin enabled breaks text editor](https://wordpress.org/support/topic/this-plugin-enabled-breaks-text-editor/)
 *  [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/this-plugin-enabled-breaks-text-editor/#post-9180721)
 * It’s happening to me too. I narrowed down 32 plugins to this one.
    Naturally 
   it was the last one, seeing as the name begins with a “Y”. ..had to laugh.
 * Could it be any of these?
 * **class-install-deactivate.php**
 *     ```
       public function tinymce_fix($init) {
       	$init['wpautop'] = false;
       	return $init;
       }
       ```
   
 * **wysiwyg.php**
 *     ```
       static function value( $new, $old, $post_id, $field )	{
       	if($field['raw']) {
       		$meta = $new;
       	} else if( $field['clone'] ) {
       		$meta = array_map( 'wpautop', $new );
       	} else {
       		$meta = wpautop( $new );
       	}
       	return $meta;
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Where to submit malware samples?](https://wordpress.org/support/topic/where-to-submit-malware-samples/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/where-to-submit-malware-samples/#post-7677189)
 * > Not here
 * I know, which is why I’m asking where.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to find the source of a potentially malicious file?](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/#post-7661149)
 * I decided not to contact them. Once I knew it was from BackupBuddy it was a much
   lower priority than finding the actual exploit on the server.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to find the source of a potentially malicious file?](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/#post-7660859)
 * Thanks Steve.. posted that as you were posting your response. I’m pretty sure
   now that it is BackupBuddy. I’m going to contact iThemes now to make sure, but
   that line is present in a fresh copy of the latest version. Will update here 
   if there’s anything more to add after that. Otherwise thanks again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to find the source of a potentially malicious file?](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/how-to-find-the-source-of-a-potentially-malicious-file/#post-7660856)
 * I did a search for the term “settings_backup” using [String Locator](https://wordpress.org/plugins/string-locator/)
   plugin and it seems the file is being generated by BackupBuddy. The string is
   located at:
    /wp-content/plugins/backupbuddy/classes/housekeeping.php
 *     ```
       // TODO: Added Aug 8, 2016. Remove this section after a while.
       		// Begin removal of botches storage location.
       		$existing_backups = glob( ABSPATH . 'settings_backup-*.php' );
       		if ( ! is_array( $existing_backups ) ) {
       			$existing_backups = array();
       		}
       		foreach( $existing_backups as $existing_backup ) {
       			@unlink( $existing_backup );
       		}
       		// End removal.
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Group event search form results by all day, morning, afternoon, evening](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/#post-7541733)
 * Ok, I guess it’s slightly slow because it’s running multiple queries.
    Any way
   around that? With this, or another method?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Group event search form results by all day, morning, afternoon, evening](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/#post-7541732)
 * Seeing as the scope attribute was already being used to query the date, I created
   a [custom search attribute](http://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/)
   instead.
 * It works, although seems a little slow to query, and I still need to add All 
   Day events.
 * In functions.php
 *     ```
       /* Hook timeperiod search attribute into default search filter */
   
       function timeperiod_search($searches, $array){
       	if( !empty($array['timeperiod']) ){
       		$searches['timeperiod'] = $array['timeperiod'];
       	}
       	return $searches;
       }
       add_filter('em_events_get_default_search','timeperiod_search',1,2);
   
       /* Filter Conditions */
   
       function timeperiod_conditions($conditions, $args){
       	if( !empty($args['timeperiod'])) {
       		$timeperiodval = $args['timeperiod'];
       		if ($timeperiodval == "Morning") {
       			$period_start_time = "06:00:00";
       			$period_end_time = "12:00:00";
       		} elseif ($timeperiodval == "Afternoon") {
       			$period_start_time = "12:00:00";
       			$period_end_time = "18:00:00";
       		} elseif ($timeperiodval == "Evening") {
       			$period_start_time = "18:00:00";
       			$period_end_time = "06:00:00";
       		}
   
       		$conditions['timeperiod'] = " (event_start_time BETWEEN CAST('$period_start_time' AS TIME) AND CAST('$period_end_time' AS TIME))";
       	}
       	return $conditions;
       }
       add_filter( 'em_events_build_sql_conditions', 'timeperiod_conditions',1,2);
       ```
   
 * In events-list.php template file:
 *     ```
       <?php
       $args = apply_filters('em_content_events_args', $args);
   
       if( get_option('dbem_css_evlist') ) echo "<div class='css-events-list'>";
   
       $args['timeperiod'] = 'Morning';
       echo "<h2>Morning</h2>";
       echo EM_Events::output( $args );
   
       $args['timeperiod'] = 'Afternoon';
       echo "<h2>Afternoon</h2>";
       echo EM_Events::output( $args );
   
       $args['timeperiod'] = 'Evening';
       echo "<h2>Evening</h2>";
       echo EM_Events::output( $args );
   
       if( get_option('dbem_css_evlist') ) echo "</div>";
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Group event search form results by all day, morning, afternoon, evening](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/#post-7541713)
 * Each time someone does a search – filtered by date and category – they should
   get the following results in the AJAX container:
 * **All Day Events**
    4 events, filtered by chosen criteria
 * **Morning Events**
    4 events, filtered by chosen criteria
 * **Afternoon Events**
    4 events, filtered by chosen criteria
 * **Evening Events**
    4 events, filtered by chosen criteria
 * Currently I have the filtering working fine, (as per [my staging site](http://simonbarnett.co.za/opendesignct-build/)).
   I just need to split the results into the 4 time periods now. Your suggestion
   of creating a custom scope (or rather 4 custom scopes) sounds like what I was
   after.
 * I think perhaps using the custom scopes in template tags or the object::command
   structure (my own terminology.. hope that’s correct) may be better than using
   the scopes in a shortcode for reasons outlined below, as far as I understand 
   things.
 * If I understand correctly, this is what the plugin is doing:
 * ————————
 * **[event_search_form ajax=”1″]**
    Shortcode on WordPress page. ▼ **events-search.
   php** ◀︎ modified /templates/search/**scope.php** Template file called by event_search
   shortcode. $args from plugin settings. ▼ <div class=”**em-search-ajax**“></div
   > Results container populated by search form results. ▼ **events-list.php** Template
   file used in search results. ▼ **Plugin settings**: event list formatting
 * ————————
 * So it’s the events-list.php which needs to be modified to output four scope-based
   loops instead of one. Or alternatively a filter function can be used.
 * ————————
 * So working through the available options, all using custom scopes except for 
   the last one:
 * 1. **Shortcodes in WordPress page template**
    Not really an option because AJAX
   is being used.
 * 2. **Shortcodes in events-list.php template file**
    Could have been an option,
   but it doesn’t work. I can create custom scopes, one for each time period, and
   put them into [events_list] shortcodes. But if I use the shortcodes in the events-
   list.php template file I get a white screen. I think the shortcode fetches the
   template file, so you end up with an infinite loop.
 * 3. **Shortcodes in filter function**
    So as far as I understand the only remaining
   option that can use a shortcode – albeit via do_shortcode() – is a filter in 
   functions.php, probably em_event_output.
 * 4. **Template tag or object::command (with args) in filter function**
    But if
   I’m using the filter then I may as well use template tags like em_events( $args),
   or an object::command like EM_Events::output( $args ) instead of shortcodes.
 * 5. **EM_Events::output($args) in events-list.php template file**
    Lastly, if 
   we’re using template tags or object::command instead of shortcodes, there’s another
   option available: using those in the events-list.php template file.
 * 6. **Four time-based wp_query loops in filter function**
    Just listing this because
   it’s a possible method. Only use WordPress (non EM) functions to build the loops.
   Custom scopes not needed in this case.
 * ————————
 * Option 1 doesn’t work
    Option 2 doesn’t work Option 3 seems slightly excessive
   Option 4 would probably be most versatile and robust Option 5 seems simplest 
   Option 6 not necessary
 * Hopefully I’ve explained my requirements well.
    Are these all the available options,
   or are there others which are potentially better? Is my assessment of the suitability
   of option 4 and 5 correct?
 * Thanks for the help, Calmin_nwl
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Group event search form results by all day, morning, afternoon, evening](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/group-event-search-form-results-by-all-day-morning-afternoon-evening/#post-7541671)
 * Thanks Calmin_nwl, That sounds like a good approach.
 * The site I’m building is heavily based around the AJAX search form ([staging site here](http://simonbarnett.co.za/opendesignct-build/)).
 * What’s the best place to put the shortcodes so that they will be used in the 
   results container: .em-search-ajax?
 * I think the shortcode calls the events-list.php plugin template file, so they
   can’t be used in there.. just creates an infinite loop.
 * So maybe.. a filter function?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Connect Search and List](https://wordpress.org/support/topic/connect-search-and-list/)
 *  Thread Starter [Simon Barnett](https://wordpress.org/support/users/simbasounds/)
 * (@simbasounds)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/connect-search-and-list/#post-7531946)
 *     ```
       <script>
           jQuery(document).ready(function($){
               $('.em-search-submit').submit();
           });
       </script>
       ```
   
 * ..did the trick : )

Viewing 15 replies - 1 through 15 (of 71 total)

1 [2](https://wordpress.org/support/users/simbasounds/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/simbasounds/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/simbasounds/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/simbasounds/replies/page/5/?output_format=md)
[→](https://wordpress.org/support/users/simbasounds/replies/page/2/?output_format=md)