Missing filter to customize content URL for the DeliverAnonymousAsset class
-
Regarding the directory where the anonymized assets are added, the path is customizable via a filter but not the URL. This results in HTTP 302 responses serving the front page.
vendor/devowl-wp/deliver-anonymous-asset/src/DeliverAnonymousAsset.php
:/** * Get the content directory URL. */ public static function getContentUrl() { return \trailingslashit(\set_url_scheme(\constant('WP_CONTENT_URL'))); } /** * Get the content directory and also ensure it is created. * * @return string|false Returns
false
if the folder could not be created. */ public static function getContentDir() { $folder = \constant('WP_CONTENT_DIR') . '/'; /** * Get the content directory where anonymous assets should be placed. * * @hook DevOwl/DeliverAnonymousAsset/ContentDir * @param {string} $folder * @return {string} */ $folder = \apply_filters('DevOwl/DeliverAnonymousAsset/ContentDir', $folder); if (!\wp_is_writable($folder)) { return \false; } return $folder; }Tested in Real Cookie Banner v3.7.2
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Missing filter to customize content URL for the DeliverAnonymousAsset class’ is closed to new replies.