前言介紹
- 這款 WordPress 外掛「IP Tools」是 2013-07-17 上架。
- 目前有 70 個安裝啟用數。
- 上一次更新是 2019-02-22,距離現在已有 2267 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.8 以上版本才可以安裝。
- 有 3 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
ip | IPv4 | IPv6 | widget | address |
內容簡介
IP Tools 提供了多種方式來控制顯示給訪客的內容,
具體取決於他們是通過 IPv4 還是 IPv6 連接到服務器。
IPv6 正在被逐漸採用,並將最終取代 IPv4。
在互聯網上有很多關於這個主題的信息 —
例如在維基百科上。
歡迎提出要添加到此工具箱中的更多東西。
短碼
將這些短碼放在您的文章和頁面中。
[ipt_address] 會被訪客的 IP 地址替換。
[ipt_ipv6logo width=80px] 會被 IPv6 徽標(來自
World IPv6 Launch 網站)取代,並顯示設定的寬度。
默認寬度為 64 像素:可以指定以任何CSS 長度單位為單位的寬度。
[ipt_ipv6only]...text...[/ipt_ipv6only]僅在使用 IPv6 時顯示文本。
[ipt_ipv4only]...text...[/ipt_ipv4only]僅在使用 IPv4 時顯示文本。
這最後兩個短碼中可以嵌套其他短碼。
請注意,如果主題包括所需的過濾器,則可以在文本小部件中使用短碼。
如果在當前主題中未正常使用小部件中的短碼,
您需要修改 WordPress 主題並將以下代碼放入主題的“functions.php”文件中。
感謝Lost in Code 網站提供此提示。
CSS 類
IP Tools 創建了可用於根據 IPv4 或 IPv6 的使用情況來隱藏任何 HTML 元素的 CSS。
它定義了類 ipt_ipv4only 和 ipt_ipv6only,基本上是做它們所說的:
如果訪問者的 IP 地址在另一個 IP 域中,則使用該類的元素將被修改為 display: none。
例如,如果您在頁面、文章或小部件中包含以下 HTML,
則只會向用戶顯示相關文本部分。
您是通過 IPv4 來訪問此網頁的 --
這是太上世紀了。
做得好!您正在享受 IPv6 的現代奇蹟。
小部件
到目前為止,IP Tools 只提供了一個名為 ‘IP 工具地址’ 的小部件,顯示訪客的 IP 地址,類似於
‘IPv4 地址:12.34.56.78’ 或 ‘IPv6 地址:2001:0db8:85a3:0000:0000:8a2e:0370:7334’。
小部件的標題可以從其默認值 ‘IP 工具’ 更改。
原文外掛簡介
The IP Tools plugin provides a number of ways to control the content displayed
to the visitor depending on whether they have connected to the server
via IPv4 or IPv6.
IPv6 is slowly being adopted, and will eventually replace IPv4.
There is plenty of information on this topic on the internet —
on Wikipedia, for example.
Suggestions for more things to add to this tool box will be welcome.
Shortcodes
Place these shortcodes in your posts and pages.
[ipt_address] is replaced by the visitor’s IP address.
[ipt_ipv6logo width=80px] is replaced by an IPv6 logo (from the
World IPv6 Launch website)
displayed with the given width. The default width is 64 pixels: the width can be
specified in any CSS length unit.
[ipt_ipv6only]...text...[/ipt_ipv6only] displays the text only if IPv6 is in use.
[ipt_ipv4only]...text...[/ipt_ipv4only] displays the text only if IPv4 is in use.
Other shortcodes can be nested within these last two.
Note that shortcodes can be used in text widgets, but only if the theme includes
the necessary filter.
If shortcodes in widgets are not working in your current theme,
you need to modify your WordPress theme and put the following
code into the “functions.php” file of the theme.
Thanks to the Lost in Code website for this tip.
CSS Classes
IP Tools creates CSS which can be used to hide any HTML element depending on whether IPv4 or IPv6 is in use.
It defines classes ipt_ipv4only and ipt_ipv6only which basically do what they say: the element
with that class is modified with display: none if the visitor’s IP address is in the other IP domain.
For example, if you included the following HTML in a page, post, or widget
only the relevant section of text would be displayed to the user.
You've come to this webpage via IPv4 --
that's so last century.
Well done! You're enjoying the modern wonders of IPv6.
Widgets
So far, IP Tools just provides one small widget called ‘IP Tools Address’ that displays the visitor’s IP address — something like
‘IPv4 address: 12.34.56.78’ or ‘IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334’.
The title of the widget can be changed from its default value of ‘IP Tools’.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「IP Tools」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Custom Post Type Permalinks 》自訂文章類型永久連結允許您編輯自訂文章類型的永久連結結構。, 更改自訂分類目錄的永久鏈接,以“example.org/post_type/taxonomy_name/term_slug̶...。
Custom Permalinks 》name or slug), add the filter that looks like this:, function yasglobal_exclude_posts( $post ) {, // Replace '2' with ID of the post you want to ...。
Simple Map 》使用gmaps.js輕鬆嵌入 Google 地圖的外掛程式。, 這個外掛程式允許您將地址轉換成類似下面的 Google 地圖:, [map]加州舊金山[/map], , 另一種方法是只用 URL...。
Five Star Business Profile and Schema 》此外掛可以在網站的任何頁面或文章類型上加入 schema 結構化資料,也輕易地創建一張聯絡卡片,並加上正確的結構化資料。讓你的網站增加 SEO 友好的 Schema.or...。
Speed Contact Bar 》讓您的網站訪客輕鬆聯繫您,提供永久可見的聯繫方式。, 外掛有英文、西班牙文 (Español)、俄語 (ру́сский)、德文 (Deutsch)、波蘭文 (Polski)等多種語言版本...。
Portugal States (Distritos) for WooCommerce 》這個外掛可為 WooCommerce 新增 18 個葡萄牙「州」(被稱為「Distritos」),以及兩個自治區(被稱為「Regiões Autónomas」,分別是馬德拉和亞速爾群島)。, ...。
WooCommerce Address Book 》本外掛給予您的顧客存儲多個帳單和送貨地址的選項,並在結帳時檢索它們。地址可以在/my-account/中快速方便地更新和修改,或者在結帳過程中保存。, 如果您想...。
WooCommerce Email Validation 》「WooCommerce Email Validation」是一個針對 WooCommerce 的外掛程式,可以在結帳頁面加入「確認電子郵件地址」欄位,並將其設為必填欄位。這可以確保您的顧...。
Address Autocomplete via Google for Gravity Forms 》這是一個簡單且好用的外掛程式,可以在 Gravity Form 地址欄位中使用 Google 地址自動建議 API 。如果安裝完成後,請進入 Gravity Form 的選單 ‘Autoco...。
Woocommerce autocomplete checkout address 》這個外掛程式是為了 WooCommerce 結帳時的地址欄位而設計的,它可以幫助您在 Google 上找到地址。, 功能:, 地址建議相關於選定的國家。, 與 WooCommerce 所...。
More Widgets 》WordPress的More Widgets外掛程式為你的WordPress站台的小工具範圍提供額外的小工具。使用此外掛程式來替代內建主題的小工具,這樣當你切換主題時,你的小工...。
Enhanced Custom Permalinks 》這個外掛程式是 Custom-Permalinks 外掛程式的分支,除了修正一些擴充的錯誤之外,還可以與 WP-no-category-base 外掛程式互相操作。, 這個外掛程式讓你更精...。
Embed Google Map 》Embed Google Map 是一款在 WordPress 文章、頁面、文字小工具以及模板中嵌入一個或多個 Google 地圖的外掛。添加地圖非常簡單,只需將您想在地圖上顯示的位...。
BP xProfile Location 》此外掛可與「BuddyPress」和「BuddyBoss 平台」搭配使用。它會建立「xProfile 位置」欄位類型,使用 Google Places API 來填寫和驗證會員檔案上的地址欄位。,...。
Address correction autocomplete for Woo 》這個針對 WooCommerce 的外掛程式使用 Google API 實現自動地址校正,並且應用在結帳流程中。, 功能特色, , 地址建議會根據所選擇的國家提供。, 與 WooCommer...。