| 开发者 | kgmservizi |
|---|---|
| 更新时间 | 2026年8月14日 03:56 |
| 捐献地址: | 去捐款 |
| PHP版本: | 5.6 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
Read how WordPress shortcode work: WordPress Codex
[y] display current year 2026 [m] display current month April [d] display current day 12 [dmy] display current date 12/04/2026 [c] display copyright symbol © [t] display registered trademark symbol ® [tm] display unregistered trademark symbol ™ [sm] display service mark symbol ℠ [cc] display Copyright [cy] display symbol of copyright and current year © 2026 [cyy year="2003"] display symbol of copyright, first year, current year © 2003-2026 [cyyl year="2003"] display copyright, first year, current year Copyright 2003-2026 [cyyls year="2003"] display copyright (+©), first year, current year © Copyright 2003-2026 [show_user_ip] display ip of current user The complete list of format letters and offsets is in the Description tab.
[c] display copyright symbol © [t] display registered trademark symbol ® [tm] display unregistered trademark symbol ™ [sm] display service mark symbol ℠ Symbols shortcode retrieve the most common "registration" symbols. For more symbols shortcode write a support ticket!
[show_user_ip] display ip of current user With IP shortcode you can retrieve your user IP.
The shortcode reads a forwarded header only when the request reaches your site through a proxy it recognises. Local reverse proxies and Cloudflare are already in the list. For any other CDN, add its ranges:
add_filter( 'cys_trusted_proxies', function ( $proxies ) { $proxies[] = '203.0.113.0/24'; return $proxies; } );
Ask your host or your CDN which ranges to use. Getting it wrong breaks nothing, the shortcode simply falls back to the address of whoever opened the connection.
Because that shortcode prints something different for every visitor, so the page has to be built on each request. If you also cache at the edge, exclude the page there as well.
For shortcode with year you can choose format with attribute format="". It support "Y" (es.2026) or "y" (es.26). Default format without attribute is "Y". You must enter year attribute in the same format. Example [cyy year="03" format="y"] © 03-26 [cyy year="2003" format="Y"] © 2003-2026
For shortcode with month you can choose format with attribute format="". It support "F" - "m" - "M" - "n".
For shortcode with day you can choose format with attribute format="". It support "d" - "D" - "j" - "N" - "S" - "w" - "z" - "t". The full list with the meaning of each letter is in the Description tab.
For [y], [m] and [d] the offset is a plain number with + or -, from -1000 to 1000. For [dmy] the number needs a unit after it: years, months, weeks, days, hours, minutes, seconds. Also "today", "yesterday" and "tomorrow" work. Offsets follow the timezone of your site, the one in Settings > General. Example [d offset="+1"] 13 (if current day is 12) [m offset="+1"] May (if current month is April) [y offset="+1"] 2027 (if current year is 2026) [dmy offset="+1 year"] 12/04/2027 [dmy offset="tomorrow"] 13/04/2026