Fix the Flickr Typo in the Divi Social Media Follow Module

Written by Dan Mossop

Sometimes it's the small things that make the difference… there is a minor typo in the Divi Social Media Follow module that was present in Divi 4, and (currently) remains in Divi 5. Specifically, the tooltip for Flickr is misspelled as "Flikr". Here's how to fix it.

Fix the Flickr Typo in the Divi Social Media Follow Module using PHP

To fix the typo, in Divi 5 only, you can add the following PHP code to your site:  

// === Corrects title="flikr" to title="flickr" in Divi 5 Social Media Follow network items using render_block. ===

add_filter('render_block', 'db_fix_flickr_title_typo', 10, 2);

function db_fix_flickr_title_typo($block_content, $block) {
    if (!is_string($block_content)) {
        return $block_content;
    }

    $name = is_array($block) && isset($block['blockName']) ? $block['blockName'] : '';
    if ($name !== 'divi/social-media-follow-network') {
        return $block_content;
    }

    // Quick guard: only proceed if the typo is present at all.
    if (strpos($block_content, 'flikr') === false) {
        return $block_content;
    }

    // Replace only the exact title attribute value flikr (single or double quotes),
    // avoiding data-title, aria-* and other attributes.
    $pattern = '/(?<![a-zA-Z0-9_-])title\s*=\s*(["\'])flikr\1/';
    $replacement = 'title=$1flickr$1';
    $fixed = preg_replace($pattern, $replacement, $block_content);

    return is_string($fixed) ? $fixed : $block_content;
}

You can add this in the functions.php file of a child theme, or using a plugin such as Code Snippets.

We may earn a commission when you visit links on our website.

Run PHP Code Directly in your Divi Layouts

Unlock endless customization, automation, and dynamic functionality by seamlessly adding PHP code to your Divi pages and posts with the Divi PHP Code Module. Style, preview, and debug your PHP creations directly in the visual builder with robust error handling and enhanced security.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

0 Comments

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

Compatible with

Divi 5

News