Forum Replies Created
-
AuthorPosts
-
February 15, 2022 at 1:20 pm in reply to: What about the filter: avf_load_single_shortcode_file #1340689
Hey Guenter,
The main idea of this filter is
- to supress loading of shortcode files that are not needed on your site
- or load a modified file instead (- unnecessary loading of the original file can be skipped)
- Very advanced users might create base classes for group of elements and load these before the shortcode class
what do I have to change in the modified ALB element so that it does not interfere with the original element
Minimum to change is:
$this->config['shortcode'] = '......';
maybe also
$this->config['shortcode_nested'] = array( '......' );
Other changes depend on what you want to modify in your customized element.
Best regards,
GünterHi Tim,
I had a look into it – but it turns out to be more complicate as there are many elements involved and core backend functions.
I add it to our dev repo – but no ETA I can promise at the moment (we are starting to work on 5.0 with some nice new frontend features and Kriesi wants to set priority on this).Best regards,
GünterHey Tim,
Thanks again. You are right.
I think it is better to use settings of “Custom Font Display Behaviour” and add it to the link for google fonts
(https://peterdaugaardrasmussen.com/2021/04/02/how-to-add-font-display-swap-to-font-from-google/):<link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Barlow:400,500,600,700%7CAlice&display=swap" id="avia-google-webfont">
Filters will allow to change it.
I uploaded a modified file that implements this solution (replace file enfold\framework\php\class-style-generator.php):
As this file is already based on 4.9 release please keep a copy of the original file for fallback (in case you see problems).
If you want to have a copy of the latest dev release let us know.Best regards,
GünterHey Tim,
WordPress’ default lazy loading
Thanks for pointing at this. For most ALB elements you can disable/enable lazy loading – this should allow more control than the WP implementation taking the first (or with filter a custom number) image only.
Standard templates have not been updated.
Taking a quick look – we did not implement any lazy loading logic in config-woocommerce\config.php yet. And the ALB elements use standard WC templates.
I’m afraid there is no quick solution at the moment.I will add this to our dev repo to take a closer look – but I cannot provide an ETA at the moment.
Best regards,
GünterHi,
Sorry for the problem.
With oncoming version 4.9 the problem with the dashes is fixed again – so it is safe to use fonts with dashes.
Problem was caused by a fix in 4.8.9.1 that removed the dashes for websafe fonts (which contained the dashes in theme options) – missing that custom fonts still need them.
Best regards,
GünterHi,
I do not see the problem, but I have a server error 500 – see private content:
Checking the web: https://developers.google.com/tag-platform/tag-manager/web
Looks different now. Maybe you are using an old implementation ?
Best regards,
GünterHi,
Sorry for the late reply.
A theme can only offer a basic implementation. To be on the safe side plugins specialised for GDPR certainly can offer more options and can stay up to date with laws.
Depending on your needs a plugin might be the better solution.
Best regards,
GünterHi Roger,
Thanks a lot. Merged into core for next release.
Have a great day.Best regards,
GünterHi,
It is not possible to put h2 or h3 tags inside a “p” tag which is the container for the title:
https://stackoverflow.com/questions/42890736/slim-h3-inside-p
I’ve added this problem to our dev repo and planned to address it for 4.9 – check the changelog or https://kriesi.at/support/topic/enfold-upcoming-fixes/
But for the moment there is no easy solution.
Currently the only way is to modify enfold\config-templatebuilder\avia-shortcodes\toggles\toggles.php around lines 1118 – 1124 and replace the p tag.
And add additional logic to identify the element to know how to update the p tag.Best regards,
GünterHi,
Thanks for the feedback – and glad it solves the problem.
I will keep an eye on this.Best regards,
GünterHi,
I will update the Image Element and Team Member and send you the latest dev version to check when ready.
Best regards,
GünterHey Tim,
Thanks for reporting this.
There is really a bug with the lightbox and image element.
If I add the height and width attribute to the img element is that enough or do you still need a filter to manipulate the img html ?
Team Member takes the image size from the media library “Attachment Display Settings” selectbox for sizes.
But you are right, it is more user friendly similar to image element to change the size with a selectbox in the modal popup.
Will add this.And same to img element – is it enough to add height and width attribute to img html ?
Best regards,
GünterHey Thomas,
Strange.
Do you see anything in the php error log (can you reproduce it on a stageing site where you can turn on WP_DEBUG and the WordPress Error Log) ?
Seems that WPML query gets stuck. Maybe something went wrong in saveing the translations. Are you using translation management?
If you can reproduce it on a stageing site try to translate the posts on this page 3 again – or delete one post after the other and check ?Best regards,
GünterHi,
Great it solved the problem.
Sorry for the wrong code. In the next version av-helper-masonry.php is deprecated and a modified code is moved to config-templatebuilder\avia-shortcode-helpers\class-avia-masonry.php and there $this->config exists – and I tested it in this version.
Best regards,
GünterJanuary 4, 2022 at 6:03 pm in reply to: Moving JS inline for ALB color section and Full width Easy Slider #1334262Hi Thomas,
Happy new year to you also.
Most of the jQuery js code is packed in
(function($) { ...... })( jQuery );
or
$(function() { // Handler for .ready() called. });
see https://api.jquery.com/ready/
It is certainly possible to execute code before the dom is ready – but this will be special use cases only and cannot be done in general in the framework.
We have to rely that the dom is complete.Best regards,
GünterHi Tim,
Thanks for digging into this.
I think the best way is to use a filter and limit the changes right in av-helper-masonry.php.
For the next release I added the following filter:
/** * Allows to add width and height attribute to supress WP filters for responsive images * (can be used to server optimized images from an image proxy service like Imgix * * @since 4.8.9 * @param string $img_html * @param array $attachment * @param array $entry * @param array $this->config * @return string */ $img_html = apply_filters( 'avf_masonry_flex_image_html', $img_html, $attachment, $entry, $this->config );
right before (around line 481)
$img_html = Av_Responsive_Images()->make_image_responsive( $img_html, $thumb_ID, $this->config['lazy_loading'] );
and this is an example how to use it:
Best regards,
GünterDecember 28, 2021 at 1:54 pm in reply to: Moving JS inline for ALB color section and Full width Easy Slider #1334005Hey Thomas,
Sorry for the late reply. Hope you had a peacefull christmas time with your family.
This cannot be solved easily. It would need to hack core js files (and that after each update). And there are also dependencies to be considered (like jQuery) – and logic for file merging also.
Best regards,
GünterHi,
Please replace the content of /enfold/config-woocommerce/config.php with the contents of
https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_8_8_1/WooCommerce/config.php
If you need help with it, let us know.
Do not forget to make a backup of the original file for a fallback and clear server and browser cache.
Best regards,
GünterDecember 18, 2021 at 5:01 pm in reply to: Bug: Wrong href=manually link if content-slider slide… #1333376Hey Mischa,
Thanks for reporting this.
Is a bug in a helper function analysing this input field. So all ALB elements will show the same behaviour.
I added a fix for the next update.Meanwhile you can replace enfold\config-templatebuilder\avia-template-builder\php\class-generic-helper.php
with the content of
Do not forget to make a backup of the original file for a fallback and clear server and browser cache.
If you need help let us know.Thank you for using Enfold and have a great day.
Best regards,
GünterHi,
I hope you’ve seen that with 4.8.4 the following files have changed due to post css file support (in case you modified them in child theme):
enfold\config-templatebuilder\avia-shortcodes\masonry_gallery\masonry_gallery.php
enfold\config-templatebuilder\avia-shortcodes\masonry_entries\masonry_entries.php
enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.phpThe attachment url for the image is set by following code in av-helper-masonry.php line 1330:
$this->loop[ $key ]['attachment'] = ! empty( $this->loop[ $key ]['thumb_ID'] ) ? wp_get_attachment_image_src( $this->loop[ $key ]['thumb_ID'], $img_size ) : '';
This is a default WP function.
I hope this helps you to locate the problem.
In case you need a filter that would help let us know.
Best regards,
GünterHey Tim,
Yes, you are right. We missed it.
I have added a fix for it – but the release 4.8.8.1 was already out. So it will be in next release.
If you want I can send you a copy including the fix (based on 4.8.8.1, no other changes) so you can check, if it is working as expected.Best regards,
GünterHi,
For next release 4.8.8.1 I added this feature:
add_theme_support( 'avia_options_extended_typography' );
replaces the selectboxes with plain input fields where you can add any valid CSS (there is no check).
To skip your ALB settings for responsive fonts there is a filter:
If you want to have a beta version for testing let us know.
Best regards,
GünterDecember 14, 2021 at 5:03 pm in reply to: Important: Enfold 4.8.8 bug with RSS Feed? (Update: Issue = PHP 8 & child theme) #1332821Hi,
Strange. The only idea I have is that the ” ‘ ” are not the usual ASCII single quote but something different and PHP 8 does not accept that any longer.
Please try my new code.
Best regards,
GünterHi Tim,
Thanks for your feedback.
ad 1)
That makes sense. I took px because Kriesi did in his default setting (and also in the Advanced Styling tab).
I will change it to plain input fields with a default of px (if no other unit is specified).ad 2)
For elements that support post css files (like ‘Special Heading’ does) the responsive handling for font sizes in in aviaElementStylingResponsive::add_responsive_font_sizes(…).
What I would suggest is to extend the parameter list with a reference to the shortcode object and add a filter to supress generating the media queries.
That will allow more flexibility without touching any other core code.ad 3)
Yes, Advanced Styling has priority. Selectors are e.g.
#top #wrap_all .all_colors h1
Selectors from typography tab are simple e.g.:
h1
Best regards,
GünterHi,
Thanks for your feedback.
I’m working on PHP 8.0.0 for several months now and did not encounter any problems either.
Best regards,
GünterDecember 14, 2021 at 1:04 pm in reply to: Important: Enfold 4.8.8 bug with RSS Feed? (Update: Issue = PHP 8 & child theme) #1332747Hi,
Adding your code to my function.php the only thing I see are the ” ‘ “.
I modified the code to get a valid syntax on my install (see below).
Can you try that.What is line 55 in your code above ?
Best regards,
GünterDecember 12, 2021 at 2:44 pm in reply to: Enfold 4.8.8 – magazine element – hide Author, category and tags #1332484Hi,
Thank you for reporting this.
There are options in the element itself. We made some changes in 4.8.8 to remove this information from HTML and not only hide with CSS. Seems we missed something in this element.
I will add a fix in the next release so the options will work again.
Sorry for the troubles. Have a nice sunday and enjoy the theme.
Best regards,
Günter -
AuthorPosts