fidoboy
Forum Replies Created
-
Of course it also can be accomplished if you add a filter to allow to hook an action just before the visit is going to be counted into the DB. If the filter returns false, then the visit is not stored into DB. That way any user, like me, could use
$_SERVER['HTTP_USER_AGENT']
or what they want to decide if the hit is stored or not. Both ways requires that you make small changes into the source code of this plugin. I prefer to have an option into the settings page to allow adding one or more user agent strings (using wildcards or regex expression also) but make it as you wish. The other alternative, using add_filter/add_action is also valid.Yes. You can add the feature with that and adding a new option, into the settings page, to allow adding one or more user agent strings. If the user agent match then it souldn’t be counted.
- This reply was modified 10 months, 2 weeks ago by fidoboy.
Dequeue scripts doesn’t have any sense on this issue, because the user agent string is client side information and you are talking about changes into the rendered page, server-side.
The issue is on the part where the hit is counted into the DB.
Yes. What I want to do is the same that the options to don’t track administrators or other user roles. I want to exclude a given user agent string or a given IP from the statistics, so it doesn’t count at all as a visit.
I understand. And that’s a problem for the theme to solve, and not for widgets or display modules.
However you can provide with filter hooks and document it into the plugin faqs or the right place. It could be also solved with templates, if the plugin provides anyone that could be copied into the child theme folder.
Kind regards,
Forum: Plugins
In reply to: [Thumbnails] Warnings on logsThis is fixed with following code:
// if width or height is zero then it's auto calculated, so crop should be false if ($width == 0) $width = null; if ($height == 0) $height = null; if (is_null($width) || is_null($height)) $crop = false;
into the
resize
function.There is also another big problem that this plugin should solve: responsive images when creating the srcset attributes for images. If the thumbnail is being created on the fly, then also the WordPress function for adding srcset attribute should be shortcircuited to keep it working as expected.
and how can I manage two or more sizes to display images on retina display (2x)?
Forum: Plugins
In reply to: [Leira Letter Avatar] Gravatar is not usedThe code of this plugin is now broken and doesn’t work with Gravatar anymore. So just disable it because it also doesn’t have any updates fixing the issue.
99 was enough. But, hey, I bet that you could have been use something even bigger, like 9e9999999 ??
Forum: Plugins
In reply to: [Cache Warmer] Duplicate warming with and without a given cookie/valueit could be useful in many ways. Just use your imagination and try to keep as many different use cases as you wish.
But the basic idea is to allow a second (or third) visit to the same page but with a different cookie setup and may be even a different query_string. This is for cases where the generated HTML is not the same, depending on cookies or query parameters.
- This reply was modified 11 months, 3 weeks ago by fidoboy.
Forum: Plugins
In reply to: [Thumbnails] Warnings on logsIf one of the two dimensions is zero, then the plugin needs to calculate the missing one automatically. Right now it fails to generate the right image.
Sizes like this 1024×0 in some WordPress themes wants to mean “auto height”. So the width is given but the height is calculated without cropping the image.
Forum: Plugins
In reply to: [Cache Warmer] Duplicate warming with and without a given cookie/valuethis is because the generated HTML is not the same when there is a cookie that when there is not. That’s why.
First visit with a cookie value generates a page in English (for example) and when there is no cookie or the value is another one, then the page is in russian language.
@plop6901 you’ll also need to add the javascript files into the textarea in WP Rocket settings screen to exclude all of them from being defered or delayed. It’s a simple as copy & paste the filenames including the path (starting from /wp-content/plugins/…). You can get them from the browser and opening developer tools and locating the wp-dark-mode scripts into the network tab.
- This reply was modified 11 months, 3 weeks ago by fidoboy.
- Edit the file /wp-content/plugins/wp-dark-mode/includes/class-hooks.php
- Locate line 198 and change this:
<script>
Into this:
<script nowprocket>
3. Look for other lines in the same file where you can see <script> to make the same change than in step 2.
4. Save the changes.
Solved.
@plop6901 just open that file with an editor and look at the line that I’ve posted before. You’ll see some HTML code to insert a script. Add class=”nowprocket” and then look for one or two pieces into the same file with almost the same code that in that line. Just add the required class to each one. With this you will avoid that the WP Rocket plugin could defer or delay the javascript from WP Dark Mode.
- This reply was modified 11 months, 3 weeks ago by fidoboy.