PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.5.1
JetFormBuilder — Dynamic Blocks Form Builder v3.6.5.1
3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / vendor / woocommerce / action-scheduler / classes / ActionScheduler_SystemInformation.php
jetformbuilder / vendor / woocommerce / action-scheduler / classes Last commit date
WP_CLI 1 month ago abstracts 1 month ago actions 1 year ago data-stores 1 month ago migration 1 year ago schedules 1 year ago schema 1 month ago ActionScheduler_ActionClaim.php 1 year ago ActionScheduler_ActionFactory.php 1 year ago ActionScheduler_AdminView.php 1 year ago ActionScheduler_AsyncRequest_QueueRunner.php 1 year ago ActionScheduler_Compatibility.php 1 year ago ActionScheduler_DataController.php 1 month ago ActionScheduler_DateTime.php 1 year ago ActionScheduler_Exception.php 2 years ago ActionScheduler_FatalErrorMonitor.php 1 year ago ActionScheduler_InvalidActionException.php 1 year ago ActionScheduler_ListTable.php 1 year ago ActionScheduler_LogEntry.php 1 year ago ActionScheduler_NullLogEntry.php 1 year ago ActionScheduler_OptionLock.php 1 year ago ActionScheduler_QueueCleaner.php 1 year ago ActionScheduler_QueueRunner.php 1 year ago ActionScheduler_RecurringActionScheduler.php 1 month ago ActionScheduler_SystemInformation.php 1 year ago ActionScheduler_Versions.php 1 year ago ActionScheduler_WPCommentCleaner.php 1 year ago ActionScheduler_wcSystemStatus.php 1 month ago
ActionScheduler_SystemInformation.php
94 lines
1 <?php
2
3 /**
4 * Provides information about active and registered instances of Action Scheduler.
5 */
6 class ActionScheduler_SystemInformation {
7 /**
8 * Returns information about the plugin or theme which contains the current active version
9 * of Action Scheduler.
10 *
11 * If this cannot be determined, or if Action Scheduler is being loaded via some other
12 * method, then it will return an empty array. Otherwise, if populated, the array will
13 * look like the following:
14 *
15 * [
16 * 'type' => 'plugin', # or 'theme'
17 * 'name' => 'Name',
18 * ]
19 *
20 * @return array
21 */
22 public static function active_source(): array {
23 $plugins = get_plugins();
24 $plugin_files = array_keys( $plugins );
25
26 foreach ( $plugin_files as $plugin_file ) {
27 $plugin_path = trailingslashit( WP_PLUGIN_DIR ) . dirname( $plugin_file );
28 $plugin_file = trailingslashit( WP_PLUGIN_DIR ) . $plugin_file;
29
30 if ( 0 !== strpos( dirname( __DIR__ ), $plugin_path ) ) {
31 continue;
32 }
33
34 $plugin_data = get_plugin_data( $plugin_file );
35
36 if ( ! is_array( $plugin_data ) || empty( $plugin_data['Name'] ) ) {
37 continue;
38 }
39
40 return array(
41 'type' => 'plugin',
42 'name' => $plugin_data['Name'],
43 );
44 }
45
46 $themes = (array) search_theme_directories();
47
48 foreach ( $themes as $slug => $data ) {
49 $needle = trailingslashit( $data['theme_root'] ) . $slug . '/';
50
51 if ( 0 !== strpos( __FILE__, $needle ) ) {
52 continue;
53 }
54
55 $theme = wp_get_theme( $slug );
56
57 if ( ! is_object( $theme ) || ! is_a( $theme, \WP_Theme::class ) ) {
58 continue;
59 }
60
61 return array(
62 'type' => 'theme',
63 // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
64 'name' => $theme->Name,
65 );
66 }
67
68 return array();
69 }
70
71 /**
72 * Returns the directory path for the currently active installation of Action Scheduler.
73 *
74 * @return string
75 */
76 public static function active_source_path(): string {
77 return trailingslashit( dirname( __DIR__ ) );
78 }
79
80 /**
81 * Get registered sources.
82 *
83 * It is not always possible to obtain this information. For instance, if earlier versions (<=3.9.0) of
84 * Action Scheduler register themselves first, then the necessary data about registered sources will
85 * not be available.
86 *
87 * @return array<string, string>
88 */
89 public static function get_sources() {
90 $versions = ActionScheduler_Versions::instance();
91 return method_exists( $versions, 'get_sources' ) ? $versions->get_sources() : array();
92 }
93 }
94