[WordPress] 外掛分享: Comment Reply Email Notification

前言介紹

  • 這款 WordPress 外掛「Comment Reply Email Notification」是 2016-01-24 上架。
  • 目前有 4000 個安裝啟用數。
  • 上一次更新是 2025-04-28,距離現在已有 5 天。
  • 外掛最低要求 WordPress 4.4.0 以上版本才可以安裝。
  • 有 32 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

awelzel | guhemama |

外掛標籤

email | reply | comment | notification |

內容簡介

這個外掛讓訪客可以透過電子郵件訂閱他們的評論,以便得到回應。

警告

此外掛使用「wp_insert_comment」鉤子,因此每當創建一則評論,通知便有可能被發送。如果您正在導入評論到您的部落格,建議您停用此外掛。

無法發送電子郵件?

此外掛使用 WordPress 標準的電子郵件功能。如果您遇到無法發送電子郵件的問題,您可以嘗試使用像是 https://wordpress.org/plugins/wp-mail-smtp/ 等外掛來改進網站發送電子郵件。

自定義勾選方塊的佈局

勾選方塊旁邊的標籤不包含空格。根據您的佈景主題,您可能需要添加自定義樣式,如下所示,以在勾選方塊和標籤之間獲得空間:

input#cren_subscribe_to_comment, input#cren_gdpr {
margin-right: 0.5em;
}

該外掛不會默認添加此樣式,因為這取決於您的佈景主題是否需要。

自定義電子郵件模板

如果您要自定義電子郵件模板,請將「templates」文件夾複製到您的佈景主題文件夾中(建議使用子主題,以避免佈景主題更新時丟失自定義模板)。該外掛將在「/wp-content/themes/[THEME]/templates/cren/」文件夾中查找模板;如果找不到自定義模板,則會退回到默認模板。

GitHub 上的模板文件夾:https://github.com/arnowelzel/worpdress-comment-reply-email-notification/tree/master/templates

更改訂閱勾選方塊標籤

使用「cren_comment_checkbox_label」過濾器可更改勾選方塊標籤。這樣您就可以按照自己的口味更新文本並保持外掛更新。

更改 GDPR 勾選方塊的標籤

使用「cren_gdpr_checkbox_label」過濾器可更改 GDPR 勾選方塊的標籤。這樣您就可以按照自己的口味更新文本並保持外掛更新。

修改 HTML 輸出

使用過濾器「cren_gdpr_checkbox_html」和「cren_comment_subscribe_html」,您可以根據需要修改勾選方塊的 HTML 輸出。

範例:

add_filter('cren_gdpr_checkbox_html', function(string $html_output, string $label_text, string $privacy_policy_url): string {
$html_output = '

';

return $html_output;
}, 10, 3);

add_filter('cren_comment_subscribe_html', function(string $html_output, string $label_text, bool $checked_default): string {
$checked = $checked_default ? 'checked' : '';
$html_output = '

';

return $html_output;
}, 10, 3);

原文外掛簡介

This plugin allows visitors to subscribe to get answers to their comments via e-mail.
Warning
This plugin uses the “wp_insert_comment” hook, therefore, everytime a comment is created, a notification is likely to be sent. If you are importing comments into your blog, it’s a good idea to disable this plugin.
Sending e-mails does not work?
The plugin uses the standard WordPress e-mail function. If you have problems getting e-mails sent, you might try using plugins like https://wordpress.org/plugins/wp-mail-smtp/ to improve sending e-mails from your site.
Customizing the layout of the checkboxes
The label next to the checkboxes don’t contain a whitespace. Depending on your theme you might want to add a custom style like this to get a space between the checkbox and the label:
input#cren_subscribe_to_comment, input#cren_gdpr {
margin-right: 0.5em;
}

The plugin does not add this style be default as it depends on your theme if this is neccessary.
Customizing the email template
To customize the email template, copy the “templates” folder to your theme folder (a child theme should be used to avoid losing the custom templates when the theme is updated). The plugin will look for templates on the “/wp-content/themes/[THEME]/templates/cren/” folder; if a custom template is not found, then it will fallback to the default template.
Templates folder on GitHub: https://github.com/arnowelzel/worpdress-comment-reply-email-notification/tree/master/templates
Changing the subscription checkbox label
The checkbox label can be changed with the cren_comment_checkbox_label filter. This way you can update the text to your taste and keep the plugin updated.
Changing the GDPR checkbox label
The GDPR checkbox label can be changed with the cren_gdpr_checkbox_label filter. This way you can update the text to your taste and keep the plugin updated.
Modifiying HTML output
Using the filters cren_gdpr_checkbox_html and cren_comment_subscribe_html you can modify the HTML output of the checkboxes if needed.
Example:
add_filter('cren_gdpr_checkbox_html', function(string $html_output, string $label_text, string $privacy_policy_url): string {
$html_output = '

';

return $html_output;
}, 10, 3);

add_filter('cren_comment_subscribe_html', function(string $html_output, string $label_text, bool $checked_default): string {
$checked = $checked_default ? 'checked' : '';
$html_output = '

';

return $html_output;
}, 10, 3);

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Comment Reply Email Notification」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.0 | 1.1.0 | 1.1.1 | 1.2.0 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.4.0 | 1.4.1 | 1.4.2 | 1.4.3 | 1.4.4 | 1.5.0 | 1.6.0 | 1.6.1 | 1.7.0 | 1.7.1 | 1.8.0 | 1.9.0 | trunk | 1.10.0 | 1.10.1 | 1.10.2 | 1.11.0 | 1.12.0 | 1.13.0 | 1.20.0 | 1.21.0 | 1.22.0 | 1.23.0 | 1.24.0 | 1.25.0 | 1.26.0 | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.31.0 | 1.32.0 | 1.33.0 | 1.34.0 | 1.35.0 |

延伸相關外掛(你可能也想知道)

文章
Filter
Apply Filters
Mastodon