WordPress.org

Ready to get started?Download WordPress

Forums

Author Email in plugin data (2 posts)

  1. Southbound
    Member
    Posted 5 years ago #

    Just writing my first plugin and I realized that there's no 'Author Email' field among the plugin data properties. I think there should be one. Not every user of WP has a personal webpage. I'd rather have an 'Author Email' field than the current 'Author URI' field. Or at least have both.

    As a work around, I replaced the code on line 124 in plugin.php with this:

    if ( ! empty($plugin_data['AuthorURI']) ) {
    if ( strpos($author_uri, '@') > -1 ) {
    $plugin_data['Author'] = '' . $plugin_data['Author'] . '';
    } else {
    $plugin_data['Author'] = '' . $plugin_data['Author'] . '';
    }
    }

    That is, if there's a '@' in the AuthorURI, then treat it as an email. Technically, an email is a kind of URI too. :)

  2. Southbound
    Member
    Posted 5 years ago #

    Okay, the forum messes with the markup there. In the first case, there's no change, in the second, the string mailto: is added and 'Visit author homepage' is replaced with 'Email author'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.