• Resolved fyrye

    (@fyrye)


    Hey Andy,

    It seems the latest versions of LeadIn are not displaying the SVG icon correctly.
    /wp-content/plugins/leadin/images/leadin-svg-icon.svg

    The resulting file is being downloaded as application/octet-stream in Chrome and IE.

    I believe the issue is related to add_menu_page for svg.
    It looks like it is expecting:

    'data:image/svg+xml;base64' .
    base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg'));

    In file /wp-content/plugins/leadin/admin/leadin-admin.php

    $leadinIcon = ($wp_version < 3.8 && !is_plugin_active('mp6/mp6.php') ? LEADIN_PATH . '/images/leadin-icon-32x32.png' : 'data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')));
            add_menu_page('Leadin', 'Leadin', $capability, 'leadin_stats', array($this, 'leadin_build_stats_page'), $leadinIcon, '25.100713');

    In file /wp-content/plugins/leadin/inc/class-leadin.php

    <img src="data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')). '"

    https://ww.wp.xz.cn/plugins/leadin/

Viewing 1 replies (of 1 total)
  • Epic! Thanks so much for providing the fix on this one. It’s been an annoying issue for a long while but I’ve never been able to actually find a fix for it.

    I’m rolling this bug patch into the next version of the plugin.

    Do you mind sending your mailing address and t-shirt size to [email protected]? I have a present for you 🙂

Viewing 1 replies (of 1 total)

The topic ‘Missing LeadIn Icon’ is closed to new replies.