PATH:
home
/
ediuae
/
petalwellnessspa.com
/
wp-content
/
plugins
/
simply-schedule-appointments
/
includes
<?php /** * Simply Schedule Appointments Debug. * * @since 4.0.1 * @package Simply_Schedule_Appointments */ /** * Simply Schedule Appointments Debug. * * @since 4.0.1 */ class SSA_Debug { /** * Parent plugin class. * * @since 4.0.1 * * @var Simply_Schedule_Appointments */ protected $plugin = null; /** * Constructor. * * @since 4.0.1 * * @param Simply_Schedule_Appointments $plugin Main plugin object. */ public function __construct( $plugin ) { $this->plugin = $plugin; $this->hooks(); } /** * Initiate our hooks. * * @since 4.0.1 */ public function hooks() { add_action( 'admin_init', array( $this, 'debug_settings' ) ); add_action( 'init', array( $this, 'display_ssa_debug_logs' ) ); } public function debug_settings() { if ( ! isset( $_GET['ssa-debug-settings'] ) ) { return; } if ( ! current_user_can( 'ssa_manage_site_settings' ) ) { return; } $settings = $this->plugin->settings->get(); if ( ! empty( $_GET['ssa-debug-settings'] ) ) { if ( empty( $settings[esc_attr( $_GET['ssa-debug-settings'] )] ) ) { die( 'setting slug not found' ); // phpcs:ignore } $settings = $settings[esc_attr( $_GET['ssa-debug-settings'] )]; } echo '<pre>'.print_r($settings, true).'</pre>'; // phpcs:ignore exit; } public function display_ssa_debug_logs() { if ( empty( $_GET['ssa-debug-logs'] )) { return; } if ( self::get_site_unique_hash_for_debug_logs() !== esc_attr( $_GET['ssa-debug-logs'] ) ) { return; } if ( isset( $_GET['revisions'] ) ) { $this->display_ssa_revisions_logs(); return; } if ( isset( $_GET['revisions_meta'] ) ) { $this->display_ssa_revisions_meta_logs(); return; } $path = $this->plugin->support_status->get_log_file_path( 'debug' ); if ( file_exists( $path ) && is_readable( $path ) ) { $content = file_get_contents( $path ); echo '<pre>'.print_r($content, true).'</pre>'; // phpcs:ignore exit; } } public static function get_site_unique_hash_for_debug_logs() { return SSA_Utils::site_unique_hash( 'ssa-debug-logs' ); } public function display_ssa_revisions_logs() { $args = array(); if ( ! empty( $_GET['appointment_id'] )) { $args['appointment_id'] = esc_attr( $_GET['appointment_id'] ); } if ( ! empty( $_GET['appointment_type_id'] )) { $args['appointment_type_id'] = esc_attr( $_GET['appointment_type_id'] ); } if ( ! empty( $_GET['user_id'] )) { $args['user_id'] = esc_attr( $_GET['user_id'] ); } if ( ! empty( $_GET['staff_id'] )) { $args['staff_id'] = esc_attr( $_GET['staff_id'] ); } if ( ! empty( $_GET['id'] )) { $args['id'] = esc_attr( $_GET['id'] ); } $args = array_merge( array( 'orderby' => 'id', 'order' => 'DESC', 'number' => 100 ), $args ); $revisions = $this->plugin->revision_model->query( $args ); if ( empty( $revisions ) ) { echo 'No revisions have been found'; exit; } $revisions = array_reverse( $revisions ); ob_start(); include $this->plugin->dir('templates/ssa-logs/revisions.php'); echo ob_get_clean(); exit; } public function display_ssa_revisions_meta_logs() { $args = array(); if ( ! empty( $_GET['revision_id'] )) { $args['revision_id'] = esc_attr( $_GET['revision_id'] ); } if ( ! empty( $_GET['meta_key'] )) { $args['meta_key'] = esc_attr( $_GET['meta_key'] ); } if ( ! empty( $_GET['meta_value_before'] )) { $args['meta_value_before'] = esc_attr( $_GET['meta_value_before'] ); } if ( ! empty( $_GET['meta_value'] )) { $args['meta_value'] = esc_attr( $_GET['meta_value'] ); } if ( ! empty( $_GET['id'] )) { $args['id'] = esc_attr( $_GET['id'] ); } $args = array_merge( array( 'orderby' => 'id', 'order' => 'DESC', 'number' => 100 ), $args ); $revisions_meta = $this->plugin->revision_meta_model->query( $args ); if ( empty( $revisions_meta ) ) { echo 'No revisions meta have been found'; exit; } $revisions_meta = array_reverse( $revisions_meta ); ob_start(); include $this->plugin->dir('templates/ssa-logs/revisions-meta.php'); echo ob_get_clean(); exit; } }
[-] class-settings.php
[edit]
[-] class-hooks.php
[edit]
[-] class-availability-query.php
[edit]
[-] class-appointment-model.php
[edit]
[-] class-beaver-builder.php
[edit]
[-] class-web-meetings.php
[edit]
[-] class-availability-model.php
[edit]
[-] class-recipient-admin.php
[edit]
[-] class-recipient-customer.php
[edit]
[-] class-constants.php
[edit]
[-] class-async-action-model.php
[edit]
[-] class-support.php
[edit]
[-] class-google-calendar-client.php
[edit]
[+]
..
[-] class-capabilities.php
[edit]
[-] class-encryption.php
[edit]
[-] class-availability-cache-invalidation.php
[edit]
[-] class-calendar-events-settings.php
[edit]
[-] class-settings-global.php
[edit]
[-] class-translation.php
[edit]
[-] class-cli.php
[edit]
[-] class-missing.php
[edit]
[-] class-action-scheduler.php
[edit]
[-] class-templates-api.php
[edit]
[-] class-blackout-dates.php
[edit]
[-] class-calendar-events-object.php
[edit]
[-] class-divi.php
[edit]
[-] class-templates.php
[edit]
[-] class-wp-admin.php
[edit]
[-] class-appointment-factory.php
[edit]
[-] class-scheduling-max-per-day.php
[edit]
[-] class-notifications-api.php
[edit]
[-] class-shortcodes.php
[edit]
[-] class-validation.php
[edit]
[-] class-resource-group-object-factory.php
[edit]
[-] class-payment-object.php
[edit]
[-] class-locale.php
[edit]
[-] class-ics-exporter.php
[edit]
[-] class-filesystem.php
[edit]
[-] class-recipient-shared.php
[edit]
[-] class-availability-schedule.php
[edit]
[-] class-block-upcoming-appointments.php
[edit]
[-] class-elementor.php
[edit]
[-] class-appointment-meta-model.php
[edit]
[-] class-revision-meta-model.php
[edit]
[+]
divi
[-] class-notifications.php
[edit]
[-] class-upgrade.php
[edit]
[-] class-utils.php
[edit]
[-] class-availability-functions.php
[edit]
[-] class-external-calendar-api.php
[edit]
[-] class-csv-exporter.php
[edit]
[-] class-external-google-calendar-api.php
[edit]
[-] class-twig-extension.php
[edit]
[-] class-bootstrap.php
[edit]
[-] class-notices.php
[edit]
[-] class-availability-schedule-factory.php
[edit]
[-] class-blackout-dates-settings.php
[edit]
[-] class-support-status.php
[edit]
[-] class-block-booking.php
[edit]
[-] class-advanced-scheduling-availability.php
[edit]
[-] class-exception.php
[edit]
[-] class-styles-settings.php
[edit]
[-] class-forms.php
[edit]
[-] class-recipient-staff.php
[edit]
[+]
beaver-builder
[-] class-users.php
[edit]
[-] class-sequence-factory.php
[edit]
[+]
third-party
[-] class-locales.php
[edit]
[-] class-db-model.php
[edit]
[-] class-db.php
[edit]
[-] class-availability-default.php
[edit]
[-] class-staff-settings.php
[edit]
[-] class-notification-model.php
[edit]
[-] class-settings-installed.php
[edit]
[-] class-appointment-object.php
[edit]
[-] class-notices-api.php
[edit]
[-] class-translation-settings.php
[edit]
[-] class-support-status-api.php
[edit]
[-] class-notices-data.php
[edit]
[-] class-appointment-type-object.php
[edit]
[-] class-appointment-type-object-factory.php
[edit]
[-] class-availability-block-factory.php
[edit]
[-] class-recipient.php
[edit]
[-] class-revision-model.php
[edit]
[-] class-customers.php
[edit]
[-] class-settings-api.php
[edit]
[-] class-cache.php
[edit]
[-] class-availability-detective-case.php
[edit]
[-] class-styles.php
[edit]
[-] class-capacity-settings.php
[edit]
[-] class-gcal-exporter.php
[edit]
[-] class-advanced-scheduling-settings.php
[edit]
[-] class-appointment-type-model.php
[edit]
[-] class-notifications-settings.php
[edit]
[-] class-period.php
[edit]
[-] class-external-api.php
[edit]
[-] class-error-notices.php
[edit]
[-] class-availability-cache.php
[edit]
[-] class-developer-settings.php
[edit]
[-] class-dashboard-upcoming-appointments-widget.php
[edit]
[-] class-availability-external-model.php
[edit]
[-] class-availability-block.php
[edit]
[-] class-customer-information.php
[edit]
[+]
elementor
[-] class-appointment-type-label-model.php
[edit]
[-] class-embed-booking-app-api.php
[edit]
[+]
lib
[-] class-sequence.php
[edit]
[-] class-debug.php
[edit]
[-] class-appointment-types-db.php
[edit]