Linux 软件免费装
Banner图

Time Lord

开发者 gsarig
更新时间 2023年11月6日 00:47
捐献地址: 去捐款
PHP版本: 4.0 及以上
WordPress版本: 6.4
版权: GPLv2 or later

标签

Shortcode schedule Time

下载

1.0 1.1 1.2

详情介绍:

Time Lord is a plugin which allows you to schedule the publication of part of your content on a set date. It can also calculate age based on a set year in the past or the estimated time if the year is set in the future. You can use it in posts, pages or any other content type via the [timelord] shordcode. Here are some common examples, supposing that present day is on April 2015: View the demo Features

安装:

  1. Upload the Time Lord plugin to your WordPress plugins directory and activate it.
  2. That's it! There is no options page. Just go and start adding your shortcodes as described in the FAQ section.

升级注意事项:

1.1
  • NEW FEATURE: Show content recursively at user set intervals.
1.0

常见问题:

Which are the available parameters?

Shortcode parameters include the following:

  • mode. It is used to determine whether the wrapped content will be shown or hidden at the given timeframe. By default it is set to "show". The other parameter you can give is "hide".
  • from. The date your content should start appearing. It accepts time values of the form "YYYY-MM-DD hh:mm:ss" (for example: [timelord from="2016-4-1 20:10:00"]SOME CONTENT[/timelord] will show the text "SOME CONTENT" on April 1st of 2016 at 20:10). If you don't care about so much specificity, you can omit values from right to left. For example, you could just add from="2016-04" if you want to show your content as soon as April 2016 comes.
  • to. Same as the "from" parameter, "to" allows you to hide content at a specific time in the future. The same rules described at the "from" parameters apply here as well.
  • every. Output content recursively at specified intervals. It works best if a "from" and "to" dates are set. For example, [timelord from="2015-04-01" to="2016-04-01" every="1 day"]SOME CONTENT[/timelord] would output "SOME CONTENT" every other day until April 1st. This parameter can accept a date with relative parts like for example every="12 hours", every="2 days", every="1 hour" etc. (See examples). Also, you can use the day's' name to show content on a specific day of the week using, for example every="Monday". NOTE: the "every" parameter cannot be combined with the other parameters that follow - it will just show or hide the content depending on the given interval.
  • del. Instead of just removing the content when it expires, this parameter wraps it in the tag in order to mark it as "erased". For example, [timelord to="2016-4-1" del="yes"]SOME CONTENT[/timelord] would output SOME CONTENT (check screenshot for an example of what the user would actually see in the frontend).
  • message. It displays some alternate content until the set date comes. It accepts some basic HTML formatting.
  • from_msg. If this parameter is set and is not empty AND if the "from" parameter is set, it will show the remaining time until the publication (for example "4 months"). If you add any text in there, it will add this text before the remaining time. For example, given that present is April 2015, [timelord from="2016-04" from_msg="Content will be live in: "]SOME CONTENT[/timelord] would output "Content will be live in 12 months".
  • to_msg. It have exactly the same function as the "from_msg", only this time it calculated the end date (as long as the "to" parameter is set).
  • year. This is a standalone parameter, which means that if it is set, all the previous get ignored. It is used to calculate age. For example, given that we are on 2015 [timelord year="1980"] will output "35". If the year is set to the future, it will output the years remaining. for example, [timelord year="2020"] would output "5".
  • ordinal. This is the only parameter that can be used along with "year", to add an ordinal suffix to the output. For example [timelord year="1980" ordinal="yes"] would output "35th".
You can combine the parameters in many ways. For example, given that we are on April 2015, [timelord from="2016-04" to="2017-04" message="Content not yet available. " from_msg="Time to be up: " to_msg="Will expire: "]SOME CONTENT. [/timelord] would output the following:
  • If we are on April 2015: "Content not yet available. Time to be up: 12 months"
  • On April 2016: "SOME CONTENT. Will expire: 2 years"
On the other hand [timelord mode="hide" from="2016-04" to="2017-04"]SOME CONTENT[/timelord] would hide the content on the given timeframe and show it at the rest of the time.

更新日志:

1.2 1.1 1.0