Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author websupporter

    (@websupporter)

    Hi Brian,
    thanks a lot for your input. The image is placed – well ?? – automatically. But you can filter the entries, which are sent (not send, right ?? ) to the browser.

    So I quickly programmed an addon (not really tested though, but it should work), which you might want to use. It replaces all gravatars with a image, you can define.

    <?php
    	/**
    	 * Plugin Name: Gravatar replacer for BDN
    	 * Author: websupporter
    	 * Author URI: https://websupporter.net
    	 * Description: Replaces the standard gravatar with another picture for the desktop notifications
    	 **/
    
    	add_filter( 'dn_entries', 'grfbdn_dn_entries' );
    	function grfbdn_dn_entries( $entries ){
    		//Define the image URL here
    		$image_url = 'https://websupporter.net/blog/wp-content/uploads/2015/05/banner-772x250-640x250.png';
    
    		foreach( $entries as $key => $val ){
    			$entries[ $key ]['avatar'] = $image_url;
    		}
    
    		return $entries;
    	}
    ?>

    Just save this code as a new plugin and replace the image url with the URL you want.

    Hope this helps.

    Thread Starter Brian Cruikshank

    (@brianbws)

    Thank you. This is useful.

    Without customizing using the code above, plugin seems a little buggy.

    The images used appear to be gravatars, but when a user sets and image, it goes back to the default gravatar rather than their avatar image.
    https://brianswebstudio.com/files/acropedia-messages.png

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image settings’ is closed to new replies.