Hi @futureyoon,
When testing whether an asset should be rewritten or not, we run the following filter that you could hook into…
/**
* @param bool $rewrite Should the src be rewritten?
* @param string $src The asset URL to be rewritten.
* @param string|null $handle The asset's registered handle in the WordPress enqueue system.
*/
return apply_filters( 'as3cf_assets_should_rewrite_src', $rewrite, $src, $handle );
-IJ
Hi IJ,
Thank you for the quick response.
I guess the following with my limitted knowledge.
$rewrite : I guess this is current path i wanto to rewrite
$src : this is the path i want it to be
$handle : what option do we have for this?
what do we put for handle? any avaiable options for that, or just null only?
Thank you
Hmmm…
I dont think I can understand how this works, anyway..
I just wish to change the url for particular files under a folder.
mydomain.com/wp-content/plugins/abcdef/*.* to be loaded from mydomain.com instead of assest.mydomain.com
would you be kind enough to write some simple code for me?
sorry and thank you.
-
This reply was modified 1 year, 4 months ago by futureyoon.
-
This reply was modified 1 year, 4 months ago by futureyoon.
Hey @futureyoon,
As you’re working with a feature only available in WP Offload Media, please contact support via the “Support” tab of the plugin and someone will help you out.
For best results, please link to this topic to give the support person some context.
-IJ
Hi
sorry for late response.
Just wondering if this can be done via snippet code? or need to modify the original code?
I just wish to set the direction right. Please kindly advise.
Thank you