nextpress-core 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,22 +7,28 @@ namespace Nextpress;
7
7
  * Allows translations, other plugins, and themes to update normally.
8
8
  */
9
9
 
10
+ // Block updates and notifications only for WordPress Core
10
11
  add_filter('pre_site_transient_update_core', function($transient) {
11
12
  if (!\is_object($transient)) {
12
13
  $transient = new \stdClass();
13
14
  }
14
15
 
15
- if (property_exists($transient, 'updates')) {
16
- $transient->updates = [];
16
+ $transient->updates = [];
17
+ $transient->response = [];
18
+
19
+ if (!isset($transient->version_checked)) {
20
+ global $wp_version;
21
+ $transient->version_checked = isset($wp_version) ? $wp_version : '';
17
22
  }
18
- if (property_exists($transient, 'response')) {
19
- $transient->response = [];
23
+
24
+ if (!isset($transient->last_checked)) {
25
+ $transient->last_checked = time();
20
26
  }
21
27
 
22
28
  return $transient;
23
29
  });
24
30
 
25
- // 2. Intercept Plugin update checks specifically for Secure Custom Fields
31
+ // Intercept Plugin update checks specifically for Secure Custom Fields
26
32
  add_filter('site_transient_update_plugins', function($transient) {
27
33
  if (!\is_object($transient) || !isset($transient->response)) {
28
34
  return $transient;
@@ -39,7 +45,7 @@ add_filter('site_transient_update_plugins', function($transient) {
39
45
  return $transient;
40
46
  });
41
47
 
42
- // 3. Block automatic background updates for Core and SCF
48
+ // Block automatic background updates for Core and SCF
43
49
  add_filter('auto_update_core', '__return_false');
44
50
  add_filter('auto_update_plugin', function($update, $item) {
45
51
  if (\is_object($item) && isset($item->plugin) && $item->plugin === 'advanced-custom-fields/acf.php') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextpress-core",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Nextpress Core",
5
5
  "keywords": [],
6
6
  "bin": {