Jeromin
Forum Replies Created
-
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionThank you very much.
I see what you mean but I can’t as for admins I don’t want to enabled AO.
If I use that filter my code would be executed only with AO enabled.
So for know I will keep CSS disabled for that page only… until I find a better idea.Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionLet’s try that ??
Could give me the right direction please ? I didn’t find a filter option on the plugin page.Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionHello,
Bad news as it may was a coincidence but even having changed the WP memory limit, my page is still broken due to CSS optimizer and a bit too much data loaded !
The problem still the same :Cause in my case I load 3 JSON files. It worked well with 2 of them but adding a third variable (using json file) breaks it all.
Whereas, when it worked I already had 469 Ko + 223 Ko, how could it be that when I had the third one that is only 28 Ko, everything breaks.It seems that it breaks above 700 Ko … Any idea ?
Can I tell autoptimize to avoid handling a script meta with its ID ?
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionI should have checked the memory well before !
Anyway, thanks a lot for your time and I hope that would benefit to others ??
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionAll good !!
It was indeed a memory problem from WP.Fixed it with
define('WP_MEMORY_LIMIT', '256M');
Was at 40M !The CSS optimizer might took the remaining memory and crashed without errors in my logs.
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionYes, thank you I’m getting closer.
Is there a memory limit that you know about ?
Cause in my case I load 3 JSON files. It worked well with 2 of them but adding a third variable (using json file) breaks it all.
Whereas, when it worked I already had 469 Ko + 223 Ko, how could it be that when I had the third one that is only 28 Ko, everything breaks.It seems that it breaks above 700 Ko … Any idea ?
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionYou can just put any valid JSON into that json file :
{"data":"test"}
Forum: Plugins
In reply to: [Autoptimize] Conflict with WP PHP functionHello,
I rewrite my function, here it is :
function enqueue_script { if (is_page('page_name')) { $data = file_get_contents(get_stylesheet_directory_uri() . '/test-file-v3.json'); wp_add_inline_script('xxx-script', 'const testData = '.json_encode(json_decode($data)).';', 'before'); } } add_action( 'wp_enqueue_scripts', 'enqueue_scripts', 20 );
I already test autoptimize with all CSS settings off. The enabled CSS with no settings affect the php function.
The snippet adds a javascript snippet not any CSS.
We’re also using Elementor Pro and WP Super Cache, bbut it doesn’t seem to affect that code snippet. It worked perfectly few days ago with no update on WordPress since then.
So I also asked my hosting provider in case there was an update of the PHP version.Forum: Plugins
In reply to: [Firelight Lightbox] Easy Fancybox and Nextgen-galleryI’m sure it is possible, you have to find the good function and add your new tag to it.
Forum: Plugins
In reply to: [Firelight Lightbox] Easy Fancybox and Nextgen-galleryIt’s simply $gallery->title to get the title of a gallery, if that was your question.
Forum: Plugins
In reply to: [Firelight Lightbox] Easy Fancybox and Nextgen-galleryYes it exists but it returns the folder name plus 1 in wp-content/gallery
I mean, i have many galleries with the same name (les sables d’olonne 1) so it creats folder -> les-sables-dolonne-1 les-sables-dolonne-1-0
So $gallery->name gives you the folder name (by adding 1) les-sables-dolonne-1-(x+1)It’s weird, but here what it returns.
Forum: Plugins
In reply to: [Firelight Lightbox] Easy Fancybox and Nextgen-galleryYeah I know, I copied all the change into a txt file…
It’s ok because I used the title field to load buttons (facebook, twitter, google+). So they won’t implemente them.I just modified the view/gallery.php by adding id=”<?php echo $image->pid ?>” it was so simple.
Actually I created this id, just the pid of the image at the end of my url with a hash.Regards
Forum: Plugins
In reply to: [Firelight Lightbox] Easy Fancybox and Nextgen-galleryActually i just add id=”<?php echo $image->pid ?>” ..
I am ashamed not thought of this !
It works great again !Thanks for your help ??
Forum: Plugins
In reply to: [Firelight Lightbox] Vimeo overlay on homepageHello,
To autoload joshguss just add the “fancybox-auto”=id for auto-opening.
hiker4life it’s weird, I didn’t check but you should have option to auto play the video :/
Forum: Plugins
In reply to: [Firelight Lightbox] Remove it from MobileHello,
You can try a “hack”.
Here’s a library : https://detectmobilebrowsers.mobi/
that detects mobile phone.Not the best way to do it but it can work …
$mobile = mobile_device_detect();
if ($mobile==true) {
//You can do something for deleting “fancybox” class ) ;
}or with javascript it could be better.
Regards