PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.29
ووسلام – همگام سازی ووکامرس و باسلام v1.10.29
1.10.29 1.10.28 1.1.26 1.10.27 1.10.24 1.10.25 1.10.23 1.10.22 1.10.21 1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 All 62 releases
← All changes | tests/Support/JobsRunnerWordPressStubs.php +48 -0 1.10.21 → 1.10.29 View file →
@@ -19,8 +19,24 @@
19 19 return $GLOBALS['sync_basalam_jobs_runner_test_state']['did_actions'][$hookName] ?? 0;
20 20 }
21 21 }
22 22
23 +if (!function_exists('current_filter')) {
24 + function current_filter()
25 + {
26 + return $GLOBALS['sync_basalam_jobs_runner_test_state']['current_filter'] ?? '';
27 + }
28 +}
29 +
30 +if (!function_exists('fastcgi_finish_request')) {
31 + function fastcgi_finish_request()
32 + {
33 + $GLOBALS['sync_basalam_jobs_runner_test_state']['events'][] = 'fastcgi_finish_request';
34 +
35 + return true;
36 + }
37 +}
38 +
23 39 if (!function_exists('wp_doing_ajax')) {
24 40 function wp_doing_ajax()
25 41 {
26 42 return $GLOBALS['sync_basalam_jobs_runner_test_state']['doing_ajax'] ?? false;
@@ -50,8 +66,37 @@
50 66 return $GLOBALS['sync_basalam_jobs_runner_test_state']['transients'][$transient] ?? false;
51 67 }
52 68 }
53 69
70 +if (!function_exists('get_option')) {
71 + function get_option($name, $default = false)
72 + {
73 + return $GLOBALS['sync_basalam_test_options'][$name] ?? $default;
74 + }
75 +}
76 +
77 +if (!function_exists('update_option')) {
78 + function update_option($name, $value, $autoload = null)
79 + {
80 + $GLOBALS['sync_basalam_test_options'][$name] = $value;
81 + return true;
82 + }
83 +}
84 +
85 +if (!function_exists('wp_using_ext_object_cache')) {
86 + function wp_using_ext_object_cache()
87 + {
88 + return $GLOBALS['sync_basalam_jobs_runner_test_state']['external_object_cache'] ?? false;
89 + }
90 +}
91 +
92 +if (!function_exists('wp_installing')) {
93 + function wp_installing()
94 + {
95 + return false;
96 + }
97 +}
98 +
54 99 if (!function_exists('set_transient')) {
55 100 function set_transient($transient, $value, $expiration = 0)
56 101 {
57 102 $GLOBALS['sync_basalam_jobs_runner_test_state']['events'][] = 'set_transient';
@@ -60,8 +105,11 @@
60 105 'value' => $value,
61 106 'expiration' => $expiration,
62 107 ];
63 108 $GLOBALS['sync_basalam_jobs_runner_test_state']['transients'][$transient] = $value;
109 + if ($expiration > 0) {
110 + $GLOBALS['sync_basalam_test_options']['_transient_timeout_' . $transient] = time() + $expiration;
111 + }
64 112
65 113 return true;
66 114 }
67 115 }