Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #469613

    Hello,

    We’re developing a plugin that registers a new Avia shortcode for custom use.

    We’ve followed the instruction in this link : https://kriesi.at/support/topic/how-do-i-override-an-avia-framework-class-definition-using-enfold-child/ and it works great.

    Now that we can insert our shortcode, we would like that the popup_elements() function generates a custom HTML for our custom use but we haven’t found a way to do it without modifying the class AviaHtmlHelper. Is it possible to do it without modifying any original file and without creating a child theme ? Everything must be embedded in the plugin’s logic.

    Thank you for your help !

    Regards,
    Younes

    #470226

    Hey jbades!

    not sure what you are trying to achieve, but I think turning custom classes to all ALB elements might help you: kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Best regards,
    Andy

    #470408

    Hello Andy,

    Thank you for your response. But this is not what we’re looking for.

    When we create a shortcode, we use a function called popup_elements where we set $this->elements as an array of the elements that we would like to display in the popup.

    In our case, we want to have custom html elements as the popup’s elements.

    After investigating the code behind this system, we’ve found that the PHP Class AviaHtmlHelper uses the type of the elements of the popup as the name of the function to call to get the associated HTML.

    We were able to set our custom HTML but we had to edit the AviaHtmlHelper PHP Class and add a function with a custom name that we set as the type of a popup element.

    But the problem is that we want to be able to use our custom popup without editing the enfold theme. Can you help us?

    I tried to be as clear as I can.

    Best regards,

    Younes

    #470833

    Hi Younes!

    AviaHtmlHelper is a pluggable class, meaning you can paste the whole modified class in your child theme functions.php (or on a included file):

    if ( !class_exists( 'AviaHtmlHelper' ) ) {
    
    	class AviaHtmlHelper 
    	{
             ...
            }
    }

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.