WordPress.org

Support

Support » Requests and Feedback » Author Email in plugin data

Author Email in plugin data

  • 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. 🙂

Viewing 1 replies (of 1 total)
  • 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’.

Viewing 1 replies (of 1 total)
  • The topic ‘Author Email in plugin data’ is closed to new replies.