PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / trunk
Image Optimizer – Compress Images and Convert to WebP or AVIF vtrunk
1.7.7 1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 All 33 releases
← All changes | vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php +0 -62 1.6.4 → trunk View file →
@@ -18,15 +18,8 @@
18 18 */
19 19 private $versions = array();
20 20
21 21 /**
22 - * Registered sources.
23 - *
24 - * @var array<string, string>
25 - */
26 - private $sources = array();
27 -
28 - /**
29 22 * Register version's callback.
30 23 *
31 24 * @param string $version_string Action Scheduler version.
32 25 * @param callable $initialization_callback Callback to initialize the version.
@@ -34,15 +27,9 @@
34 27 public function register( $version_string, $initialization_callback ) {
35 28 if ( isset( $this->versions[ $version_string ] ) ) {
36 29 return false;
37 30 }
38 -
39 - // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
40 - $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS );
41 - $source = $backtrace[0]['file'];
42 -
43 31 $this->versions[ $version_string ] = $initialization_callback;
44 - $this->sources[ $source ] = $version_string;
45 32 return true;
46 33 }
47 34
48 35 /**
@@ -52,23 +39,8 @@
52 39 return $this->versions;
53 40 }
54 41
55 42 /**
56 - * Get registered sources.
57 - *
58 - * Use with caution: this method is only available as of Action Scheduler's 3.9.1
59 - * release and, owing to the way Action Scheduler is loaded, it's possible that the
60 - * class definition used at runtime will belong to an earlier version.
61 - *
62 - * @since 3.9.1
63 - *
64 - * @return array<string, string>
65 - */
66 - public function get_sources() {
67 - return $this->sources;
68 - }
69 -
70 - /**
71 43 * Get latest version registered.
72 44 */
73 45 public function latest_version() {
74 46 $keys = array_keys( $this->versions );
@@ -112,40 +84,6 @@
112 84 */
113 85 public static function initialize_latest_version() {
114 86 $self = self::instance();
115 87 call_user_func( $self->latest_version_callback() );
116 - }
117 -
118 - /**
119 - * Returns information about the plugin or theme which contains the current active version
120 - * of Action Scheduler.
121 - *
122 - * If this cannot be determined, or if Action Scheduler is being loaded via some other
123 - * method, then it will return an empty array. Otherwise, if populated, the array will
124 - * look like the following:
125 - *
126 - * [
127 - * 'type' => 'plugin', # or 'theme'
128 - * 'name' => 'Name',
129 - * ]
130 - *
131 - * @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source().
132 - *
133 - * @return array
134 - */
135 - public function active_source(): array {
136 - _deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source()' );
137 - return ActionScheduler_SystemInformation::active_source();
138 - }
139 -
140 - /**
141 - * Returns the directory path for the currently active installation of Action Scheduler.
142 - *
143 - * @deprecated 3.9.2 Use ActionScheduler_SystemInformation::active_source_path().
144 - *
145 - * @return string
146 - */
147 - public function active_source_path(): string {
148 - _deprecated_function( __METHOD__, '3.9.2', 'ActionScheduler_SystemInformation::active_source_path()' );
149 - return ActionScheduler_SystemInformation::active_source_path();
150 88 }
151 89 }