PluginProbe
Property Hive / 2.3.0
Property Hive v2.3.0
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
← All changes | includes/class-ph-install.php +13 -0 2.2.32.3.0 View file →
@@ -126,8 +126,9 @@
126 126 wp_clear_scheduled_hook( 'propertyhive_process_email_log' );
127 127 wp_clear_scheduled_hook( 'propertyhive_auto_email_match' );
128 128 wp_clear_scheduled_hook( 'propertyhive_check_licenses' );
129 129 wp_clear_scheduled_hook( 'propertyhive_update_address_concatenated' );
130 + wp_clear_scheduled_hook( 'propertyhive_cleanup_search_analytics' );
130 131 }
131 132
132 133 /**
133 134 * Get list of DB update callbacks.
@@ -151,8 +152,9 @@
151 152 add_action('property_run_update_actions', $update_callback);
152 153 }
153 154 }
154 155 }
156 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Existing public Property Hive extension hook property_run_update_actions; changing the established name would detach installed callbacks.
155 157 do_action('property_run_update_actions');
156 158 }
157 159
158 160 /**
@@ -165,8 +167,9 @@
165 167 wp_clear_scheduled_hook( 'propertyhive_process_email_log' );
166 168 wp_clear_scheduled_hook( 'propertyhive_auto_email_match' );
167 169 wp_clear_scheduled_hook( 'propertyhive_check_licenses' );
168 170 wp_clear_scheduled_hook( 'propertyhive_update_address_concatenated' );
171 + wp_clear_scheduled_hook( 'propertyhive_cleanup_search_analytics' );
169 172
170 173 // Schedule for midnight as it's likely traffic will be quieter at that time
171 174 wp_schedule_event( strtotime( 'tomorrow' ) - ( (int)get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ), 'daily', 'propertyhive_update_currency_exchange_rates' );
172 175
@@ -196,8 +199,10 @@
196 199 // 1am so it doesn't run at exactly the same time as the exchange rate cron
197 200 wp_schedule_event( strtotime( 'tomorrow +1hours' ) - ( (int)get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ), 'daily', 'propertyhive_check_licenses' );
198 201
199 202 wp_schedule_event( strtotime( 'tomorrow +3hours' ) - ( (int)get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ), 'daily', 'propertyhive_update_address_concatenated' );
203 +
204 + wp_schedule_event( time() + HOUR_IN_SECONDS, 'daily', 'propertyhive_cleanup_search_analytics' );
200 205 }
201 206
202 207 public function custom_cron_recurrence( $schedules )
203 208 {
@@ -791,8 +796,16 @@
791 796 $tables .= "
792 797 CREATE TABLE {$wpdb->prefix}ph_address_keyword_polygon (
793 798 address_keyword varchar(255) NOT NULL,
794 799 polygon_coordinates longtext NOT NULL
800 + ) $collate;";
801 +
802 + $tables .= "
803 + CREATE TABLE {$wpdb->prefix}ph_search_log (
804 + id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
805 + searched_at datetime NOT NULL,
806 + PRIMARY KEY (id),
807 + KEY searched_at (searched_at)
795 808 ) $collate;";
796 809
797 810 dbDelta( $tables );
798 811 }