Описание
Shortcode for Current Dateпозволяет поместить текущую дату, текущий месяц или текущий год в любое место на вашем сайте WordPress с помощью простого шорткода .
Just use the shortcode [current_date] and when the post or page is displayed, [current_date] will be replaced by the current date. And the date will be translated according to your site settings.
По умолчанию будет отображаться такая дата: 7 мая 2017
Но вы можете настроить его под свои нужды. Для этого вам нужно будет передать формат даты, используя атрибут с шорткодом .
Вот несколько примеров:
[current_date format = ‘d/m/Y’] покажет дату как это: 07/05/2017
[current_date format = ‘F d, Y’] покажет дату как это: Май 07, 2017
Если вы не понимаете, как работает это форматирование, это нормально.
Gutenberg Block
If you are using Gutenberg editor, there’s a Current Date block you can use to insert the current date in your posts/pages.
If you use the block, you will not have to use the shortcode.
When you insert the block, on the right sidebar under block options you will see a field to put the format for the date.
Styling
You can use ‘size’ and ‘color’ attributes to style the date.
For example, [current_date format=’d/m/Y’ size=’20px’ color=’#FF0000′]
What’s Next
If you like this plugin, then consider checking out our other plugins:
- WP Table Builder — Drag and Drop Table Builder Plugin. Build Responsive Tables insanely easily.
- Ultimate Blocks — Create Better Content with Gutenberg + Ultimate Blocks. Essential Collection of Blocks for Bloggers and Affiliate Marketers.
- WP Coupons and Deals — Make More Money from Your Affiliate Coupons and Deals.
Visit WPLeaders to learn more about WordPress, WordPress themes and plugins.
Блоки
Этот плагин предоставляет 1 блок.
- Current Date
Установка
Это один из способов установить плагин:
- Загрузите плагин из репозитория плагинов WordPress и загрузите ZIP-файл в «Добавить Новый» в разделе «Плагины».
- Активируйте плагин.
По-другому :
- Из панели инструментов WordPress перейдите в раздел Добавить Новый в разделе Плагинов.
- Поиск «Shortcode for Current Date»
- В результатах поиска нажмите «Shortcode for Current Date».
- Нажмите на кнопку Установить и активируйте плагин.
Отзывы
Участники и разработчики
«Шорткод для текущей даты» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:
УчастникиПеревести «Шорткод для текущей даты» на ваш язык.
Заинтересованы в разработке?
Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.
Журнал изменений
2.2.0
- WordPress 6.3 compatible.
2.1.9
- WordPress 6.2 compatible.
2.1.8
- WordPress 6.1 compatible.
2.1.7
- Security updates.
2.1.5
- Security issue fix.
2.1.4
- FIX: Style.css not found issue.
2.1.3
- FIX: Dependency missing issue.
- FIX: Error when Gutenberg is not available.
- FIX: Deprecated PHP notice.
2.1.2
- ADD: Gutenberg Block for Adding Current Date.
2.1.1
- FIX: Preserving old shortcode output.
2.1.0
- ADD: Option to Control Font Size.
- ADD: Option to Control Font Color.
- ADD: CSS Class to Control Style Globally.
2.0.8
- Tested with WordPress 5.4.
2.0.7
- Tested with latest WordPress version.
- Removed admin notice about other plugin.
2.0.6
- Tested with WordPress 5.2.
2.0.5
- Tested with WordPress 5.1.
2.0.4
- Tested with WordPress 5.0.3.
- Updated some links.
2.0.3
- Used date_i18n() function to make the date translated according to site settings. Thanks to @themezee
2.0.1
- Протестировано с WordPress 5.0.
- Изменение настроек и страницы приветствия.
2.0.0
- Протестировано с WordPress 5.0.
1.2.5
- Исправлено — день номер ошибки года.
1.2.4
- Добавить — выполнение шорткода в заголовке сообщения .
1.2.3
- Исправлена ошибка.
- Добавлена функция WP current_time вместо функции date для получения времени WP вместо времени сервера. Спасибо Рику Картеру.
1.2.2
- Протестировано с WordPress 4.9
1.2.1
- Исправлена ошибка.
1.2
- Добавлен пункт меню для быстрого доступа к форматам даты.
1.1
- Добавлена страница приветствия.
1.0
- Первый выпуск