• Resolved mikejandreau

    (@mikejandreau)


    I’m using a paid-for plugin, but the author of the plugin isn’t being at all helpful, citing that the problem is with my Mac, and not his plugin, which I find suspicious.

    Anyway, the plugin essentially adds onto the (now discontinued) Photosmash plugin, adding an “Add Photos” form to the user’s profile.

    $content1 = str_replace("<div class=\"profile-edit-form\">", "<div class=\"profile-edit-form\"><h3>Photos for your Gallery</h3>".do_shortcode("[photosmash id=1 form_alone form_visible=true]")."", $content1);

    This piece of code is the problematic bit. The .do_shortcode pieces works in every browser I’ve tried except Safari. I’ve tried everything I can think of.

    The first part works, I can see the h3 outputting the text, but the shortcode isn’t executing. Works find in Firefox, Chrome, and IE. But lonley Safari is broken.

    Can anyone offer any insight as to why this may be browser specific?

Viewing 2 replies - 1 through 2 (of 2 total)
  • There is nothing in that code that would cause a problem in Safari.

    Thread Starter mikejandreau

    (@mikejandreau)

    You’re right. The whole thing I’ve been thinking that there had to be a problem with the replacement function.

    In reality, the plugin was requiring the form to only be available to Admins, and the user I wasn’t seeing it on in Safari was a Subscriber, but the other browsers I tested I was an Admin.

    My own stupidity, but at least I figured it out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘str_replace not working entirely in Safari’ is closed to new replies.