Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1304576

    Hi;

    the newly in 4.8.3 introduced feature “ALB Social Share Buttons extended” seems to break custom changes via the avia_social_share_link_arguments filter.

    Before the update, this code would add a xing share button to blog pages:

    function avia_add_social_share_link_arguments($args)
    {
        $args['xing'] = array("encode"=>true, "encode_urls"=>false, "pattern" => "https://www.xing.com/social_plugins/share/new?h=1&url=[permalink]&t=[title]");
        return $args;
    }

    I´ve already tried another approach, but it isn´t working either:

    add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1);
    function avia_add_social_share_link_arguments($args)
    {
        $xing = array('xing' => array("encode"=>true, "encode_urls"=>false, "pattern" => "https://www.xing-share.com/app/user?op=share;sc_p=xing-share;url=[title]&url=[permalink]", 'label' => __("Teile auf Xing",'avia_framework')));
        $args = array_merge($xing, $args);
        return $args;
    }

    Additinally my code, which added the social share links to every single page, does no longer work:

    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    function avia_add_social_toolbar_template_builder($content = "")
    {
        if (is_single()) {
            $content .= avia_social_share_links(array(), false, '', false);
            $content .= '';
        }
        return $content;
    }

    Is there a fix or workaround for this?

    Regards
    Ansgar

    #1305808

    Hey Ansgar,

    Thanks for contacting us and sorry for the late reply!

    Could you please try replacing the content of /enfold/includes/helper-social-media.php file with this one – https://pastebin.com/DyEsUSNE in Appearance > Editor and check if that helps?

    Best regards,
    Yigit

    #1305821

    Hey!

    Regarding the second filter, you might have to replace is_single with is_singular(“page”) and add this css code to adjust the width of the ul tag.

    #top .av-share-box ul {
    	width: 100%;
    }

    Replace the snippet with this one.

    function avia_add_social_toolbar_template_builder($content = "")
    {
        if (is_singular("page")) {
            $content .= avia_social_share_links(array(), false, '', false);
            $content .= '';
        }
        return $content;
    }
    add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
    

    Best regards,
    Ismael

    #1308089

    Hi!


    @Yigit
    : Yes, it works after replacing the code, thanks!
    Will this be fixed in future version or will i have to replace the code after updating?


    @Ismael
    : Thank you! I now have the condition if is_single() OR is_singular(“page”), so that the share buttons get display both on blog posts and single pages

    Best regards
    Ansgar

    #1308091

    Hi Ansgar,

    You are welcome! It will be included in upcoming version so you will not need to replace it again :)

    Best regards,
    Yigit

    #1308098

    Hi Yigit,

    cool! 8-) Thank you for your awesome support!

    Regards
    Ansgar

    #1308099

    Hi,

    You are welcome, Ansgar! Always happy to help :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/

    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Social Share Xing missing after Update to Enfold 4.8.3’ is closed to new replies.