[WordPress] 外掛分享: Timed Content

前言介紹

  • 這款 WordPress 外掛「Timed Content」是 2011-02-28 上架。
  • 目前有 6000 個安裝啟用數。
  • 上一次更新是 2025-04-28,距離現在已有 5 天。
  • 外掛最低要求 WordPress 3.8 以上版本才可以安裝。
  • 有 41 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

awelzel | kjvtough |

外掛標籤

schedule | timed content | marketing tool |

內容簡介

Timed Content 外掛讓使用者可以根據時間的特性,指定頁面或文章的某一部分會出現/可見或消失/不可見。你甚至可以在某些日期和時間段讓文章或頁面的某一部分可見。此外,你也可以設定一個時間表!

該外掛新增了以下功能:

1. "客戶端" 的簡短代碼,可以在給定時間間隔後標記內容出現或消失;它包括一個"淡入效果"。這個功能僅僅是用於特殊效果,因為以這種方式標記的內容仍然在 HTML 源中可見,因此不是一種安全的隱藏內容的方法;
2. 兩個"服務器端"的簡短代碼,可以標記內容在指定日期/時間間隔內可見。這個功能可以作為隱藏內容的安全方法,因為標記的內容只有在指定的日期/時間間隔中查看時才會包含在頁面/文章中。

插件包括一個 TinyMCE 對話框,以幫助用戶構建簡短代碼。更多信息請查看“截圖”選項卡。

用法示例:

[timed-content-client show="1:00"] 在一分鐘後顯示我。由於我們不需要淡入效果,可以完全省略“show”屬性。
[timed-content-client show="1:00:1000"] 在一分鐘後出現淡入效果,淡入效果持續 1000 毫秒(1 秒)。
[timed-content-client hide="1:00:1000"] 在一分鐘後消失,有一個淡出效果,淡出效果持續 1000 毫秒(1 秒)。
[timed-content-client show="1:00:500" hide="5:00:2000"] 在一分鐘後顯示我,有一個 500 毫秒(半秒)淡入效果,然後在 五分鐘後消失,有一个为 2000 毫秒(2 秒)的淡出效果。
[timed-content-server show="2013-09-13 20:30:00 -0600"] 显示我,从 2013 年 9 月 13 日晚上 8:30 开始,以美國中部標准時間來算。在那之前,我不会被顯示出來。
[timed-content-server hide="2013-09-13 20:30:00 America/Chicago"] 從 2013 年 9 月 13 日晚上 8:30 开始隱藏我,以美國中部夏令時間(即與芝加哥相同的時區)為基準。在此之後,我就不會被顯示出來。
[timed-content-server show="2013-09-13 20:30:00 -0600" hide="2013-09-13 21:30:00 -0600"] 從 2013 年 9 月 13 日晚上 8:30 开始显示我,一个小时后消失。在那之前和之后,我都不會被顯示出來。
[timed-content-rule id="164"] 根据 ID 为 164 的 Timed Content Rule 的设置显示我。

注意:所有簡短代碼都可以使用 TinyMCE 對話框構建。如果不確定,請使用對話框創建正確格式的簡短代碼。

簡短代碼:

[timed-content-client show="mm:ss:fff" hide="mm:ss:fff"] 示例文本 [/timed-content-client]

* show - 在加載網頁後指定的時間間隔內顯示被標記的內容。該屬性由三部分組成,以冒號分隔:mm - 分鐘,ss - 秒,fff(如果大於0)- 應用持续時間為fff 毫秒的淡入效果。
* hide - 在加載網頁後指定的時間間隔內隱藏被標記的內容。該屬性由三部分組成,以冒號分隔:mm - 分鐘,ss - 秒,fff(如果大於0)- 應用持續時間為fff 毫秒的淡出效果。

原文外掛簡介

The Timed Content plugin allows users to specify that a portion of a Page or Post should appear/be visible or disappear/be invisible based on given time characteristics. You can also make portions of a Post or Page be visible at certain dates and times; you can even set up a schedule!
The plugin adds the following:

A “client-side” shortcode that allows the marking of content to appear or disappear after a given time interval; a “fade” effect is included. This functionality is intended to be used for special effects only, as content marked in this manner is still visible in the HTML source and, therefore, not a secure method of hiding content.
Two “server-side” shortcodes that allow the marking of content to be visible only during specified date/time intervals. This functionality can be used as a secure method of hiding content, because the marked content will be included in the Page/Post only when viewed in the specified date/time intervals.

A TinyMCE dialog is included to help users build the shortcodes. See the Screenshots tab for more info.
Examples
[timed-content-client show="1:00"]Show me after one minute. Since we don't want a fade-in, we can leave it out of the "show" attribute completely.[/timed-content-client]

[timed-content-client show="1:00:1000"]Show me after one minute with a 1000 millisecond (1 second) fade-in.[/timed-content-client]

[timed-content-client hide="1:00:1000"]Hide me after one minute with a 1000 millisecond (1 second) fade-out.[/timed-content-client]

[timed-content-client show="1:00:500" hide="5:00:2000"]Show me after one minute with a 500 millisecond (a half-second) fade-in, then hide me after five minutes with a 2000 millisecond (2 seconds) fade-out.[/timed-content-client]

[timed-content-server show="2013-09-13 20:30:00 -0600"]Show me starting at 8:30 PM Central Standard Time on September 13th, 2013. I will not be displayed before then.[/timed-content-server]

[timed-content-server hide="2013-09-13 20:30:00 America/Chicago"]Hide me starting at 8:30 PM Central Daylight Time (i.e., the same timezone as Chicago) on September 13th, 2013. I will not be displayed after then[/timed-content-server]

[timed-content-server show="2013-09-13 20:30:00 -0600" hide="2013-09-13 21:30:00 -0600"]Show me starting at 8:30 PM Central Standard Time on September 13th, 2013, then hide me an hour later. I will not be displayed before or after then.[/timed-content-server]

[timed-content-rule id="164"]Display me based on the settings for the Timed Content Rule whoseID is 164.[/timed-content-rule]

Usage

NOTE: All shortcodes can be built using the TinyMCE dialog. When in doubt, use the dialog to create correctly formed shortcodes.
The timed-content-client shortcode
[timed-content-client show="mm:ss:fff" hide="mm:ss:fff"]Example Text[/timed-content-client]

show – Specifies the time interval after loading the web page when the marked content should be displayed. The attribute consists of three parts,
separated by colons: mm – minutes, ss – seconds, and fff – if greater than 0, a fade-in effect lasting fff milliseconds is applied.
hide – Specifies the time interval after loading the web page when the marked content should be hidden. The attribute consists of three parts,
separated by colons: mm – minutes, ss – seconds, and fff – if greater than 0, a fade-out effect lasting fff milliseconds is applied.

Both attributes are optional, but at least one attribute must be included. Leading zeros (0) are optional. The shortcode’s behaviour depends on which attributes are used:

show only – Marked content is initially not visible, then appears mm minutes and ss seconds after loading with a fff millisecond fade-in.
hide only – Marked content is initially visible, then disappears mm minutes and ss seconds after loading with a fff millisecond fade-out.
show and hide – Marked content is initially not visible, then appears according to the values set in show, then disappears according to the values set in hide.

Your users must have JavaScript enabled for this shortcode to work.
The timed-content-server shortcode
[timed-content-server show="datetime" hide="datetime" debug="true|false|when_hidden"]Example Text[/timed-content-server]

show – Specifies the date/time when the marked content should start being included on the web page.
hide – Specifies the date/time after which the marked content should stop being included on the web page.
debug – If true, adds some debugging statements to the web page as HTML comments. If when_hidden, the debugging statements are added only when the content is hidden. Defaults to false.

The date and time are expected to be yyyy-mm-dd HH:MM (similar to ISO 8601), for example 2019-04-07 15:30 for April 7, 2019, 15:30. For backward compatiblity old “human readable” date formats should also work, but these should not be used any longer!
In addition you can provide a timezone in the date/time parameter either as name or as offset like 2019-04-07 15:30 America/Chicago or 2019-04-07 15:30 +0200. If you do not provide a timezone, the WordPress timezone setting will be used as default.
Both show and hide attributes are optional, but at least one attribute must be included. The shortcode’s behaviour depends on which attributes are used:

show only – Marked content is outputted only after the date/time set here.
hide only – Marked content is outputted only before the date/time set here.
show and hide – Marked content is outputted only during the time period defined by the show and hide attributes.

The timed-content-rule shortcode
[timed-content-rule id="{rule_id}|{rule_name}"]Example Text[/timed-content-rule]

You can find the correct shortcode from the Timed Content Rules overview page, or use the TinyMCE dialog.
Testing server side rules
For testing the behaviour of server side rules at specific times, you may use the GET parameter tctest in an URL, followed by date and time in the format YYYY-MM-DD+hh:mm:ss. This works only you are logged in with a user which has the right to edit the displayed page or post. For example: http://mysite.example?tctest=2018-02-10+19:16:00 will show the content as if it was February 10, 2018 at 19:16.
Developer Documentation
Action hooks
add_action( "timed_content_server_show", "{function_name}", {priority_level}, 4 );

Fired when the [timed-content-server] shortcode is encountered AND the content is to be displayed based on the shortcode’s show/hide attributes. Functions using this hook should accept the following arguments in order:

$post_id – the ID of the currently displayed Post/Page
$show – the value of the show attribute. If not set, defaults to “1970-Jan-01 00:00:00 +000”
$hide – the value of the hide attribute. If not set, defaults to “2038-Jan-19 03:14:07 +000”

$content – The content enclosed by the shortcode
add_action( “timed_content_server_hide”, “{function_name}”, {priority_level}, 4 );

Fired when the [timed-content-server] shortcode is encountered AND the content is to be hidden based on the shortcode’s show/hide attributes. Functions using this hook should accept the following arguments in order:

$post_id – the ID of the currently displayed Post/Page
$show – the value of the show attribute. If not set, defaults to “1970-Jan-01 00:00:00 +000”
$hide – the value of the hide attribute. If not set, defaults to “2038-Jan-19 03:14:07 +000”

$content – The content enclosed by the shortcode
add_action( “timed_content_rule_show”, “{function_name}”, {priority_level}, 3 );

Fired when the [timed-content-rule] shortcode is encountered AND the content is to be displayed based on the Timed Content Rule’s properties. Functions using this hook should accept the following arguments in order:

$post_id – the ID of the currently displayed Post/Page
$rule_id – the ID of the Timed Content Rule being called. Use get_post_meta( $rule_id ) to get the Rule’s properties.

$content – The content enclosed by the shortcode
add_action( “timed_content_rule_hide”, “{function_name}”, {priority_level}, 3 );

Fired when the [timed-content-rule] shortcode is encountered AND the content is to be hidden based on the Timed Content Rule’s properties. Functions using this hook should accept the following arguments in order:

$post_id – the ID of the currently displayed Post/Page
$rule_id – the ID of the Timed Content Rule being called. Use get_post_meta( $rule_id ) to get the Rule’s properties.
$content – The content enclosed by the shortcode

Filter hooks
timed_content_filter

Filter for any content enclosed by a Timed Content shortcode. Implements the same filters as the_content:

wptexturize
convert_smilies
convert_chars
wpautop
prepend_attachment

do_shortcode
timed_content_filter_override

Replaces the timed_content_filter with another pre-existing filter to use for any content enclosed by a Timed Content shortcode. Any function hooked into this filter must return the name of a filter (as a string).

各版本下載點

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

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


1.0 | 1.1 | 1.2 | 2.0 | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 | 2.6 | 2.7 | 2.8 | 2.9 | 2.10 | 2.11 | 2.12 | 2.15 | 2.50 | 2.51 | 2.52 | 2.53 | 2.54 | 2.55 | 2.56 | 2.57 | 2.58 | 2.60 | 2.61 | 2.62 | 2.63 | 2.64 | 2.65 | 2.66 | 2.67 | 2.68 | 2.69 | 2.70 | 2.71 | 2.72 | 2.73 | 2.74 | 2.75 | 2.76 | 2.77 | 2.78 | 2.79 | 2.80 | 2.81 | 2.82 | 2.90 | 2.91 | 2.92 | 2.93 | 2.94 | 2.95 | 2.1.1 | 2.1.2 | 2.1.3 | 2.1.4 | 2.1.5 | 2.3.1 | 2.5.1 | trunk |

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

  • The Events Calendar 》使用 The Events Calendar 免費外掛程式,在您的 WordPress 網站上輕鬆創建和管理事件日曆。不論您的事件是實體活動還是虛擬事件,這款 WordPress 日曆插件都...。
  • OttoKit: All-in-One Automation Platform (Formerly SureTriggers) 》ther popular tools. It is affordable and easy to use, even for non-technical users., With SureTriggers, you can create complex workflows and integr...。
  • WP Import Export Lite 》o.com/goto/wpimportexport" target="_blank">WordPress Import Export 插件 是一款易用、快速且進階的匯入和匯出網站數據的工具。, WordPress Import Export...。
  • Timetable and Event Schedule by MotoPress 》le and Event Schedule 的繁體中文描述:, MotoPress Timetable and Event Schedule 是一個全方位的組織者外掛程式,旨在協助您建立和管理單個或多個事件的線...。
  • Auto Post Scheduler 》使用「自動貼文排程器」自動發佈新文章和/或回收舊文章!不需要單獨安排發佈時間,回收舊文章可以讓您的網站看起來更加新鮮。, 在匯入大量文章時特別有用,您...。
  • Appointment Hour Booking – WordPress Booking Plugin 》Appointment Hour Booking 是一個 WordPress 外掛程式,可建立預約表單,用於具有開始時間和預定時間表的預約。使用者可以從一組根據「營業時間」和服務時間...。
  • Advanced Schedule Posts 》允許您設定文章到期時間和覆蓋另一篇文章的排程。, 到期時間, 當文章到期時,文章的狀態會變為「草稿」。, 覆蓋另一篇文章, 當預定發布的文章(A)由 WordPre...。
  • Revisionize 》在繁忙的網站上,您不能沒有審查和批准就對已發布的帖子作出更改。 Revisionize 可以將您的文章、頁面或自定義文章類型複製一份為草稿,讓您自由地調整、編輯...。
  • Missed Schedule Post Publisher 》WordPress 漏排文章排程發佈器, 檢查是否有漏排的文章排程,若有則發佈。選擇執行時間,即可忘卻此事。, 此外掛可在流量較低、文章更新頻率較高,標準方法無...。
  • WPC Product Timer for WooCommerce 》rant has a lunch menu which is only available between 12pm to 2pm every weekday., , With WPC Product Timer for WooCommerce, you can easily set up t...。
  • TAO Schedule Update 》一個簡單的 WordPress 外掛,可用於排程內容更新。, 動機:, 現今,WordPress 幾乎不再只被用作純粹的部落格。大多數情況下,它被用作功能完整的 CMS,有許多...。
  • Events Calendar for GeoDirectory 》The Events Calendar 外掛是一個與 GeoDirectory 合作的佳選,能夠以自定義文章類型 (CPT) 的方式,強化你的目錄上的活動特色。此事件日曆外掛可建立 CPT 事...。
  • Weekly Class Schedule 》Weekly Class Schedule 是一款使用超簡單介面來生成每週課程表的外掛。, 如何從版本2轉移數據, 在“時間表”選項卡下,您會找到“導入/更新”頁面。轉到該頁面並...。
  • VA Simple Expires 》VA Simple Expires 是一個 WordPress 外掛,可以讓你為文章添加過期日期。, 使用方法非常簡單,你只需為文章指定一個過期日期,當日期到達後,該文章便會從你...。
  • WordPress Appointment Booking Plugin 》預訂 Lite 是一個免費的預訂小工具,可自動安排與客戶的會議。, , , 包括儀表板存取權的外掛展示。, 課程總覽視頻, 指南視頻, 說明文件, , , 這是一個完美的W...。

文章
Filter
Apply Filters
Mastodon