stefanxyz
Forum Replies Created
-
Forum: Requests and Feedback
In reply to: add a filter on WP_User::get_data_by()?hi threadi this won’t work because the email is used as identify in the system that why i want to hook this method instead of hooking all functions which use the data
or better explain its wont work for for all cases, the thing you describe im currently using in my test system. (for detect from which shop is the order)
Your hint is not bad to solve it over custom meta when WP is use the get_data_by for all which is user related, thanks.
yeah i think your way is better so i have only mod the user data get query
- This reply was modified 1 year, 6 months ago by stefanxyz.
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?this is very strange i understand the logic behind, will invest more time in it when i got the time
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?strange, anyway i have now my solution with hacking the cache.php.
thank you
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?dont work, its creates the dirs of domain but creates no files inside.
when i go to inc cache.php and edit the public function set_cache_file_path() its works (without your change)
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?you cant, that’s why i was asking for a filter where i can told you that im use it ??
See it as “config” where you allow the user force using the domain name as folder.
Or even i can set a prefix over filter on the path and hack your code.
I have try fake a little with multiple-domain.php but this results for me in no generated cache files, the folder where created
When i edit your code in set_cache_file_path its works without the method above.
- This reply was modified 1 year, 10 months ago by stefanxyz.
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?yap a little more see here for full code
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?<?phpclass rewrite{ function __construct() { add_filter('content_url', [$this, 'fixUrl']); add_filter('option_siteurl', [$this, 'fixUrl']); add_filter('option_home', [$this, 'fixUrl']); add_filter('plugins_url', [$this, 'fixUrl']); add_filter('wp_get_attachment_url', [$this, 'fixUrl']); add_filter('get_the_guid', [$this, 'fixUrl']); add_filter('upload_dir', [$this, 'fixUploaddir']); add_filter('the_content', [$this, 'fixUrl'], 20); add_filter('upload_dir', [$this, 'fixUploadDir']); } function fixUrl($url) { return str_replace($this->orginalDomain, $this->domain, $url); } function fixUploaddir($param) { $param['url'] = str_replace($this->orginalDomain, $this->domain, $param['url']); $param['baseurl'] = str_replace($this->orginalDomain, $this->domain, $param['baseurl']); return $param; }}$r = new rewrite();?>
or here on Pastebin https://pastebin.com/56RQP3NM
that is basically the magic. $this->orginalDomain is the domain from the config where the wp is installed, $this->domain is the wanted domain i want show.
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?i was looking for but dont find it again, was copy and paste from GitHub.
i use A records and all domain goes to my wordpress instance over IP, in my function.php i replace the domains in fixUrl over str_replace over the following filter:
add_filter(‘content_url’, ‘fixUrl’); add_filter(‘option_siteurl’, ‘fixUrl’); add_filter(‘option_home’, ‘fixUrl’); add_filter(‘plugins_url’, ‘fixUrl’); add_filter(‘wp_get_attachment_url’, ‘fixUrl’); add_filter(‘get_the_guid’, ‘fixUrl’); add_filter(‘upload_dir’, ‘fixUrl’); add_filter(‘the_content’, ‘fixUrl’); add_filter(‘upload_dir’, ‘fixUploadDir’);
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?ahh nice i see, and now i understand you with its creates them by default, you check for multiple-domain/multiple-domain.php and is_multisite then use the hostname. Can i ask you to add in line 1150 a filter where i can force set the is multi domain without having the multiple-domain.php installed? I can edit it but after update i have to edit it again. thank you
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?cache.php
$this->cacheFilePath = $this->getWpContentDir(“/cache/”.$type.”/”).$_SERVER[“REQUEST_URI”];
this should include
$_SERVER['SERVER_NAME']
or a hashed version of after my first viewedit: works and create a own folder for every domain, would need only todo for the js/css
- This reply was modified 1 year, 10 months ago by stefanxyz.
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?how we can test it? i change the site onfly btw over the following filter
add_filter(‘content_url’, ‘fixUrl’); add_filter(‘option_siteurl’, ‘fixUrl’); add_filter(‘option_home’, ‘fixUrl’); add_filter(‘plugins_url’, ‘fixUrl’); add_filter(‘wp_get_attachment_url’, ‘fixUrl’); add_filter(‘get_the_guid’, ‘fixUrl’); add_filter(‘upload_dir’, ‘fixUrl’); add_filter(‘the_content’, ‘fixUrl’); add_filter(‘upload_dir’, ‘fixUploadDir’);
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?your sure? in my test i got the files from the .org domain supplied on the.store domain or do you speak about multi site? I dont use a multisite, i use multiple domains on the same site
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?sure but its no default setting i think, the files goes to /wp-content/cache/all and are not separated by domain
Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?Forum: Plugins
In reply to: [WP Fastest Cache] filter the cached output | own cache files?When i understand it correct, the wpfc_buffer_callback_filter is what im looking for option #2?
Tobad the sites on the different domain use different title and something else.
Is it possible to separate the cache per domain?
/wp-content/cache/all will be to /wp-content/cache/[domain]/all ?
Or add a hook where i can set the cache dir?
thanks