diff --git a/changelog.txt b/changelog.txt
index 098c75186..8a0e6f0b4 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,18 @@
== Changelog ==
+= 4.0.3 =
+* NEW - added `Info` section to the `Status` tab on the Settings page, which contains the system info and the ability to copy report to clipboard.
+* ENHANCEMENT - added `Documentation` link on the Plugins page.
+* ENHANCEMENT - added `Addons` link on the Plugins page.
+* ENHANCEMENT - added `Documentation` link on the Settings page.
+* FIX - fixed `Settings` shortcut on the Plugins page.
+* FIX - in multisite network, do not show Data Optimization on the Network Admin Page.
+* FIX - properly set `Content Disposition` fields for media objects.
+* FIX - properly use `Cache Control` setting for media objects.
+* FIX - fixed `Creation of dynamic property` PHP deprecation notice.
+* FIX - fixed `Cannot use ::class with dynamic class name` PHP warning.
+* FIX - avoid PHP warning when unable to get file path in `Stateless` mode [728](https://github.com/udx/wp-stateless/issues/728).
+* FIX - fixed links to the constants documentation.
+
= 4.0.2 =
* FIX - in multisite network, deleting site can potentially remove WP-Stateless tables from another site.
* COMPATIBILITY - Gravity Forms Compatibility updated for the newest Gravity Forms version.
diff --git a/changes.md b/changes.md
index f793a0fc6..3218024b9 100644
--- a/changes.md
+++ b/changes.md
@@ -1,3 +1,17 @@
+#### 4.0.3
+* NEW - added `Info` section to the `Status` tab on the Settings page, which contains the system info and the ability to copy report to clipboard.
+* ENHANCEMENT - added `Documentation` link on the Plugins page.
+* ENHANCEMENT - added `Addons` link on the Plugins page.
+* ENHANCEMENT - added `Documentation` link on the Settings page.
+* FIX - fixed `Settings` shortcut on the Plugins page.
+* FIX - in multisite network, do not show Data Optimization on the Network Admin Page.
+* FIX - properly set `Content Disposition` fields for media objects.
+* FIX - properly use `Cache Control` setting for media objects.
+* FIX - fixed `Creation of dynamic property` PHP deprecation notice.
+* FIX - fixed `Cannot use ::class with dynamic class name` PHP warning.
+* FIX - avoid PHP warning when unable to get file path in `Stateless` mode [728](https://github.com/udx/wp-stateless/issues/728).
+* FIX - fixed links to the constants documentation.
+
#### 4.0.2
* FIX - in multisite network, deleting site can potentially remove WP-Stateless tables from another site.
* COMPATIBILITY - Gravity Forms Compatibility updated for the newest Gravity Forms version.
diff --git a/lib/classes/batch/class-batch-task-manager.php b/lib/classes/batch/class-batch-task-manager.php
index ab800e26e..39270d8a2 100644
--- a/lib/classes/batch/class-batch-task-manager.php
+++ b/lib/classes/batch/class-batch-task-manager.php
@@ -230,7 +230,7 @@ protected function complete() {
// Check if we have more batched to run
try {
$object = $this->_get_batch_task_object();
- $class = $object::class;
+ $class = get_class($object);
$batch = $object->get_batch();
if ( !empty($batch) ) {
@@ -242,7 +242,7 @@ protected function complete() {
return;
}
- Helper::log( 'Batch task completed: ' . $object::class );
+ Helper::log( 'Batch task completed: ' . $class );
} catch (\Throwable $e) {
Helper::log( "Unable to process next batch: " . $e->getMessage() );
}
diff --git a/lib/classes/class-addons.php b/lib/classes/class-addons.php
index 01826d0a3..25b1f46d5 100644
--- a/lib/classes/class-addons.php
+++ b/lib/classes/class-addons.php
@@ -203,7 +203,7 @@ private function get_addons_view($addons) {
$plugin_desc = __('Provides compatibility between the %s and the WP-Stateless plugins.', ud_get_stateless_media()->domain);
$theme_desc = __('Provides compatibility between the %s theme and the WP-Stateless plugin.', ud_get_stateless_media()->domain);
- $link = 'https://stateless.udx.io/addons/%s';
+ $link = ud_get_stateless_media()->get_docs_page_url('addons/%s');
$defaults = [
'title' => '',
diff --git a/lib/classes/class-bootstrap.php b/lib/classes/class-bootstrap.php
index dd35f4b4a..0d747c020 100644
--- a/lib/classes/class-bootstrap.php
+++ b/lib/classes/class-bootstrap.php
@@ -356,12 +356,9 @@ private function _init_filters($type = '') {
}
/**
- * Override Cache Control is option is enabled
+ * Override Cache Control if option is enabled
*/
- $cacheControl = trim($this->get('sm.cache_control'));
- if (!empty($cacheControl)) {
- add_filter('sm:item:cacheControl', array($this, 'override_cache_control'));
- }
+ add_filter('sm:item:cacheControl', array($this->settings, 'override_cache_control'));
add_filter('wp_stateless_file_name', array($this, 'handle_root_dir'), 10, 4);
@@ -645,6 +642,18 @@ public function get_settings_page_url($path = '') {
return $url . $path;
}
+ /**
+ * Return docs page url.
+ *
+ * @param string $path
+ * @return string
+ */
+ public function get_docs_page_url($path = '') {
+ $path = ltrim($path, '/');
+
+ return 'https://stateless.udx.io/' . $path;
+ }
+
/**
* Get new blog settings once switched blog.
* @param $new_blog
@@ -1190,26 +1199,6 @@ public function _convert_to_gs_link($meta, $image_host, $url, $file_ext) {
return $meta;
}
- /**
- * @param $links
- * @param $file
- * @return mixed
- */
- public function plugin_action_links($links, $file) {
-
- if ($file == plugin_basename(dirname(__DIR__) . '/wp-stateless-media.php')) {
- $settings_link = '' . __('Settings', 'ssd') . '';
- array_unshift($links, $settings_link);
- }
-
- if ($file == plugin_basename(dirname(__DIR__) . '/wp-stateless.php')) {
- $settings_link = '' . __('Settings', 'ssd') . '';
- array_unshift($links, $settings_link);
- }
-
- return $links;
- }
-
/**
* Determines if plugin is loaded via mu-plugins
* or Network Enabled.
@@ -1265,7 +1254,7 @@ public function admin_init() {
wp_register_script('wp-stateless-select2', ud_get_stateless_media()->path('static/scripts/select2.min.js', 'url'), array('jquery'), self::$version, true);
/* Stateless settings page */
- wp_register_script('wp-stateless-settings', ud_get_stateless_media()->path('static/scripts/wp-stateless-settings.js', 'url'), array(), self::$version);
+ wp_register_script('wp-stateless-settings', ud_get_stateless_media()->path('static/scripts/wp-stateless-settings.js', 'url'), array('clipboard'), self::$version);
wp_localize_script('wp-stateless-settings', 'stateless_l10n', $this->get_l10n_data());
wp_register_style('wp-stateless-settings', $this->path('static/styles/wp-stateless-settings.css', 'url'), array(), self::$version);
@@ -1371,7 +1360,7 @@ public function admin_enqueue_scripts($hook) {
'title' => sprintf(__("Stateless and Ephemeral modes enables and requires the Cache-Busting option.", ud_get_stateless_media()->domain)),
'message' => sprintf(__("WordPress looks at local files to prevent files with the same filenames.
Since Stateless mode bypasses this check, there is a potential for files to be stored with the same file name. We enforce the Cache-Busting option to prevent this.
- Override with the %s constant.", ud_get_stateless_media()->domain), "https://stateless.udx.io/docs/constants/#wp_stateless_media_cache_busting", "WP_STATELESS_MEDIA_CACHE_BUSTING"),
+ Override with the %s constant.", ud_get_stateless_media()->domain), ud_get_stateless_media()->get_docs_page_url('docs/constants/#wpstatelessmediacachebusting'), "WP_STATELESS_MEDIA_CACHE_BUSTING"),
);
echo "