Support » Plugins and Hacks » Hacks » Hook for help text on post fields

  • Is there a hook(s) I can use to append theme-specific help text to certain WordPress fields (probably in my functions.php, but maybe in a plugin file).

    For example, I might want to tell users that featured images look best when they are PNGs with transparent backgrounds.

    It just occurred to I could register an admin style that does this:

    #postimagediv .inside:after {
        content: "For best results, use PNG images with transparent backgrounds.";
        font-style: italic;
        color: #555;
    }

    But!
    1) That’s a horrifically-inappropriate use of CSS and just generally hack-y.
    2) It depends on the admin markup just about never changing. That’s probably a bad assumption.

    It would probably just as easy to do this with jQuery but [see the above two points replacing “CSS” with “jQuery”].

    I’ve googled but gotten nowhere on this one. Any help, ideas, or tips would be appreciated.

Viewing 1 replies (of 1 total)
  • Have you looked into the new Pointers feature yet? That may be what you’re looking for.

    There’s also an admin_post_thumbnail_html filter that’s called inside _wp_post_thumbnail_html(), so you could do something like this:

    function addFeaturedImageNote( $content )
    {
    	return $content . '<p>Tip: Featured images look best when they are PNGs with transparent backgrounds.</p>';
    }
    add_filter( 'admin_post_thumbnail_html', 'addFeaturedImageNote' );
Viewing 1 replies (of 1 total)
  • The topic ‘Hook for help text on post fields’ is closed to new replies.