[wordpress插件] Commenter Emails评论电子邮件

wordpress 插件 文章 2020-03-29 03:10 491 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

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
    • 每个唯一评论者的电子邮件地址,名称和提供的网站URL的完整列表

    • A button to download the entire list of unique commenters’ email addresses (and, optionally, their website URL) in CSV (comma-separated values) format
    • 用于以CSV(逗号分隔值)格式下载唯一评论者的电子邮件地址(以及可选的网站URL)的整个列表的按钮

    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 |

    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).

    理想情况下,应该将使用这些过滤器的代码放入mu插件或特定于站点的插件中(这不在本自述文件的解释范围内)。

    Less ideally, you could put them in your active theme’s functions.php file.

    不太理想的是,您可以将它们放在活动主题的functions.php文件中。

    c2c_commenter_emails_show_csv_button (filter)

    c2c_commenter_emails_show_csv_button(过滤器)

    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.

    通过“ c2c_commenter_emails_show_csv_button”钩子,您可以自定义是否应在插件的管理员设置页面上显示用于下载评论者电子邮件列表的CSV文件的按钮。

    By default this is true.

    默认情况下,这是真的。

    Arguments:

    参数:

      • $show_button (bool): Whether the download button is shown;

      • $ show_button(布尔):是否显示下载按钮;

        it is ‘true’ by default.

      • 默认情况下为“ true”。

      Example:

      示例:

      // Disable the download button

        //禁用下载按钮

      add_filter( 'c2c_commenter_emails_show_csv_button', '__return_false' );

      add_filter('c2c_commenter_emails_show_csv_button','__return_false');

      c2c_commenter_emails_show_emails (filter)

      c2c_commenter_emails_show_emails(过滤器)

      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.

      通过“ c2c_commenter_emails_show_emails”钩子,您可以自定义电子邮件列表是否应出现在插件的管理设置页面上。

      By default this is true.

      默认情况下,这是真的。

      Arguments:

      参数:

        • $show_emails (bool): Whether the listing of emails is shown’ it is ‘true’ by default.
        • $ show_emails(布尔):默认情况下,是否显示电子邮件列表为“ true”。

        Example:

        示例:

        // Disable showing the emails listing

          //禁用显示电子邮件列表

        add_filter( 'c2c_commenter_emails_show_emails', '__return_false' );

        add_filter('c2c_commenter_emails_show_emails','__return_false');

        c2c_commenter_emails_filename (filter)

        c2c_commenter_emails_filename(过滤器)

        The ‘c2c_commenter_emails_filename’ hook allows you to customize the name used for the .csv file when being downloaded.

        使用“ c2c_commenter_emails_filename”钩子,您可以自定义下载.csv文件时使用的名称。

        By default this is ‘commenter-emails.csv’.

        默认情况下,这是“ commenter-emails.csv”。

        Arguments:

        参数:

          • $filename (string): The filename.

          • $ filename(字符串):文件名。

            By default this is ‘commenter-emails.csv’.

          • 默认情况下,这是“ 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. 

          * @param string $ filename CSV文件的文件名。 

          * @return string. 

          * @返回字符串。 

          */

          * /

          function change_ce_filename( $filename ) {    

          函数change_ce_filename($ filename){    

          $date = date('m-d-Y', strtotime('today'));

          $ date = date('m-d-Y',strtotime('today'));

          // Get today's date in m-d-Y format (i.e. 02-25-2010)    

          //以m-d-Y格式获取当天的日期(即2010年2月25日)    

          return "emails-$date.csv";

          返回“ emails- $ date.csv”;

          }

          }

          add_filter( 'c2c_commenter_emails_filename', 'change_ce_filename' );

          add_filter('c2c_commenter_emails_filename','change_ce_filename');

          manage_commenter_emails_options (filter)

          manage_commenter_emails_options(过滤器)

          The ‘manage_commenter_emails_options’ hook allows you to customize the capability required to access the commenter emails admin page.

          通过“ manage_commenter_emails_options”钩子,您可以自定义访问评论者电子邮件管理页面所需的功能。

          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.

          默认情况下,这是“ manage_options”功能。

          Arguments:

          参数:

            • $options (string): Capability name.

            • $ options(字符串):功能名称。

              By default this is the ‘manage_options’ capability.

            • 默认情况下,这是“ manage_options”功能。

            Example:

            示例:

            /** 

              / ** 

            * Change the capability needed to see the Commenter Emails admin page for the Commenter Emails plugin. 

            *更改查看评论者电子邮件插件的评论者电子邮件管理页面所需的功能。 

            * @param string $capability The necessary capability. 

            * @param string $ capability必要的功能。 

            * @return string 

            * @返回字符串 

            */

            * /

            function change_ce_cap( $capability ) {    

            函数change_ce_cap($ capability){    

            return 'manage_commenter_emails';

            返回'manage_commenter_emails';

            }

            }

            add_filter( 'manage_commenter_emails_options', 'change_ce_cap' );

            add_filter('manage_commenter_emails_options','change_ce_cap');

            c2c_commenter_emails_fields (filter)

            c2c_commenter_emails_fields(过滤器)

            The ‘c2c_commenter_emails_fields’ hook allows you to customize the user fields included in the download CSV file.

            通过“ c2c_commenter_emails_fields”钩子,您可以自定义下载CSV文件中包含的用户字段。

            By default the CSV file includes comment_author and comment_author_email.

            默认情况下,CSV文件包含comment_author和comment_author_email。

            Arguments:

            参数:

              • $fields (array): Array of field names.

              • $ fields(数组):字段名称的数组。

                Items must correspond to columns in the comments table.

                项目必须与注释表中的列相对应。

                By default this is array( 'comment_author', 'comment_author_email' ).

                默认情况下,这是 array('comment_author','comment_author_email')

                Whether explicitly included or not, ‘comment_author_email’ will always be output in the CSV.

              • 无论是否明确包含“ comment_author_email”,始终会以CSV格式输出。

              Example:

              示例:

              /** 

                / ** 

              * Include the commenter's IP address in the download CSV for the Commenter Emails plugin. 

              *在评论者电子邮件插件的下载CSV文件中包括评论者的IP地址。 

              * @param array $fields The comment email fields to include in the CSV output. 

              * @param array $ fields包含在CSV输出中的注释电子邮件字段。 

              * @return array 

              * @返回数组 

              */

              * /

              function change_ce_fields( $fields ) {    

              函数change_ce_fields($ fields){    

              $fields[] = 'comment_author_IP';    

              $ fields [] ='comment_author_IP';    

              return $fields;

              返回$ fields;

              }

              }

              add_filter( 'c2c_commenter_emails_fields', 'change_ce_fields' );

              add_filter('c2c_commenter_emails_fields','change_ce_fields');

              c2c_commenter_emails_field_separator (filter)

              c2c_commenter_emails_field_separator(过滤器)

              The ‘c2c_commenter_emails_field_separator’ hook allows you to customize the separator used in the CSV file.

              通过“ c2c_commenter_emails_field_separator”挂钩,您可以自定义CSV文件中使用的分隔符。

              Arguments:

              参数:

                • $separator (string): String to be used as the data separator in the CSV file.

                • $ separator(字符串):用作CSV文件中数据分隔符的字符串。

                  Default is ‘,’.

                • 默认值为“,”。

                Example:

                示例:

                /** 

                  / ** 

                * Change the data fields separator to '|'

                *将数据字段分隔符更改为“ |”

                for Commenter Emails plugin. 

                用于评论者电子邮件插件。 

                * @param string $separator The defautl separator. 

                * @param string $ separator defautl分隔符。 

                * @return string 

                * @返回字符串 

                */

                * /

                function change_ce_field_separator( $separator ) {    

                函数change_ce_field_separator($ separator){    

                return '|';

                返回“ |”;

                }

                }

                add_filter( 'c2c_commenter_emails_field_separator', 'change_ce_field_separator' );

                add_filter('c2c_commenter_emails_field_separator','change_ce_field_separator');

安装步骤

    1. Install via the built-in WordPress plugin installer.

    2. 通过内置的WordPress插件安装程序进行安装。

      Or download and unzip commenter-emails.zip inside the plugins directory for your site (typically wp-content/plugins/)

    3. 或在您网站的插件目录中下载 commenter-emails.zip 并解压缩(通常为 wp-content / plugins /

    4. Activate the plugin through the ‘Plugins’ admin menu in WordPress
    5. 通过WordPress中的“插件”管理菜单激活插件

    6. View the commenter email information reported in the WordPress admin via Comments -> Commenter Emails
    7. 通过评论->评论者电子邮件 查看WordPress管理员中报告的评论者电子邮件信息。

下载地址
https://downloads.wordpress.org/plugin/commenter-emails.2.6.zip
-EOF-

AI助手支持GPT4.0