• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change Gravatar Size

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Change Gravatar Size

This topic is: not resolved

Tagged: child theme, functions, gravatar

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 3 months ago by Gary Jones.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 20, 2013 at 4:02 pm #13343
    Ipstenu
    Member

    I just wanted bigger pictures. Put this in your functions. (It'd be nice to be able to set that in Genesis Settings, but it may be rarely used).


    add_filter('genesis_comment_list_args', 'childtheme_comment_list_args');
    function childtheme_comment_list_args($args) {
    $args['avatar_size'] = '90';
    return $args;
    }

    January 20, 2013 at 4:20 pm #13348
    Gary Jones
    Member

    What? No code standards? No documentation? A number given as a string? 😉

    https://gist.github.com/4582232


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

    January 21, 2013 at 12:21 am #13419
    Ipstenu
    Member

    When the documentation is nearly three times as long as the code, and the code is self-explanatory, I follow Otto's rule 😉

    If anything, I'd do this for a site not my own:

    // Change default gravatar size in comments
    add_filter('genesis_comment_list_args', 'childtheme_comment_list_args');
    function childtheme_comment_list_args($args) {
    $args['avatar_size'] = '90'; // Value is side length of square avatar, in pixels.
    return $args;
    }

    March 1, 2013 at 4:41 am #23466
    Gary Jones
    Member

    While you and Otto will find the code more than self-explanatory, there are some lower-level users who won't immediately understand what's going on with the snippet. There's a couple of implicit assumptions that non-coders may not get from your first snippet:

    * The value passed in is an array, one which contains values for lots of comment-related stuff.
    * Avatars are square - by size, it means the length of a side, in pixels.

    In addition - your first extra comment says it's for gravatars, and that may not be true. I didn't see your second comment initially, as it's tucked away with the code (in this non-syntax-highlighted environment).

    In six months time, when someone is looking at their code, wondering if they can use it on another project, or trying to remember what it does, then having a points of reference of who initially wrote it, and where they might have copied it from is going to be useful to them.

    Those developers who already fully document their code and perhaps use documentation generating applications appreciate being able to copy and paste an already-fully-documented snippet.

    It's really not about the number of lines of documentation versus the number of lines of code - it's about providing as many explanatory notes as possible for future you (or here, the rest of the Genesis community) about what the code does. Those who don't need the full documentation can either delete it, or leave it in, with no ill-effect.

    We each have our own styles for private coding of course, but when you're starting a new thread for the express purpose of sharing a useful bit of code, it makes sense to make that snippet use WP code standards and be as fully documented as possible, for the hundreds or thousands of people who will see or use it in their own projects, thereby saving them work, helping future them, and promoting good practice.


    WordPress Engineer, and key contributor the Genesis Framework | @GaryJ

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble