| @@ -2,9 +2,9 @@ | ||
| 2 | 2 | /* |
| 3 | 3 | Plugin Name: WPSchoolPress |
| 4 | 4 | Plugin URI: http://wpschoolpress.com |
| 5 | 5 | Description: WPSchoolpress is a school management system plugin that makes school activities transparent to parents. For more information please visit our website. |
| 6 | -Version: 2.2.38 | |
| 6 | +Version: 2.2.48 | |
| 7 | 7 | Author: WPSchoolPress Team |
| 8 | 8 | Author URI: wpschoolpress.com |
| 9 | 9 | Text Domain: wpschoolpress |
| 10 | 10 | Domain Path: languages |
| @@ -15,9 +15,9 @@ | ||
| 15 | 15 | /** |
| 16 | 16 | * Basic plugin definitions |
| 17 | 17 | * |
| 18 | 18 | * @package WPSchoolPress |
| 19 | - * @since 2.2.37 | |
| 19 | + * @since 2.2.48 | |
| 20 | 20 | */ |
| 21 | 21 | if (!defined('WPSP_PLUGIN_URL')) |
| 22 | 22 | { |
| 23 | 23 | define('WPSP_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | define('WPSP_PLUGIN_PATH', plugin_dir_path(__FILE__)); |
| 28 | 28 | } |
| 29 | 29 | if (!defined('WPSP_PLUGIN_VERSION')) |
| 30 | 30 | { |
| 31 | - define('WPSP_PLUGIN_VERSION', '2.2.38'); //Plugin version number | |
| 31 | + define('WPSP_PLUGIN_VERSION', '2.2.48'); //Plugin version number | |
| 32 | 32 | } |
| 33 | 33 | define('WPSP_PERMISSION_MSG', 'You don\'t have enough permission to access this page'); |
| 34 | 34 | // Call the required files when plugin activate |
| 35 | 35 | register_activation_hook(__FILE__, 'wpsp_activation'); |
| @@ -88,9 +88,9 @@ | ||
| 88 | 88 | // Frontend: defer until after the query is resolved so is_page() works. |
| 89 | 89 | add_action( 'template_redirect', function() { |
| 90 | 90 | $wpsp_slugs = array( |
| 91 | 91 | 'sch-dashboard','sch-student','sch-transport','sch-parent', |
| 92 | - 'sch-class','sch-teacher','sch-messages','sch-profile', | |
| 92 | + 'sch-class','sch-teacher','sch-profile', | |
| 93 | 93 | 'sch-exams','sch-marks','sch-attendance','sch-timetable', |
| 94 | 94 | 'sch-reminder','sch-events','sch-subject','sch-settings', |
| 95 | 95 | 'sch-calendar','sch-teacherattendance','sch-notify', |
| 96 | 96 | 'sch-payment','sch-importhistory','sch-leavecalendar', |
| @@ -95,9 +95,9 @@ | ||
| 95 | 95 | 'sch-calendar','sch-teacherattendance','sch-notify', |
| 96 | 96 | 'sch-payment','sch-importhistory','sch-leavecalendar', |
| 97 | 97 | 'sch-changepassword','sch-editprofile','sch-postsprofile', |
| 98 | 98 | 'sch-posts','sch-posts-notification','sch-reported-posts', |
| 99 | - 'sch-documents','sch-history','sch-request', | |
| 99 | + 'sch-documents','sch-request', | |
| 100 | 100 | ); |
| 101 | 101 | if ( is_page( $wpsp_slugs ) && function_exists('wpsp_get_setting') ) { |
| 102 | 102 | wpsp_get_setting(); |
| 103 | 103 | } |
| @@ -191,12 +191,8 @@ | ||
| 191 | 191 | add_action('wp_ajax_addTransport', 'wpsp_AddTransport'); |
| 192 | 192 | add_action('wp_ajax_updateTransport', 'wpsp_UpdateTransport'); |
| 193 | 193 | add_action('wp_ajax_viewTransport', 'wpsp_ViewTransport'); |
| 194 | 194 | add_action('wp_ajax_deleteTransport', 'wpsp_DeleteTransport'); |
| 195 | - add_action('wp_ajax_sendMessage', 'wpsp_SendMessage'); | |
| 196 | - add_action('wp_ajax_sendSubMessage', 'wpsp_sendSubMessage'); | |
| 197 | - add_action('wp_ajax_viewMessage', 'wpsp_ViewMessage'); | |
| 198 | - add_action('wp_ajax_deleteMessage', 'wpsp_DeleteMessage'); | |
| 199 | 195 | add_action('wp_ajax_photoUpload', 'wpsp_UploadPhoto'); |
| 200 | 196 | add_action('wp_ajax_deletePhoto', 'wpsp_DeletePhoto'); |
| 201 | 197 | add_action('wp_ajax_DeleteStudent', 'wpsp_DeleteStudent'); |
| 202 | 198 | add_action('wp_ajax_DeleteTeacher', 'wpsp_DeleteTeacher'); |
| @@ -246,5 +242,22 @@ | ||
| 246 | 242 | $role->add_cap( 'edit_posts', true ); |
| 247 | 243 | } |
| 248 | 244 | } |
| 249 | 245 | add_action( 'init', 'wpsp_std_role', 11 ); |
| 246 | + | |
| 247 | +// Appsero deactivation block | |
| 248 | +if ( ! class_exists( 'Appsero\Client' ) ) { | |
| 249 | + require_once WPSP_PLUGIN_PATH . 'includes/appsero/src/Client.php'; | |
| 250 | +} | |
| 251 | + | |
| 252 | +function wpsp_lms_appsero_init() { | |
| 253 | + $client = new Appsero\Client( | |
| 254 | + '174e4f64-1448-49aa-98bd-514dff30fd7b', | |
| 255 | + 'School Management System – WPSchoolPress', | |
| 256 | + __FILE__ | |
| 257 | + ); | |
| 258 | + | |
| 259 | + $client->insights()->init(); | |
| 260 | +} | |
| 261 | + | |
| 262 | +wpsp_lms_appsero_init(); | |
| 250 | 263 | ?> |