Support » Plugin: FV Gravatar Cache » Work with Lazy Load for Comments plugin?

  • I am using the Lazy Load for Comments plugin, which is great. I don’t really need your plugin I suppose, but I thought it might be nice to have both work together, which they don’t appear to out of the box. Any idea if it is possible for them to play nice? If so, please consider making any changes for a future version.

Viewing 1 replies (of 1 total)
  • So, I figured out how to make the two plugins work together and it is pretty simple. Perhaps you will consider making a change to the next version? Anyway, here is what is needed. In the core fv-gravatar-cache.php file in the GetAvatar function there is the following code:

    if( is_admin() ){
    	return $image;
    }

    Since the Lazy Load for Comments plugin is using AJAX, the is_admin() check will pass and the image will be returned. If you change that code to something like the following, everything should work fine:

    if( is_admin() && !is_plugin_active("lazy-load-for-comments/lazy-load-for-comments.php") ){
    	return $image;
    }

    In theory this wouldn’t be ideal if there were numerous plugins for lazy loading comments, but that is the only one I am aware of so I think it isn’t so bad. Since I’m not a professional coder, there might be a more elegant solution I am not thinking of as well.

Viewing 1 replies (of 1 total)
  • The topic ‘Work with Lazy Load for Comments plugin?’ is closed to new replies.