Submit
Path:
~
/
home
/
getwphos
/
www
/
techniquetechs
/
wp-content
/
plugins
/
woocommerce
/
packages
/
action-scheduler
/
classes
/
File Content:
ActionScheduler_SystemInformation.php
<?php /** * Provides information about active and registered instances of Action Scheduler. */ class ActionScheduler_SystemInformation { /** * Returns information about the plugin or theme which contains the current active version * of Action Scheduler. * * If this cannot be determined, or if Action Scheduler is being loaded via some other * method, then it will return an empty array. Otherwise, if populated, the array will * look like the following: * * [ * 'type' => 'plugin', # or 'theme' * 'name' => 'Name', * ] * * @return array */ public static function active_source(): array { $plugins = get_plugins(); $plugin_files = array_keys( $plugins ); foreach ( $plugin_files as $plugin_file ) { $plugin_path = trailingslashit( WP_PLUGIN_DIR ) . dirname( $plugin_file ); $plugin_file = trailingslashit( WP_PLUGIN_DIR ) . $plugin_file; if ( 0 !== strpos( dirname( __DIR__ ), $plugin_path ) ) { continue; } $plugin_data = get_plugin_data( $plugin_file ); if ( ! is_array( $plugin_data ) || empty( $plugin_data['Name'] ) ) { continue; } return array( 'type' => 'plugin', 'name' => $plugin_data['Name'], ); } $themes = (array) search_theme_directories(); foreach ( $themes as $slug => $data ) { $needle = trailingslashit( $data['theme_root'] ) . $slug . '/'; if ( 0 !== strpos( __FILE__, $needle ) ) { continue; } $theme = wp_get_theme( $slug ); if ( ! is_object( $theme ) || ! is_a( $theme, \WP_Theme::class ) ) { continue; } return array( 'type' => 'theme', // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase 'name' => $theme->Name, ); } return array(); } /** * Returns the directory path for the currently active installation of Action Scheduler. * * @return string */ public static function active_source_path(): string { return trailingslashit( dirname( __DIR__ ) ); } /** * Get registered sources. * * It is not always possible to obtain this information. For instance, if earlier versions (<=3.9.0) of * Action Scheduler register themselves first, then the necessary data about registered sources will * not be available. * * @return array<string, string> */ public static function get_sources() { $versions = ActionScheduler_Versions::instance(); return method_exists( $versions, 'get_sources' ) ? $versions->get_sources() : array(); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
WP_CLI
---
0755
abstracts
---
0755
actions
---
0755
data-stores
---
0755
migration
---
0755
schedules
---
0755
schema
---
0755
ActionScheduler_ActionClaim.php
652 bytes
0644
ActionScheduler_ActionFactory.php
16293 bytes
0644
ActionScheduler_AdminView.php
10492 bytes
0644
ActionScheduler_AsyncRequest_QueueRunner.php
2163 bytes
0644
ActionScheduler_Compatibility.php
3904 bytes
0644
ActionScheduler_DataController.php
5403 bytes
0644
ActionScheduler_DateTime.php
2060 bytes
0644
ActionScheduler_Exception.php
207 bytes
0644
ActionScheduler_FatalErrorMonitor.php
2565 bytes
0644
ActionScheduler_InvalidActionException.php
1477 bytes
0644
ActionScheduler_ListTable.php
21437 bytes
0644
ActionScheduler_LogEntry.php
1942 bytes
0644
ActionScheduler_NullLogEntry.php
330 bytes
0644
ActionScheduler_OptionLock.php
4076 bytes
0644
ActionScheduler_QueueCleaner.php
8066 bytes
0644
ActionScheduler_QueueRunner.php
9715 bytes
0644
ActionScheduler_SystemInformation.php
2497 bytes
0644
ActionScheduler_Versions.php
3690 bytes
0644
ActionScheduler_WPCommentCleaner.php
4519 bytes
0644
ActionScheduler_wcSystemStatus.php
5264 bytes
0644
N4ST4R_ID | Naxtarrr