Via the admin page added by the plugin, Comments -> Commenter Emails, admin users are presented with the following information: A total count of all unique commenters to the site Th
Via the admin page added by the plugin, Comments -> Commenter Emails, admin users are presented with the following information:
A total count of all unique commenters to the site
The entire list of each unique commenters’ email addresses, names, and provided website URLs
A button to download the entire list of unique commenters’ email addresses (and, optionally, their website URL) in CSV (comma-separated values) format
The plugin only considers approved comments and does not exclude from its listing any known email addresses (i.e. admin and post author email addresses).
The plugin exposes six filters for hooking. Code using these filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). Less ideally, you could put them in your active theme’s functions.php file.
c2c_commenter_emails_show_csv_button (filter)
The ‘c2c_commenter_emails_show_csv_button’ hook allows you to customize whether the button to download a CSV file of the commenter emails list should be present on the plugin’s admin settings page. By default this is true.
Arguments:
$show_button (bool): Whether the download button is shown; it is ‘true’ by default.
Example:
// Disable the download button
add_filter( 'c2c_commenter_emails_show_csv_button', '__return_false' );
c2c_commenter_emails_show_emails (filter)
The ‘c2c_commenter_emails_show_emails’ hook allows you to customize whether the listing of emails should appear on the plugin’s admin settings page. By default this is true.
Arguments:
$show_emails (bool): Whether the listing of emails is shown’ it is ‘true’ by default.
Example:
// Disable showing the emails listing
add_filter( 'c2c_commenter_emails_show_emails', '__return_false' );
c2c_commenter_emails_filename (filter)
The ‘c2c_commenter_emails_filename’ hook allows you to customize the name used for the .csv file when being downloaded. By default this is ‘commenter-emails.csv’.
Arguments:
$filename (string): The filename. By default this is ‘commenter-emails.csv’.
Example:
/**
* Change the default filename to embed today's date for the Commenter Emails plugin.
*
* @param string $filename The filename for the CSV file.
* @return string.
*/
function change_ce_filename( $filename ) {
$date = date('m-d-Y', strtotime('today')); // Get today's date in m-d-Y format (i.e. 02-25-2010)
return "emails-$date.csv";
}
add_filter( 'c2c_commenter_emails_filename', 'change_ce_filename' );
manage_commenter_emails_options (filter)
The ‘manage_commenter_emails_options’ hook allows you to customize the capability required to access the commenter emails admin page. You should be certain that you’ve created the capability and assigned that capability to the desired user(s). By default this is the ‘manage_options’ capability.
Arguments:
$options (string): Capability name. By default this is the ‘manage_options’ capability.
Example:
/**
* Change the capability needed to see the Commenter Emails admin page for the Commenter Emails plugin.
*
* @param string $capability The necessary capability.
* @return string
*/
function change_ce_cap( $capability ) {
return 'manage_commenter_emails';
}
add_filter( 'manage_commenter_emails_options', 'change_ce_cap' );
c2c_commenter_emails_fields (filter)
The ‘c2c_commenter_emails_fields’ hook allows you to customize the user fields included in the download CSV file. By default the CSV file includes comment_author and comment_author_email.
Arguments:
$fields (array): Array of field names. Items must correspond to columns in the comments table. By default this is array( 'comment_author', 'comment_author_email' ). Whether explicitly included or not, ‘comment_author_email’ will always be output in the CSV.
Example:
/**
* Include the commenter's IP address in the download CSV for the Commenter Emails plugin.
*
* @param array $fields The comment email fields to include in the CSV output.
* @return array
*/
function change_ce_fields( $fields ) {
$fields[] = 'comment_author_IP';
return $fields;
}
add_filter( 'c2c_commenter_emails_fields', 'change_ce_fields' );
c2c_commenter_emails_field_separator (filter)
The ‘c2c_commenter_emails_field_separator’ hook allows you to customize the separator used in the CSV file.
Arguments:
$separator (string): String to be used as the data separator in the CSV file. Default is ‘,’.
Example:
/**
* Change the data fields separator to '|' for Commenter Emails plugin.
*
* @param string $separator The defautl separator.
* @return string
*/
function change_ce_field_separator( $separator ) {
return '|';
}
add_filter( 'c2c_commenter_emails_field_separator', 'change_ce_field_separator' );
This website uses cookies to improve your experience. If you decide to use this website, you agree that certain cookies will be used. If you do not agree please close this website. Read moreACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Commenter Emails
€0
Via the admin page added by the plugin, Comments -> Commenter Emails, admin users are presented with the following information: A total count of all unique commenters to the site Th
2.6.1
2020.07.10
600
4.1
5.4.13
5.00
9
Description
Via the admin page added by the plugin,
Comments -> Commenter Emails
, admin users are presented with the following information:The plugin only considers approved comments and does not exclude from its listing any known email addresses (i.e. admin and post author email addresses).
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Hooks
The plugin exposes six filters for hooking. Code using these filters should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). Less ideally, you could put them in your active theme’s functions.php file.
c2c_commenter_emails_show_csv_button (filter)
The ‘c2c_commenter_emails_show_csv_button’ hook allows you to customize whether the button to download a CSV file of the commenter emails list should be present on the plugin’s admin settings page. By default this is true.
Arguments:
Example:
c2c_commenter_emails_show_emails (filter)
The ‘c2c_commenter_emails_show_emails’ hook allows you to customize whether the listing of emails should appear on the plugin’s admin settings page. By default this is true.
Arguments:
Example:
c2c_commenter_emails_filename (filter)
The ‘c2c_commenter_emails_filename’ hook allows you to customize the name used for the .csv file when being downloaded. By default this is ‘commenter-emails.csv’.
Arguments:
Example:
manage_commenter_emails_options (filter)
The ‘manage_commenter_emails_options’ hook allows you to customize the capability required to access the commenter emails admin page. You should be certain that you’ve created the capability and assigned that capability to the desired user(s). By default this is the ‘manage_options’ capability.
Arguments:
Example:
c2c_commenter_emails_fields (filter)
The ‘c2c_commenter_emails_fields’ hook allows you to customize the user fields included in the download CSV file. By default the CSV file includes comment_author and comment_author_email.
Arguments:
array( 'comment_author', 'comment_author_email' )
. Whether explicitly included or not, ‘comment_author_email’ will always be output in the CSV.Example:
c2c_commenter_emails_field_separator (filter)
The ‘c2c_commenter_emails_field_separator’ hook allows you to customize the separator used in the CSV file.
Arguments:
Example: