[WordPress] 外掛分享: Custom Cookie Message

首頁外掛目錄 › Custom Cookie Message
WordPress 外掛 Custom Cookie Message 的封面圖片
20+
安裝啟用
尚無評分
2026 天前
最後更新
問題解決
WordPress 4.9+ PHP 5.6+ v2.4.10 上架:2016-10-30

內容簡介

安裝並啟用此外掛後,預設內容和樣式會自動顯示。

自訂 Cookie 訊息支援多語言,您只需像處理其他字串一樣翻譯 Cookie 訊息字串即可。在 WPML 或 Polylang 等外掛中,Cookie 訊息字串會像其他字串一樣出現,可立即進行翻譯。
自訂 Cookie 訊息也支援多站台,可自訂訊息位置、內容和樣式。設定可在 "設定" > "Cookies" 中找到。

功能

我們有預設的 Cookie 清單,讓使用者可自行刪除,您也可以使用此篩選器來擴充清單:

add_filter( 'default_advertising_list_filters', 'add_som_cookies_name_to_default_list' );

/**
* 擴充廣告 Cookie 清單
* @param $default_cookies
*
* @return array
*/
function add_som_cookies_name_to_default_list( $default_cookies ){
$default_cookies[] = 'cookie_name';

return $default_cookies;
}

預設 Cookie 清單如下:

_ga,_gid,_hjIncludedInSample,_hjid,1P_JAR,APISID,CONSENT,HSID,NID,SAPISID,SEARCH_SAMESITE,SID,SIDCC,SSID,UULE

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.4.10) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Custom Cookie Message」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Installing and activating the plugin will automatically make it appear with the default content and styling.
Custom cookie message is compatible with multilanguages where all you have to do is translate the strings of the cookie message as you would with any other strings. In plugins such as WPML or Polylang the cookie message strings show up just as other strings and are ready to be translated.
Custom cookie message is also compatible with multisites. The location of the message is customizable as well as the content and styling. The settings can be found under settings -> cookies.
Features
We have a list of cookies by default so the customers can delete them if they want to, and you can expand this list using this filter:
add_filter( 'default_advertising_list_filters', 'add_som_cookies_name_to_default_list' );

/**
* To expand advertising cookies list
* @param $default_cookies
*
* @return array
*/
function add_som_cookies_name_to_default_list( $default_cookies ){
$default_cookies[] = 'cookie_name';

return $default_cookies;
}

Default cookies list:
_ga,_gid,_hjIncludedInSample,_hjid,1P_JAR,APISID,CONSENT,HSID,NID,SAPISID,SEARCH_SAMESITE,SID,SIDCC,SSID,UULE

延伸相關外掛

文章
Filter
Apply Filters
Mastodon