Wow. Nice response. I was trying to help with the plugin. and you give me a response like this:
Mindshare Studios, Inc. wrote:
Whoa! I guess since you’re so smart you should be able to figure it out yourself!
If I seem frustrated in my responses, I apologize. I just spent a week’s worth of time debugging my site looking at my nginx configuration and my php-fpm configuration. Thinking the same thing as you: that my server must be using its memory resources improperly.
I disabled the latest version of this plugin, and bad gateway errors go away. I enable the latest version of this plugin, the bad gateway errors come back.
Now, it could be my code that relies on your plugin that is causing errors.
Here’s my code:
<?php
function svg_blog() {
if(is_ie() && get_browser_version() <= 8) {
$icon = '<img src="'.SVG_URL.'blog.png" alt="Blog Icon" class="icon icon-blog" />';
} else {
$icon = '<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 58.2 56.5" enable-background="new 0 0 58.2 56.5" xml:space="preserve" class="icon icon-blog"><path d="M29.6 54.8C14.9 54.8 3 42.9 3 28.2s12-26.7 26.7-26.7c14.7 0 26.7 12 26.7 26.7S44.3 54.8 29.6 54.8z M29.6 3C15.8 3 4.5 14.3 4.5 28.2s11.3 25.2 25.2 25.2c13.9 0 25.2-11.3 25.2-25.2S43.5 3 29.6 3z" class="style0"/><path d="M42.1 44.8h-25c-0.9 0-1.7-0.8-1.7-1.7V13.3c0-0.9 0.8-1.7 1.7-1.7H34l9.9 9.8V43 C43.9 44 43.1 44.8 42.1 44.8z M17.1 13.1c-0.1 0-0.2 0.1-0.2 0.2V43c0 0.1 0.1 0.2 0.2 0.2h25c0.1 0 0.2-0.1 0.2-0.2v-21l-9-9H17.1 z" class="style0"/><path d="M43.2 22h-8.3c-0.9 0-1.6-0.7-1.6-1.6v-8.3L43.2 22z M34.8 15.6v4.8c0 0.1 0 0.1 0.1 0.1h4.8L34.8 15.6z" class="style0"/><path d="M26.8 23.7h-8.2v-8.9h8.2V23.7z M20.2 22.2h5.2v-5.9h-5.2V22.2z" class="style0"/><rect x="27.5" y="15.9" width="5.1" height="1.5" class="style0"/><rect x="27.5" y="20.7" width="5.1" height="1.5" class="style0"/><rect x="18.3" y="30.2" width="22.4" height="1.5" class="style0"/><rect x="18.4" y="25.4" width="22.4" height="1.5" class="style0"/><rect x="18.3" y="34.9" width="22.4" height="1.5" class="style0"/><rect x="18.3" y="39.7" width="22.4" height="1.5" class="style0"/></svg>';
}
return $icon;
}
I then call that function: svg_blog() in my theme anywhere I want that icon.
function sf_icon_func( $atts ) {
extract( shortcode_atts( array(
'icon' => ''
), $atts ) );
if($icon == 'blog') {
return svg_blog();
}
}
add_shortcode( 'svgicon', 'sf_icon_func' );
Again, this worked great in the previous version of the plugin. But, the latest version, in FireFox and IE, it had issues. Chrome had some issues, but not as much, and Safari had No issues.
I have not dug into the plugin code. I was just trying to help. I always feel that Open Source code and plugins will work better when people using them and involved try to help each other out.