WordPress.org

Ready to get started?Download WordPress

Forums

Google Maps Embed
Map not showing in post with PHP (1 post)

  1. jrf
    Member
    Posted 3 years ago #

    L.S.,

    I love the look and feel of your plugin, but for some reason it wasn't working for me. I'm using v1.5 with WP 3.0.1.

    I used the HTML editor to add the map code and the code looks like:
    [cetsEmbedGmap src=http://maps.google.com/maps?f=q&source=s_q&hl=nl&geocode=&q=ritmeester+bv+nieuwegein+nederland&sll=37.0625,-95.677068&sspn=69.187191,56.513672&ie=UTF8&hq=ritmeester+bv&hnear=Nieuwegein,+Utrecht,+Nederland&z=13&iwloc=A width=350 height=425 marginwidth=0 marginheight=0 frameborder=0 scrolling=no]

    When I set debug to true, I saw the following error message:
    Warning: Wrong parameter count for substr_count() in /mywordpressinstall/wp-content/plugins/google-maps-embed/lib/shortcodes.php on line 42

    Original line 42 in shortcodes.php:
    if (substr_count($src, 'http://maps.google', 0) == 0) return;

    substr_count() can only take the third parameter (offset) starting from PHP 5.1 and as it's 0 anyway, it's not really needed. To fix the plugin, just replace that line with:
    if (substr_count($src, 'http://maps.google') == 0) return;

    Smile,
    Juliette

    http://wordpress.org/extend/plugins/google-maps-embed/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic