WP Rocket - Best WordPress Caching Plugin

WP Rocket - Best WordPress Caching Plugin v3.18.3

No permission to download

CyberDeviL

Back to Life 🧬
Trusted Uploader
Aug 10, 2018
2,795
10,823
113
Earth

mahamied

New member
May 12, 2022
5
2
3
pls. bro. Can you check again, it's showing me this in virus tool checking at virustotal.com
Appreciate your reply.
Thanks in advance.
 

Attachments

  • Untitled.png
    Untitled.png
    47.5 KB · Views: 35

Legolas

Active member
Trusted Uploader
Feb 26, 2019
175
216
43
Code:
// Add http requests to block
add_filter('pre_http_request', function ($thisStatus, $requestParams, $ThisUrl) {
  if (strpos($ThisUrl, '//wp-rocket.me')) $thisStatus = null;
  elseif (strpos($ThisUrl, '//rocketcdn.me')) $thisStatus = null;
  return $thisStatus;
}, PHP_INT_MAX, 3);
Where do you put that filter? It's in theme functions.php?
 

CodeKeeper

Active member
Dec 14, 2019
165
81
28
Where do you put that filter? It's in theme functions.php?
You can use CodeSnippets plugin to add this. Besides, @CyberDeviL do we also need to put https: in ThisURL? For eg:

Code:
// Add http requests to block
add_filter('pre_http_request', function ($thisStatus, $requestParams, $ThisUrl) {
  if (strpos($ThisUrl, 'https://wp-rocket.me')) $thisStatus = null;
  elseif (strpos($ThisUrl, 'https://rocketcdn.me')) $thisStatus = null;
  return $thisStatus;
}, PHP_INT_MAX, 3);

Thanks!
 

Legolas

Active member
Trusted Uploader
Feb 26, 2019
175
216
43
You can use CodeSnippets plugin to add this. Besides, @CyberDeviL do we also need to put https: in ThisURL? For eg:

Code:
// Add http requests to block
add_filter('pre_http_request', function ($thisStatus, $requestParams, $ThisUrl) {
  if (strpos($ThisUrl, 'https://wp-rocket.me')) $thisStatus = null;
  elseif (strpos($ThisUrl, 'https://rocketcdn.me')) $thisStatus = null;
  return $thisStatus;
}, PHP_INT_MAX, 3);

Thanks!
Can't be done without installing additional plugins? Doesn't it work by putting it into functions.php?

About your question, there is no need of adding the protocol to that string. Using "//domain.com/path" is enough.
 
Last edited:
  • Like
Reactions: CodeKeeper

CodeKeeper

Active member
Dec 14, 2019
165
81
28
Can't be done without installing additional plugins? Doesn't it work by putting it into functions.php?

About your question, there is no need of adding the protocol to that string. Using "//domain.com/path" is enought.
As much as I know, it CAN be done by adding the code to theme functions.php. Besides, Code Snippets is a light weight plugin and there should be no issue in using it!
If you add it to the theme functions.php, it may get removed each time you update your theme, that's why I recommend using plugin.
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu