Filter: DevOwl/DeliverAnonymousAsset/ContentDir

apply_filters( 'DevOwl/DeliverAnonymousAsset/ContentDir', $folder ) → {string}

Get the content directory where anonymous assets should be placed.

If you change the directory, the old assets are not deleted automatically as this could break the cache of caching plugins like WP Rocket.

Attention: This filter needs to return an absolute path pointing to a directory within your WP_CONTENT_DIR (wp-content/) folder so we can safely convert it to an URL, if not, it falls back to wp-content/.

Parameters:
Name Type Description
$folder string
See:
Returns:
Type
string
Example

Put the files to `wp-content/uploads`

<?php
add_filter( 'DevOwl/DeliverAnonymousAsset/ContentDir', function ( $content_dir )  {
    $folder = trailingslashit(wp_upload_dir()['basedir']);
    return $folder;
});