77 * Plugin URI: http://www.eduadmin.se
88 * Description: EduAdmin plugin to allow visitors to book courses at your website
99 * Tags: booking, participants, courses, events, eduadmin, lega online
10- * Version: 1.0.1
10+ * Version: 1.0.3
1111 * GitHub Plugin URI: multinetinteractive/eduadmin-wordpress
1212 * GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress
1313 * Requires at least: 3.0
@@ -155,10 +155,6 @@ private function includes() {
155155 include_once ( 'includes/_textFunctions.php ' );
156156 include_once ( 'includes/_loginFunctions.php ' );
157157
158- if ( file_exists ( EDUADMIN_PLUGIN_PATH . '/.official.plugin.php ' ) ) {
159- include_once ( '.official.plugin.php ' );
160- }
161-
162158 $ this ->bookingHandler = new EduAdminBookingHandler ( $ this );
163159 $ this ->loginHandler = new EduAdminLoginHandler ( $ this );
164160 }
@@ -169,7 +165,6 @@ private function init_hooks() {
169165 add_action ( 'after_switch_theme ' , array ( $ this , 'new_theme ' ) );
170166 add_action ( 'init ' , array ( $ this , 'init ' ) );
171167 add_action ( 'plugins_loaded ' , array ( $ this , 'load_language ' ) );
172- add_action ( 'eduadmin_call_home ' , array ( $ this , 'call_home ' ) );
173168 add_action ( 'wp_footer ' , 'edu_getTimers ' );
174169
175170 register_deactivation_hook ( __FILE__ , array ( $ this , 'deactivate ' ) );
@@ -187,22 +182,6 @@ public static function SetupWarning() {
187182 <?php
188183 }
189184
190- public function get_plugin_version () {
191- $ cachedVersion = wp_cache_get ( 'eduadmin-version ' , 'eduadmin ' );
192- if ( false !== $ cachedVersion ) {
193- return $ cachedVersion ;
194- }
195-
196- if ( ! function_exists ( 'get_plugin_data ' ) ) {
197- require_once ( ABSPATH . 'wp-admin/includes/plugin.php ' );
198- }
199-
200- $ version = get_plugin_data ( __FILE__ )['Version ' ];
201- wp_cache_set ( 'eduadmin-version ' , $ version , 'eduadmin ' , 3600 );
202-
203- return $ version ;
204- }
205-
206185 /**
207186 * @return string Returns the users IP adress
208187 */
@@ -217,29 +196,10 @@ public function get_ip_adress() {
217196 return "UNKNOWN " ;
218197 }
219198
220- public function call_home () {
221- global $ wp_version ;
222- $ usageData = array (
223- 'siteUrl ' => get_site_url (),
224- 'siteName ' => get_option ( 'blogname ' ),
225- 'wpVersion ' => $ wp_version ,
226- 'token ' => get_option ( 'eduadmin-api-key ' ),
227- 'officialVersion ' => file_exists ( EDUADMIN_PLUGIN_PATH . "/.official.plugin.php " ),
228- 'pluginVersion ' => $ this ->get_plugin_version (),
229- );
230-
231- $ callHomeUrl = 'https://ws10.multinet.se/edu-plugin/wp_phone_home.php ' ;
232- wp_remote_post ( $ callHomeUrl , array ( 'body ' => $ usageData ) );
233- }
234-
235199 public function load_language () {
236200 $ locale = apply_filters ( 'plugin_locale ' , get_locale (), 'eduadmin-booking ' );
237201 load_textdomain ( 'eduadmin-booking ' , WP_LANG_DIR . '/eduadmin/ ' . 'eduadmin-booking ' . '- ' . $ locale . '.mo ' );
238202 load_plugin_textdomain ( 'eduadmin-booking ' , false , EDUADMIN_PLUGIN_PATH . '/languages ' );
239-
240- if ( ! wp_next_scheduled ( 'eduadmin_call_home ' ) ) {
241- wp_schedule_event ( time (), 'hourly ' , 'eduadmin_call_home ' );
242- }
243203 }
244204
245205 public function new_theme () {
@@ -248,7 +208,6 @@ public function new_theme() {
248208
249209 public function deactivate () {
250210 eduadmin_deactivate_rewrite ();
251- wp_clear_scheduled_hook ( 'eduadmin_call_home ' );
252211 }
253212 }
254213
0 commit comments