Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

Woody code snippets — Insert Header Footer Code, AdSense Ads

Описание

Need professional support?

Get starting FREE support
Get starting PREMIUM support

  • Забудьте о повторном копировании одного и того же содержимого!
  • Хватит добавлять PHP код в файл functions.php WordPress!
  • Хватит добавлять Google Analytics, Яндекс.Метрику и внешний код в header и footer PHP файлов!
  • Не тратьте время на изменение 100 страниц повторяющегося контента!

Woody Code Snippets will make your life so much easier. The plugin helps to create and store code snippets or duplicated text in a special library at the admin bar of your website. Use the shortcode to add a snippet anywhere on your website. Or do it automatically, for example: head, footer and post injections. You can show or hide code snippets using conditional logic.

Зачем вам нужен этот плагин?

  • Добавляйте header и footer
  • Вы можете подключить Google AdSense, разместить Яндекс. Директ, Media.net и контекстную рекламу Amazon Native Shopping.
  • Insert Google Analytic Tracking code, Yandex Metrika Tracking Code, Yandex Counter to Header, Footer.
  • Добавляйте сниппеты PHP кода и выполняйте их на сайте. Регистрируйте РНР функции, классы, глобальные переменные в любом месте.
  • Вы можете добавить виджеты соцсетей и внешних ресурсов.
  • Вам доступна вставка кода в WordPress: пиксели Facebook, VK, конверсии Google, скрипты Facebook и теги og:image в Facebook.
  • Показать или скрыть сниппеты кода по условной логике.
  • Вы можете сохранять шаблоны записей, конструкторы страниц, цитаты и галереи для повторного использования на сайте.
  • Roll back changes with Code Revisions (Premium)
  • Cloud storage for snippets (Premium)
  • Synchronize snippets between your sites using the cloud (Coming soon)
  • Ready-made snippets in our cloud that will help you solve some of your cases (Premium)

Need premium features?

Get Premium version

Как это работает?

Пример №1

Вы можете создать новый JavaScript сниппет и добавить код, который нужно разместить на сайте. HTML редактор сниппета подсвечивает ошибки в синтаксисе и показывает подсказки. Вам нужно только определить место, куда добавить код. Например, можете разместить код в header, footer или на всех страницах. Если добавить Google Analytics WordPress или подключить Яндекс Метрику, то сниппет будет отлично с ними работать. Создайте дополнительное условие: не показывать этот код администратору. Так вы обезопасите сайт от попыток подбора ролей пользователей.

Пример №2

Вы можете создать текстовый сниппет и добавить повторяющийся текст или шаблон. Вы можете добавить шорткод формы обратной связи, если она универсальна для всех страниц сайта. Теперь вы можете задавать условия для показа содержимого только зарегистрированным пользователям. Сохраните текстовый сниппет и продолжайте редактировать HTML страниц. При использовании редактора Gutenberg выберите специальный блок. В Classic Editor нажмите на иконку плагина и добавьте шорткод нового спиппета.
Как вы видите, работать со сниппетами — очень просто!

Список всех функций плагина:

  • Управление кодом footer/header
  • Удобный и понятный редактор кода с подсветкой синтаксиса.
  • Создать текстовую рекламу с графикой в классическом редакторе TinyMCE.
  • Используйте шорткоды для размещения сниппета в любом месте сайта.
  • Используйте специальные блоки для добавления сниппета в Gutenberg.
  • Вы можете передавать содержимое и дополнительные атрибуты в сниппет через шорткоды или специальные блоки (редактор Gutenberg).
  • Размещайте сниппеты записей на всех страницах.
  • Обработчик PHP: запускайте PHP код везде или только для определенного шорткода.
  • Используйте JavaScript, CSS и HTML для создания сниппетов кода.
  • Неограниченное количество сниппетов кода.
  • Использовать шорткоды других плагинов.
  • Показать или скрыть сниппеты кода по условной логике.
  • Экспорт/импорт сниппетов кода.

Где можно автоматически размещать сниппет на сайте?

Весь сайт:

Вставка HTML для header и footer на всех страницах:

  • Добавить header — код сниппета добавляется в исходный код header перед тегом </head> .
  • Добавить footer — код сниппета добавляется в исходный код footer перед тегом </body>.

Вставка PHP в записи, страницы, произвольные записи:

  • Добавьте рекламу перед записью — сниппет записи добавляет в исходных код перед тегом </head> .
  • Добавьте рекламу перед содержимым — сниппет страницы добавляется перед содержимым записи/страницы.
  • Добавьте рекламу перед абзацем — сниппет записи добавляется перед определенным абзацем. Количество абзацев задается в поле Location number.
  • Добавляйте рекламу после абзаца — сниппет записи добавляется после определенного абзаца. Количество абзацев задается в поле Location number.
  • Добавьте рекламу после содержимого — сниппет страницы добавляется после содержимого записи/страницы.
  • Добавляйте рекламу после записи — сниппет добавляется после записи/страницы.

Добавляйте в категории, архивы, теги, таксономии:

  • Добавьте AdSense перед анонсом — сниппет добавляется перед анонсом записи/страницы.
  • Добавьте AdSense после анонса — сниппет добавляется после анонса записи/страницы.
  • Добавьте AdSense между записями — сниппет добавляется между записями.
  • Добавляйте AdSense перед записью — сниппет добавляется перед определенной записью. Количество записей задается в поле Location number.
  • Добавляйте AdSense после записи — сниппет добавляется после определенной записи. Количество записей задается в поле Location number.

Insert to Woocommerce pages: (Premium)

  • Before the list of products — Snippet will be placed before the list of products.
  • After the list of products — Snippet will be placed after the list of products.
  • Before a single product — Snippet will be placed before a single product
  • After a single product — Snippet will be placed after a single product
  • Before a single product summary — Snippet will be placed before a single product summary
  • After a single product summary — Snippet will be placed after a single product summary
  • After a product title — Snippet will be placed after a product title
  • After a product price — Snippet will be placed after a product price
  • After a product excerpt — Snippet will be placed after a product excerpt

  • Добавляйте AdSense после записи — сниппет добавляется после определенной записи. Количество записей задается в поле Location number.

Какие опции условной логики для показа сниппета?

User:
— Role
— Registration Date
— Cookie Name
— Current Page
— Current Referrer
Location:
— Post Type
— Taxonomy page
— Taxonomy of the page
— Page
Technology (Premium):
— AddBlocker
— Browser
— Use cookie
— Use JavaScript
— Operation system
— Device type
Auditory (Premium):
— User country (Use Webnet77 or MaxMind geo ip base)
— Viewing depth
— Attendance by time of day
— Total number of visits

Рекомендуем плагины

НУЖНА ПОДДЕРЖКА? ОБРАЩАЙТЕСЬ

Мы предоставляем бесплатную поддержку этого плагина. При возникновении проблем, создайте запрос на поддержку. Мы вам поможем!

  1. Получить бесплатную поддержку
  2. Documentation

We are very need for your help with translating Woody Code Snippets plugin into your native language. We want to make it international and understandable for everyone. Please contact us via email inside the plugin, or create a topic on our support forum if you can help with the translations. In exchange for your help, we will give you better support and our premium plugins absolutely free!

Setting options

  • Keep the HTML entities, don’t convert to its character — If you want to use an HTML entity in your code (for example > or «), but the editor keeps on changing them to its equivalent character (> and » for the previous example), then you might want to enable this option.
  • Execute shortcodes in snippets — Execute shortcodes in the snippet code before executing the snippet.
  • Complete Uninstall — When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
  • Support old shortcodes [insert_php] — If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.

Code Editor

  • Code style — The optional feature. You can customize the code style in the snippet editor. The «Default» style is applied by default.
  • Indent With Tabs — The optional feature. Whether, when indenting, the first N*tabSize spaces should be replaced by N tabs. The default is false.
  • Tab Size — The optional feature. Pressing Tab in the code editor increases left indent to N spaces. N is a number pre-defined by you.
  • Indent Unit — The optional feature. The indent for code lines (units). Example: select a snippet, press Tab. The left indent in the selected code increases to N spaces. N is a number pre-defined by you.
  • Wrap Lines — The optional feature. If ON, the editor will wrap long lines. Otherwise, it will create a horizontal scroll.
  • Line Numbers — The optional feature. If ON, all lines in the editor will be numbered.
  • Auto Close Brackets — The optional feature. If ON, the editor will automatically close opened quotes or brackets. Sometimes, it speeds up coding.
  • Highlight Selection Matches — The optional feature. If ON, it searches for matches for the selected variable/function name. Highlight matches with green. Improves readability.

Geolocation

IP geolocation database (Webnet77 or MaxMind) — Select IP geolocation database

Use this plugin with care!

ATTENTION! Check your php scripts before inserting on your site. If you don’t understand how the php script you are using works, try to avoid using it. Using unverified or outdated php scripts can damage the security of your site! Using the plugin on multisites can be dangerous as it will allow all administrators to insert php, js code. If you cannot control the work of administrators, we recommend that you do not use this plugin for security reasons. We are constantly working to improve the security of the plugin, but unfortunately we cannot check the code scripts you use that may violate the security of your site!

История, разработчики и авторы

If you are a long-term user, you may be confused about the new plugin update. You’ve been using an old plugin – Insert php 1.3.0, and now got an extended product – Woody Code Snippets. Insert php was the first plugin version to work with PHP code. It was created by Will Bontrager Software, LLC. In 2018, the Webcraftic studio started to actively develop the plugin. We’ve created a roadmap and released several powerful updates that help you to use PHP code more comfortable and secure. Now plugin supports not only PHP but other snippet types as well. We’ve decided to rename the plugin as Woody Code Snippets. This name is more suitable for new and powerful plugin features.

Подробную информацию о плагине Insert PHP см. здесь:
http://www.willmaster.com/software/WPplugins/go/iphphome_iphplugin

Скриншоты

  • Список сниппетов
  • Изменение PHP сниппета
  • Code revisions
  • Установка автоматического размещения сниппетов
  • Плагин для размещения рекламы WordPress пользуется условной логикой для отображения сниппета
  • Специальный сниппет в редактор кода WordPress - Gutenberg
  • Плагин сниппетов добавляет PHP шорткоды в текстовый виджет
  • Custom shortcode name

Блоки

Этот плагин предоставляет 1 блок.

  • Woody snippets

Установка

  1. Загрузите файлы плагина в папку /wp-content/plugins/plugin-name, либо установите его из меню «Плагины» в WordPress.
  2. Активируйте плагин из меню «Плагины» в WordPress
  3. Пользуйтесь PHP сниппетами -> Добавить сниппет для создания нового

Часто задаваемые вопросы

Как передать атрибуты в сниппет через шорткод?

Add a new attribute “simple” to the shortcode [wbcr_php_snippet id=”xx” simple=”example”].
The attribute “simple” is available in the snippet as the $simple variable. The attribute name can contain Latin letters and lowercase digits. You can also use underscore.

Код сниппета выполнился с ошибкой, и я не могу его изменить. Что делать?

Не расстраивайтесь! Даже опытные специалисты допускают ошибки. Для этих целей мы создали безопасный режим. Перейдите в него, и код ваших сниппетов выполняться не будет.

  1. Перейдите в безопасный режим по ссылке http://your-site-name.dev/wp-admin/?wbcr-php-snippets-safe-mode
  2. Измените сниппет с ошибками;
  3. Покиньте безопасный режим по ссылке: http://your-site-name.dev/wp-admin/?wbcr-php-snippets-disable-safe-mode

Отлично! Теперь не должно быть никаких проблем!

Как передать содержимое страницы в сниппет?

Довольно часто мы хотим скрыть часть текста или форму на странице и задать условия отображения. Оберните содержимое, которые вы передаете в сниппет, в шорткоды [wbcr_php_snippet id=”xx” simple=”example”]page content[/wbcr_php_snippet]. Содержимое страницы в сниппете находится внутри переменной $content.

Поддерживает ли плагин редактор Gutenberg?

Да, конечно. Вы можете добавить специальные блоки из плагина.

Я пользовался старым плагином Insert php 1.3.0. К чему готовиться в версии 2.х.х?

The old version of Insert php 1.3.0 worked this way: you wrapped PHP code with shortcodes [insert_php]php code[/insert_php]. Starting from version 2.x.x and higher, you need to create special snippets to place PHP code. Use a snippet shortcode [wbcr_php_snippetid=”xx”] instead of shortcodes [insert_php][/insert_php] to execute PHP code on pages.
We recommend you to move all your code from the post editor to snippets.
Important! TinyMCE converts double quotes to special characters. So if you place this code on the snippet editor, it may not work. To avoid this problem, replace all special symbols of double quotes in your PHP code with classic double quotes.

Как долго вы планируете поддерживать старую версию 1.3.0?

60% users have already downloaded 2.x.x version. We are trying to reach the number of 80%. The deadline for support is scheduled for March 1, 2019.
You can download the old plugin version from here.

Мне не нравится новая версия. Как можно вернуться к 1.3.0 и не устанавливать обновления?

First of all, please, take some time to actually go through the new version. Usually, it takes a week to see how useful this version may be for you. If you’ve faced any problems or found some bugs, feel free to contact us at our support forum.
You can always download the old version (1.3.0) from here.
To avoid getting updates, open the PHP file wp-content/plugins/insert-php/insert_php.php and change the plugin version to 9.9.9.

Есть ли документация по плагину?

You can find the detailed documentation in here.

Совместим ли плагин с GDPR?

Да, плагин полностью совместим с GDPR.

Можно ли полностью удалить плагин?

Go to the settings page and enable the «Complete uninstall» option. Than, when you delete Woody Code Snippets using the ‘Plugins’ menu in WordPress it will clean up the database table and a few other bits of data. Be careful not to remove Woody Code Snippets by deleting it from the Plugins menu unless you want this to happen.

Как удалить плагин через FTP клиента?

You have to delete the folder with the plugin, which is located here: wp-content/plugins/insert-php
This will not clear the plugin data from the database. You have to remove the plugin through the admin panel with the «Full Uninstall» option enabled in order to completely clear the plugin data.

Потеряются ли сниппеты, если обновить WordPress или редактировать функции темы?

Нет, сниппеты хранятся в базе данных WordPress, не зависят от темы и не затрагиваются обновлениями WordPress.

Работает ли плагин с мультисайтами?

The plugin doesn’t support multi-sites.
We will definitely add multisite support in the future. You can speed up this process by leaving a request on our support forum.

Отзывы

17.03.2024
Unfortunately, the plugin produces multiple errors in debug mode on WordPress version 6.4.3. which is currently the last one. I really hope for corrections. Thank you!
26.05.2023
Few days back I realized that HTML tags stopped working on Free version. <BR> tag written inside double quotes in echo syntax were converting into new line. I realized that the new free version corrupted my entire website as I was using woody code snippet in all my pages. To recover this damage I purchased Woody code snippet "Basic" lifetime plan (Premium 2022) on 22nd May 2023. This is blunder than free version. Now when I make changes in PHP snippets, it is not saving. I can see the update button but not publish. I raised this with my premium login but no answer after 3 working days. Wrote so many emails. Kindly resolve my issue otherwise return my money Amount Received:$79.00 USD Payment ID:914828 Customer ID:7040342 Plugin:Woody ad snippets Plugin ID:3465 Plan:Premium 2022 Plan ID:17580
24.10.2021
I'm so glad I found this plugin. I've been using and ad-manager for years. I just deleted my ad-manager, because I can do the same AND MUCH MORE using this plugin. I use Woody code snippets now for all my ads, tracking codes and repeated text. It's all in one place and it helps keeping my site organized. The plugin basically uses the same style we're already used to when writing posts or pages (I still use the classic editor). Title, tags, delete, filters, trash, visual/text editor, bulk actions; it's all there. Feature request: multi-author ads (guest writer, revenue share). It would be great if a guest writer could ad his own AdSense Publisher-ID somewhere so that when a post is viewed by someone, ads with that author's publisher ID is shown to the viewer. I've seen this feature in the past in other scripts. As far as I know, this is not against the AdSense TOS. Thanks for this great plugin!
17.10.2021
The free version did everything I needed, but I bought it anyway. Guys, seriously - a universal snippet that allows PHP and JQuery code IN THE SAME SHORTCODE! You outdid yourselves. Many WP users don't know that they can insert some simple JQuery to make a small change on a site in 10 seconds. This plugin makes up for the shortcomings of a thousand other plugins. The "ONLY RUN IF USER ROLE =" IS AMAZING!!! The only other options I know of are manually checking user role with wp PHP functions, bloated, time consuming, etc, or writing a plugin/filter. CRAZY. I have no words. How developers that are this rational and prudent ended up on WordPress, land of nightmare code is beyond me. and their free version is amazing. Like I said, I only bought it b/c I love them.
Посмотреть все 206 отзывов

Участники и разработчики

«Woody code snippets — Insert Header Footer Code, AdSense Ads» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«Woody code snippets — Insert Header Footer Code, AdSense Ads» переведён на 2 языка. Благодарим переводчиков за их работу.

Перевести «Woody code snippets — Insert Header Footer Code, AdSense Ads» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

2.4.10

  • Minor fixes
  • New API for Snippets Library

2.4.9

  • WP 6.2 compatibility

2.4.8

  • Fixed: Reset priority when saving snippet

2.4.7

  • Fixed: Some bugs and issues

2.4.6 (31.05.2022)

  • Fixed: Compatibility with WordPress 6.0
  • Fixed: Some bugs and issues

2.4.4 (23.03.2022)

  • Fixed: Compatibility with WordPress 5.9
  • Added: Compatibility with premium plugin

2.4.4 (23.03.2022)

  • Allow post editors to use snippet shortcodes
  • Fixed a bug in TinyMCE

2.4.3

  • Updated plugin framework
  • Added warning notice that using the plugin may be dangerous
  • Added additional security measures for multisites

2.4.2

  • Fix: Snippets library not load
  • Turn off redirect after activate

2.4.1

  • Fix: Snippets not working after updating to version 2.4.0, if Woocommerce is activated

2.4.0

  • Add: Insertion locations for Woocommerce (PRO)
  • Add: Snippet conditional execution logic for Woocommerce
  • Tweak: Improved performance
  • Up the minimum version of PHP -> 7.0

2.3.10

  • Fixed: Hot fix

2.3.9

  • Fixed: jQuery.fn.load() and other bugs after update to WordPress 5.5

2.3.8

  • Added: «Execute shortcodes in snippets» option in plugin settings. OFF by default!

2.3.7

  • FIX: WPML compatibility

2.3.6

  • Add WPML compatibility
  • Fix snippet switch

2.3.5

  • Fixed «Warning: filter_var()». The attributes of the snippets work

2.3.2

  • Fixed: compatibility with PHP 7.4.
  • Added: JS snippets support attributes
  • Added: Filter by type of the snippet.
  • Added: Priority of snippets execution.
  • Added: Sorting by priority.
  • Added: Sorting by name.
  • Added: New Advertisement snippet type.
  • Added: Conditional logic for current page taxonomies

2.3.1 (26.11.2019)

  • Fixed: Bug with images on the about page.

2.3.0 (19.11.2019)

  • Fixed: Minor bugs
  • Fixed: Import/Export. When user selected some files and clicked to submit, he could be get error «No files selected!»
  • Added: Video preview for every snippets in the library.

2.2.9 (16.09.2019)

  • Fixed: Due to a problem with WPML, we were forced to cancel the added WPML compatibility in the previous version.
  • Fixed: Security issue

2.2.8 (13.09.2019)

  • Added: Compatibility with WPML proposed in the support forum
  • Fixed: Security issue
  • Fixed: Some users saw the code in the plugin description column. This could lead to JavaScript execution, which led to problems using the plugin Issue #1, Issue #2.
  • Fixed: Conditional logic for taxonomies worked only inside singular posts. In taxonomies, tags, and categories, this did not work Issue #3

2.2.7

  • Fixed: Critical php errors

2.2.6

  • Fixed: Some issues with plugin security.
  • Fixed: After save JS snippets, the html tags in javascript code were cut out in compiled code.
  • Fixed: Minor bugs

2.2.5

  • Fixed: Some issues with plugin security.
  • Fixed: When you save the php snippet (running everywhere), there is a conflict with himself.
  • Fixed: A notification to install the premium version did not hidden, even if the premium plugin was installed.
  • Fixed: Removed spaces in beginning and end of the universal snippets. Please make fix your snippets if you have missing spaces at the beginning and end of the universal snippet.

2.2.4

  • Fixed: Php error (Cannot declare class Post)
  • Fixed: Some hooks did not work, when using php snippet with space to run everywhere.
  • Fixed: Slashes removed in css snippet: \f058 becomes f058

2.2.2

  • Fixed: Disabled wpautop for snippets
  • Fixed: Added compatibility with plugin Robin image optimizer

2.2.1

  • Warning: Support for the old shortcodes ([insert_php]) has been discontinued for new users. Users who have upgraded from version 1.3.0 still have support [insert_php].
  • Fixed: Removed warnings about support for old shortcodes for new users.
  • Fixed: Сkeditor editor over the code editor, the issue is related to The Rex theme
  • Fixed: Warning Invalid argument supplied for foreach(). (It’s the warning in plugin insert-php (method getMetaOption) because get_post_meta could return non-array value if $single is true.)
  • Fixed: Some users lost the code editor
  • Fixed: Infinite redirect after updating or installing a plugin
  • Fixed: Infinite redirect on multisites
  • Added: New snippet type: Html. Perfect for you if you do not use php code.
  • Added: New snippet type: JavaScript
  • Added: New snippet type: Css
  • Added: JS and CSS snippets can be asset as external files
  • Added: Compatible with WordPress 5.2
  • Added: Multisite support
  • Added: Premium plugin support added
  • Added: Added setting: «Complete Uninstall». When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.- Added: Added setting: «Complete Uninstall». When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
  • Added: Added setting: «Support old shortcodes [insert_php]». If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.
  • Added: Added setting: «Keep the HTML entities, don’t convert to its character». If you want to use an HTML entity in your code (for example > or «), but the editor keeps on changing them to its equivalent character (> and » for the previous example), then you might want to enable this option.

2.1.91

  • Исправлено: некоторых пользователей постоянно перенаправляло на страницу About
  • Исправлено: не работал безопасный режим, поскольку мог запускаться только после сниппета
  • Добавлено: php lint в редакторе кода
  • Добавлено: хук wbcr/factory/bootstrap/cache_enable для отключения кэширования функционала Woody. Функция полезна пользователям с CDN.

2.1.9

  • Исправлено: демо-сниппеты создавались несколько раз, что причиняло неудобства
  • Исправлено: не получалось скрыть метабокс с рекламой
  • Исправлено: некоторых пользователей постоянно перенаправляло на страницу About

2.1.7

  • Исправлено: небольшие ошибки в мультисайтах

2.1.6

  • Исправлено: не работали шорткоды в плагине No Cache Ajax Widget
  • Исправлено: при создании блока в Gutenberg не сохранялась выбранная опция в выпадающем списке
  • Исправлено: не показывалось меню в мультисайтах
  • Исправлено: баг с PHP функцией import_upload_size_limit в мультисайтах

2.1.5

  • Исправлено: не менялся стиль темы в редакторе кода
  • Исправлено: после обновления плагина удалялось форматирование в редакторе кода
  • Исправлено: безопасный режим не работал для скриптов, работающих с шорткодом [insert_php].

2.1.4

  • Исправлено: конфликт с do_shortcode, когда плагин пытается обработать шорткоды в PHP коде
  • Исправлено: добавлена совместимость с Visual Composer

2.1.3

  • Исправлено: ошибка с escape-кодом HTML в редакторе сниппетов. При добавлении тега textarea, отваливался редактор.

2.1.2

  • Добавлено: 3 новых типа сниппета. Можете пользоваться текстовыми, PHP и универсальными сниппетами.
  • Добавлено: экспорт/импорт сниппетов.
  • Добавлено: Условная логика для текстовых и универсальных плагинов. Можете скрывать/показывать сниппеты, в зависимости от условий.
  • Добавлено: поддержка Gutenberg. Добавлен новый блок для Gutenberg. В нем можно выбирать доступные сниппеты. Еще можно отправлять содержимое из редактора в сниппет.
  • Доработано: поддержка атрибутов, которые посылаются сниппетам через шорткоды. Теперь можно пользоваться атрибутами шорткода для отправки дополнительных значений внутри сниппетов. Можно ограничить количество поддерживаемых атрибутов.
  • Добавлено: поддержка WordPress 5.x.x.
  • Доработано: поддержка редактора кода. Теперь в нем автоматическая подсветка синтаксиса и автодополнение.
  • Добавлено: редактор TinyMCE для текстовых сниппетов.
  • Добавлено: авто-добавление сниппета на весь сайт. Вы можете автоматически размещать код в header или footer всех страниц. Либо можете добавлять код во все записи (подробнее — в документации).
  • Добавлено: создание демо-сниппета при установке плагина.
  • Добавлено: специальная опция для удаления плагина. При активации все сниппеты и данные плагина также удаляются.
  • Исправлено: ошибка в значения, отправляемых через атрибуты шорткода.
  • Исправлено: ошибка в визуальном представлении блока в Gutenberg.
  • Исправлено: счетчик сниппета для тегов.
  • Изменено: название плагина.
  • Изменено: иконки плагина.
  • Изменено: описание плагина.

2.0.6

  • Изменена процедура безопасного сохранения сниппетов. Теперь при возникновении ошибки вы не потеряете изменения в сниппетах. Более того, теперь не требуется проверка сниппетов для шорткодов, из-за которой многие пользователи не могли сохранить старый код.
  • Значения переменных вы можете получить из атрибутов шорткода. Например, если атрибутом шорткода [wbcr_php_snippet id=»2864″ my_type=»button»] вы ставите my_type attribute, то значение my_type attribute вы можете получить в сниппете через переменную $my_type var.
  • Добавлена опция для установки тегов в сниппетах
  • Добавлена инструкция по экспорту и импорту сниппетов
  • Исправлены некоторые ошибки.

2.0.4

  • Исправлена серьезная ошибка с $wp_query. Она вызывала конфликт с другими плагинами, которые перезаписывали глобальную переменную $wp_query.
  • Все автоматически созданные и обновленные сниппеты теперь активированы.

2.0.2

Исправлена ошибка, при которой не хватало разрешений для просмотра страницы.

2.0.1

Внимание! Это версия 2.0. В ней можно добавлять PHP код через сниппеты. По сравнению с использованию шорткодов [insert_php] code execute [/ insert_php], это более удобный и безопасный способ работы с PHP кодом. Для расширенной совместимости мы сохранили поддержку шорткодов [insert_php], но в следующих версиях плагина она будет удалена.

Мы настоятельно рекомендуем перенести весь PHP код в сниппеты и вызывать их в записях/страницах/виджетах через шорткоды [wbcr_php_snippet id = «000»].

1.3

Исправлена проблема с str_replace(), когда в стеке содержался символ «/».

1.2

Изменена обработка содержимого.

1.1

Исправлена ошибка. Во избежание конфликтов с пользовательским PHP кодом, добавлен ob_end_flush(); и изменены названия переменных.

1.0

Первая открытая версия.