/
home
/
altere25
/
labratnyc.com
/
wp-content
/
plugins
/
query-monitor
/
classes
/
/home/altere25/labratnyc.com/wp-content/plugins/query-monitor/classes
mkdir
upload
Name
Size
Mode
Actions
Activation.php
3038
0644
edit
dl
rm
ArrayAccess.php
1105
0644
edit
dl
rm
Backtrace.php
22887
0644
edit
dl
rm
Backtrace_Frame.php
870
0644
edit
dl
rm
CLI.php
1568
0644
edit
dl
rm
Collector.php
8707
0644
edit
dl
rm
Collectors.php
3445
0644
edit
dl
rm
Collector_Assets.php
14500
0644
edit
dl
rm
Component.php
3866
0644
edit
dl
rm
Component_Altis_Vendor.php
356
0644
edit
dl
rm
Component_Core.php
263
0644
edit
dl
rm
Component_Dropin.php
346
0644
edit
dl
rm
Component_MU_Plugin.php
333
0644
edit
dl
rm
Component_MU_Vendor.php
342
0644
edit
dl
rm
Component_Other.php
170
0644
edit
dl
rm
Component_PHP.php
221
0644
edit
dl
rm
Component_Plugin.php
324
0644
edit
dl
rm
Component_Stylesheet.php
341
0644
edit
dl
rm
Component_Template.php
278
0644
edit
dl
rm
Component_Unknown.php
866
0644
edit
dl
rm
Component_VIP_Plugin.php
346
0644
edit
dl
rm
Data.php
428
0644
edit
dl
rm
DataCollector.php
396
0644
edit
dl
rm
DB.php
1546
0644
edit
dl
rm
debug_bar.php
1713
0644
edit
dl
rm
debug_bar_panel.php
1446
0644
edit
dl
rm
Deprecated_Argument_Run.php
1035
0644
edit
dl
rm
Deprecated_Class_Run.php
966
0644
edit
dl
rm
Deprecated_Constructor_Run.php
1144
0644
edit
dl
rm
Deprecated_File_Included.php
1095
0644
edit
dl
rm
Deprecated_Function_Run.php
983
0644
edit
dl
rm
Deprecated_Hook_Run.php
1098
0644
edit
dl
rm
Dispatcher.php
5097
0644
edit
dl
rm
Dispatchers.php
1241
0644
edit
dl
rm
Doing_It_Wrong_Run.php
892
0644
edit
dl
rm
Frame_Registry.php
1456
0644
edit
dl
rm
Hook.php
1379
0644
edit
dl
rm
Output.php
923
0644
edit
dl
rm
PHP.php
1397
0644
edit
dl
rm
Plugin.php
2400
0644
edit
dl
rm
QM.php
4451
0644
edit
dl
rm
QueryMonitor.php
8705
0644
edit
dl
rm
Timer.php
3326
0644
edit
dl
rm
Util.php
19901
0644
edit
dl
rm
Wrong.php
822
0644
edit
dl
rm
Edit:
/home/altere25/labratnyc.com/wp-content/plugins/query-monitor/classes/Collector.php
(8707B)
<?php declare(strict_types = 1); /** * Abstract data collector. * * @package query-monitor */ if ( ! class_exists( 'QM_Collector' ) ) { abstract class QM_Collector { /** * @var QM_Timer|null */ protected $timer; /** * @var QM_Data */ protected $data; /** * @var bool|null */ protected static $hide_qm = null; /** * @var array<string, array<string, mixed>> */ public $concerned_actions = array(); /** * @var array<string, array<string, mixed>> */ public $concerned_filters = array(); /** * @var array<string, array<string, mixed>> */ public $concerned_constants = array(); /** * @var array<int, string> */ public $tracked_hooks = array(); /** * @var string */ public $id = ''; public function __construct() { $this->data = $this->get_storage(); } /** * @return void */ public function set_up() {} /** * @return string */ final public function id() { return "qm-{$this->id}"; } /** * @param string $type * @return void */ protected function log_type( $type ) { if ( isset( $this->data->types[ $type ] ) ) { $this->data->types[ $type ]++; } else { $this->data->types[ $type ] = 1; } } /** * @deprecated Component calculations are now handled client-side. * * @param QM_Component $component * @param float $ltime * @param string|int $type * @return void */ protected function log_component( $component, $ltime, $type ) {} /** * @return float */ public static function timer_stop_float() { return microtime( true ) - $_SERVER['REQUEST_TIME_FLOAT']; } /** * @param string $constant * @return string */ public static function format_bool_constant( $constant ) { // @TODO this should be in QM_Util if ( ! defined( $constant ) ) { /* translators: Undefined PHP constant */ return __( 'undefined', 'query-monitor' ); } elseif ( constant( $constant ) === '' ) { return __( 'empty string', 'query-monitor' ); } elseif ( is_string( constant( $constant ) ) && ! is_numeric( constant( $constant ) ) ) { return constant( $constant ); } elseif ( ! constant( $constant ) ) { return 'false'; } else { return 'true'; } } /** * @return QM_Data */ public function get_data() { return $this->data; } /** * @return QM_Data */ public function get_storage(): QM_Data { return new QM_Data_Fallback(); } /** * @return void */ final public function discard_data() { $this->data = $this->get_storage(); } /** * @param string $id * @return void */ final public function set_id( $id ) { $this->id = $id; } /** * @return void */ final public function process_concerns() { /** @var array<string, WP_Hook> $wp_filter */ global $wp_filter; $tracked = array(); $id = $this->id; /** * Filters the concerned actions for the given panel. * * The dynamic portion of the hook name, `$id`, refers to the collector ID, which is typically the `$id` * property of the collector class. * * @since 3.3.0 * * @param array<int, string> $actions Array of action names that this panel concerns itself with. */ $concerned_actions = apply_filters( "qm/collect/concerned_actions/{$id}", $this->get_concerned_actions() ); /** * Filters the concerned filters for the given panel. * * The dynamic portion of the hook name, `$id`, refers to the collector ID, which is typically the `$id` * property of the collector class. * * @since 3.3.0 * * @param array<int, string> $filters Array of filter names that this panel concerns itself with. */ $concerned_filters = apply_filters( "qm/collect/concerned_filters/{$id}", $this->get_concerned_filters() ); /** * Filters the concerned options for the given panel. * * The dynamic portion of the hook name, `$id`, refers to the collector ID, which is typically the `$id` * property of the collector class. * * @since 3.3.0 * * @param array<int, string> $options Array of option names that this panel concerns itself with. */ $concerned_options = apply_filters( "qm/collect/concerned_options/{$id}", $this->get_concerned_options() ); /** * Filters the concerned constants for the given panel. * * The dynamic portion of the hook name, `$id`, refers to the collector ID, which is typically the `$id` * property of the collector class. * * @since 3.3.0 * * @param array<int, string> $constants Array of constant names that this panel concerns itself with. */ $concerned_constants = apply_filters( "qm/collect/concerned_constants/{$id}", $this->get_concerned_constants() ); foreach ( $concerned_actions as $action ) { if ( has_action( $action ) ) { $this->concerned_actions[ $action ] = QM_Hook::process( $action, 'action', $wp_filter[ $action ] ?? null, true, false ); } $tracked[] = $action; } foreach ( $concerned_filters as $filter ) { if ( has_filter( $filter ) ) { $this->concerned_filters[ $filter ] = QM_Hook::process( $filter, 'filter', $wp_filter[ $filter ] ?? null, true, false ); } $tracked[] = $filter; } $option_filters = array( // Should this include the pre_delete_ and pre_update_ filters too? 'pre_option_%s', 'default_option_%s', 'option_%s', 'pre_site_option_%s', 'default_site_option_%s', 'site_option_%s', ); foreach ( $concerned_options as $option ) { foreach ( $option_filters as $option_filter ) { $filter = sprintf( $option_filter, $option ); if ( has_filter( $filter ) ) { $this->concerned_filters[ $filter ] = QM_Hook::process( $filter, 'filter', $wp_filter[ $filter ] ?? null, true, false ); } $tracked[] = $filter; } } $this->concerned_actions = array_filter( $this->concerned_actions, array( $this, 'filter_concerns' ) ); $this->concerned_filters = array_filter( $this->concerned_filters, array( $this, 'filter_concerns' ) ); foreach ( $concerned_constants as $constant ) { if ( defined( $constant ) ) { $this->concerned_constants[ $constant ] = constant( $constant ); } } sort( $tracked ); $this->tracked_hooks = $tracked; } /** * @param array<string, mixed> $concerns * @return bool */ public function filter_concerns( $concerns ) { return ! empty( $concerns['actions'] ); } /** * @param WP_User $user_object * @return array<string, mixed> */ public static function format_user( WP_User $user_object ) { $user = get_object_vars( $user_object->data ); unset( $user['user_pass'], $user['user_activation_key'] ); $user['roles'] = $user_object->roles; return $user; } /** * @return bool */ public static function enabled() { return true; } /** * @return bool */ public static function hide_qm() { if ( ! defined( 'QM_HIDE_SELF' ) ) { return false; } if ( null === self::$hide_qm ) { self::$hide_qm = QM_HIDE_SELF; } return self::$hide_qm; } public static function get_host(): string { if ( isset( $_SERVER['HTTP_HOST'] ) ) { return strval( wp_unslash( $_SERVER['HTTP_HOST'] ) ); } return (string) parse_url( get_option( 'home' ), PHP_URL_HOST ); } public static function get_origin(): string { $scheme = is_ssl() ? 'https' : 'http'; return $scheme . '://' . self::get_host(); } /** * @param array<string, mixed> $item * @phpstan-param array{ * component?: QM_Component, * trace?: QM_Backtrace, * } $item * @return bool */ public function filter_remove_qm( array $item ) { if ( isset( $item['trace'] ) ) { return ( 'query-monitor' !== $item['trace']->get_component()->context ); } if ( isset( $item['component'] ) ) { return ( 'query-monitor' !== $item['component']->context ); } return true; } /** * @param mixed[] $items * @return bool */ public function filter_dupe_items( $items ) { return ( count( $items ) > 1 ); } /** * @return void */ public function process() {} /** * @return void */ public function post_process() {} /** * @return void */ public function tear_down() {} /** * @return QM_Timer|null */ public function get_timer() { return $this->timer; } /** * @param QM_Timer $timer * @return void */ public function set_timer( QM_Timer $timer ) { $this->timer = $timer; } /** * @return array<int, string> */ public function get_concerned_actions() { return array(); } /** * @return array<int, string> */ public function get_concerned_filters() { return array(); } /** * @return array<int, string> */ public function get_concerned_options() { return array(); } /** * @return array<int, string> */ public function get_concerned_constants() { return array(); } } }
Save
cmd:
run