• Resolved onininon


    Hi, I install WP User Frontend Version 3.1.1

    and when I write

    get_avatar($author_id, 64, '', '', array('class' => array('img-circle')))

    the arg param not working

    I found

    function wpuf_get_avatar( $avatar, $id_or_email, $size, $default, $alt )

    in wpuf-functions.php

    miss the last para $arg

    please fix it thanks

     * Retrieve the avatar <code><img /></code> tag for a user, email address, MD5 hash, comment, or post.
     * @since 2.5.0
     * @since 4.2.0 Optional <code>$args</code> parameter added.
     * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash,
     *                           user email, WP_User object, WP_Post object, or WP_Comment object.
     * @param int    $size       Optional. Height and width of the avatar image file in pixels. Default 96.
     * @param string $default    Optional. URL for the default image or a default type. Accepts '404'
     *                           (return a 404 instead of a default image), 'retro' (8bit), 'monsterid'
     *                           (monster), 'wavatar' (cartoon face), 'indenticon' (the "quilt"),
     *                           'mystery', 'mm', or 'mysteryman' (The Oyster Man), 'blank' (transparent GIF),
     *                           or 'gravatar_default' (the Gravatar logo). Default is the value of the
     *                           'avatar_default' option, with a fallback of 'mystery'.
     * @param string $alt        Optional. Alternative text to use in <img> tag. Default empty.
     * @param array  $args       {
     *     Optional. Extra arguments to retrieve the avatar.
     *     @type int          $height        Display height of the avatar in pixels. Defaults to $size.
     *     @type int          $width         Display width of the avatar in pixels. Defaults to $size.
     *     @type bool         $force_default Whether to always show the default image, never the Gravatar. Default false.
     *     @type string       $rating        What rating to display avatars up to. Accepts 'G', 'PG', 'R', 'X', and are
     *                                       judged in that order. Default is the value of the 'avatar_rating' option.
     *     @type string       $scheme        URL scheme to use. See set_url_scheme() for accepted values.
     *                                       Default null.
     *     @type array|string $class         Array or string of additional classes to add to the <img> element.
     *                                       Default null.
     *     @type bool         $force_display Whether to always show the avatar - ignores the show_avatars option.
     *                                       Default false.
     *     @type string       $extra_attr    HTML attributes to insert in the IMG element. Is not sanitized. Default empty.
     * }
     * @return false|string <code><img /></code> tag for the user's avatar. False on failure.
    function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = null )


Viewing 1 replies (of 1 total)
  • Mazhar


    Hello @onininon,

    Actually, we had an issue that’s why you have faced this. But I am happy to inform you that we have fixed it already. And we will release a new version of WPUF with this fix.


Viewing 1 replies (of 1 total)
  • The topic ‘get_avatar $args not working’ is closed to new replies.