nsp-code
Forum Replies Created
-
This is partially correct, check with actual code, i’am sure you will understand.
Please check with autoptimizeStyles->read() function, at lines 267-365, you have a loop which includes an IF clause with 3 possibilities:
#1 lines 268-269
#2 lines 270-328
#3 lines 329-364
on last one (#3) at line 342, you have a function minify_single() which goes tocache
procedure, meaning it actually create a static cache file beforeminify
! The outputted filenames for such content are autoptimize_single_HASHHope this makes sense.
If you can give your e-mail i can send more details to track the issue, as however this discussion is very technical and might not help anyone else.Thanks
Actually i’am aware of the mentioned filters, still they also trigger after the assets data has been saved locally into cache files.
So, as specified in my last message, at /classes/autoptimizeMain.php the code call which produce the cached assets is at line 507$instance->read ( .. )
but your mentioned filters are used in the next call at line 508$instance->minify()
, obviously after the static caches has been already created.I believe you can try it on your side, add the filters into your theme functions.php and attempt to change something into a cached file, you will see nothing changes. Or, you might want to take a closer look by runing into a debug.
Thanks
Hi Frank,
Sorry but the filterautoptimize_html_after_minify
is being used for HTML buffer and not for any optimized CSS or JavaScript, which appears to be saved locally into/wp-content/cache/autoptimize
Also the mentioned filter trigger after all local cached optimized files has been created.
So the filter can be found within /classes/autoptimizeMain.php at line 515, but the code which produce the cached assets are right above, in the loop, at line 507:
$instance->read ( .. )
. The stack of calls, for a CSS appears to be the following:/classes/autoptimizeCache.php line 507, autoptimizeStyles->read(.. )
/classes/autoptimizeStyles.php line 342, minify_single()
/classes/autoptimizeStyles.php line 1232, cache()
/classes/autoptimizeCache.php line 96, function cache() where your code write the $data into static files
Still, during the above chain there is no filter which can be used to make changes to the css data before being saved.As mentioned above, i think the best place to place a filter is at /classes/autoptimizeCache.php at function cache(), at the top. This is the location being invoked by both your css and javascript autoptimize classes, so through the filter it can catch everything.
Again, the reason for why i need a filter, is, for example, if a CSS asset contain an URL, our plugin can’t reach to update it, before your code save it locally.
Hope this helps.
Thanks
Forum: Plugins
In reply to: [WP Hide & Security Enhancer] get urls with php?This works great, thanks for the filter, both plugins are now compatible.
Thanks
Forum: Plugins
In reply to: [WP Hide & Security Enhancer] get urls with php?Hi,
The easiest way would be to add a filter on your code ( on 4 spots, before returns ), at file /inc/functions.php withinfunction fvm_download_and_minify()
add the following:
$code = apply_filters( 'fvm/download_and_minify/code', $code, $type);
Here’s a compare diff to identify the location where the filter should be placed https://www.mergely.com/Bl0rZzym/
The filter will be used on our code to apply the replacements, before the code is being saved on server as cache file. Let me know if i can help further with this.
Thanks
- This reply was modified 4 years, 9 months ago by nsp-code.
Forum: Plugins
In reply to: [WP Hide & Security Enhancer] get urls with php?Hey Raul,
Thanks for your message, i wanted to get in touch too, i think related to the same problem. From time to time we receive support request regarding incompatibility between WP Hide & Security Enhancer and Fast Velocity Minify plugins. This occurs, when using minify (CSS/JavaScript) option on your plugin. If the user has customized the default URLs through our plugin, the minified files will still use the old URLs format, since our code does not trigger ( through a filter ) to do the replacements.
The best approach for this would be to add a filter on your plugin code, right before it create the static files ( during my tests, i created a filter at /inc/functions.php, function fvm_download_and_minify(), right before the encoded JSON. This worked great ). Then we can use the filter on our plugin, to create a compatibility file with your code. We did that with most of cache plugins which use similar minify/optimisation functionality and working fine.If your support question is related to something else, i’ll just send the code to retrive a list of before/after urls
Thanks
Forum: Plugins
In reply to: [Post Types Order] woocommerce visual composer plugin@telemarker this forum is for Post Types Order plugin. If you own the advanced code please ask help at https://www.nsp-code.com and someone will assist in no time.
Forum: Plugins
In reply to: [WP Hide & Security Enhancer] No content show up at backend setting pageHello,
Sorry the plugin is not yet MultiSite compatible.Thanks
- This reply was modified 7 years, 7 months ago by nsp-code.
Also if the code need to apply only on the main query, it might be a good idea to compare the $wp_query hash with the passed through $query hash and continue only if match.
Please refer back to https://www.ads-software.com/support/topic/conflict-with-relevanssi-search-plugin-because-of-wp-query-loop/#post-9441654 for a fix to the issue you encounter.
To ignore the sorting for search pages the code appear to work fine.
I found the issue within Relevanssi, i posted a solution at https://www.ads-software.com/support/topic/conflict-with-relevanssi-in-conjunction-with-theme-my-login-and-post-types-order/
Forum: Plugins
In reply to: [Post Types Order] Reversed post orderHi @kbestmns
First please make sure you run version 1.9.3.3 which was released few hours ago.
Then go to Settings > Post Types Order > Use query ASC / DESC parameter -> ensure this setting is off (unchecked)That should do it and keep everything as before.
Hi,
Can you confirm the latest plugin version 1.9.3.3 fixed the problem for you?Thanks
Forum: Plugins
In reply to: [Post Types Order] Reversed post orderThere is a new functionality included, it also apply query order DESC or ASC if exists. Apparently your query is set to DESC, so it reverse the outputted order.
You can disable this behavior from plugin settings at Settings > Post Types Order > Use query ASC / DESC parameter ( available within plugin version 1.9.3.3 )Hi,
Can you confirm the latest plugin version 1.9.3.2 fixed the problem for you?Thanks