load_dependencies(); $this->define_plugin_hooks(); } /** * Load the required dependencies for this functionality * * @since 1.0.0 * @access private */ private function load_dependencies() { // Load the logger class require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-activity-log-pro-logger.php'; // Initialize the logger $this->logger = new ACTLOGPRO_Activity_Log_Pro_Logger(); } /** * Register all of the hooks related to plugin events * * @since 1.0.0 * @access private */ private function define_plugin_hooks() { // Only register these hooks if plugin tracking is enabled if (get_option('actlogpro_track_plugin_events', '1') === '1') { // Register hooks for plugin events add_action('activated_plugin', array($this->logger, 'log_plugin_activated')); add_action('deactivated_plugin', array($this->logger, 'log_plugin_deactivated')); add_action('upgrader_process_complete', array($this->logger, 'log_plugin_updated'), 10, 2); add_action('deleted_plugin', array($this->logger, 'plugin_deleted'), 10, 2); add_action('upgrader_process_complete', array($this->logger, 'plugin_deleted_via_upgrader'), 10, 2); } // Initialize RSS feed functionality (JSON feeds handled by premium plugin) require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-alp-feed-rss.php'; // Initialize the RSS feed class $plugin_rss_feed = new ACTLOGPRO_Feed_RSS(); } }