WPeMatico Custom Hooks

Описание

WPeMatico Custom Hooks puts WPeMatico’s developer API on a screen you can actually work in, and it is completely free.

Sooner or later every autoblog needs a rule that no settings page covers: strip a particular block out of the source content, rename images before they are downloaded, skip items that mention a certain word, decide a category from the feed itself, rewrite a title before it is published. WPeMatico fires dozens of hooks for exactly that purpose. This addon lists every one of them for you, each with a description of what it does, the parameters it receives, and a ready made function template.

No FTP. No child theme. No snippet buried in a functions.php that the next theme update will wipe. You write the function in a proper code editor, the plugin validates it before it is ever stored, and it runs on your next campaign.

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

  1. Pick a hook. Each entry tells you what it does, whether it is an action or a filter, and which parameters it receives.
  2. Let the template be written for you. One click drops a correctly formed function into the editor, already carrying the right name, signature and return value for that hook.
  3. Write your code. On save it is parsed on the spot, and if anything is wrong you get the exact line and reason before a single character is stored.
  4. Done. It runs from your next campaign onwards.

The catalogue is not limited to the core. The addon detects which WPeMatico extensions you have active and adds their hooks to the list too, so Professional, Full Content, Polyglot and the rest are covered as well.

Features

  • Over 90 hooks catalogued, from WPeMatico core and its extensions, each explained in plain language.
  • Function templates generated for you, with the correct name, parameters and return value already in place.
  • A real code editor, with PHP syntax highlighting and selectable colour schemes.
  • Validated before saving. Your code is parsed in place and is never stored with a syntax error.
  • Conflict detection, so two hooks can never end up declaring the same function name.
  • Clear reporting. If something cannot run, you are told which hook and why, with a link straight to it.
  • Extension aware. Hooks appear automatically when their extension is active, and the code you wrote for an extension is preserved while it is not.
  • Administrators only. Reaching or saving anything here requires permission to edit plugins or themes.

Требования

Для этого дополнения WPeMatico необходимо установить и активировать базовый плагин WPeMatico.
PHP 7.0 или выше

Скриншоты

Установка

Вы можете либо установить его автоматически из панели администратора WordPress, либо сделать это вручную:

  1. Разархивируйте файл плагина и поместите папку в свою папку плагинов (/wp-content/plugins/).

  2. Активируйте плагин из меню Дополнения WPeMatico.

1) Распакуйте его в папку плагинов WordPress, чтобы продолжить активацию. Сначала вы должны установить WPeMatico.

2) После установки перейдите в меню WPeMatico -> Конфигурация

3) Затем перейдите на вкладку «Хуки», чтобы перейти на главную страницу дополнения

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

Могу ли я использовать это дополнение без плагина WPeMatico?

Нет. Для установки и активации дополнения требуется бесплатная версия WPeMatico.

Отзывы

22.09.2021
Nice backdoor approach on hooks 🙂 However, little documentation (or comments) would be also nice. Great support also!
05.07.2019
After install this plugin, "WPeMatico Add-ons" section crash. (error 500 PHP Timeout) Versions: WPeMatico Custom Hooks: 1.1.2 WPeMatico: 2.3.5 Wordpress: 5.2.2–es_AR NGINX Log: 2019/07/05 18:28:34 [error] 23196#23196: *11048649 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxxxxxxxxx.com, request: "GET /wp-admin/plugins.php?page=wpemaddons HTTP/1.1", upstream: "fastcgi://127.0.0.1:9011", host: "xxxxxxxxxxxxx.com", referrer: "https://xxxxxxxxxxxxx.com/wp-admin/edit.php?post_type=wpematico" PHP Log: [05-Jul-2019 18:20:56] WARNING: [pool xxxxxxxxxxx.com] child 4227, script '/home/public_html/wp-admin/plugins.php' (request: "GET /wp-admin/plugins.php?page=wpemaddons") executing too slow (5.424761 sec), logging Please, can resolve it? Thanks.-
Посмотреть все 2 отзыва

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

«WPeMatico Custom Hooks» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

«WPeMatico Custom Hooks» переведён на 4 языка. Благодарим переводчиков за их работу.

Перевести «WPeMatico Custom Hooks» на ваш язык.

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

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

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

1.3 Aug 22, 2026

A major release. The plugin has been reviewed from top to bottom, modernized and made considerably more robust, so that writing your own PHP against WPeMatico is safe and predictable on any hosting.

  • Instant, local syntax checking. Your code is now parsed in place the moment you save, and any mistake is reported with its exact line and reason. The check no longer needs your server to be able to reach itself over HTTP, so it works reliably on every host, including managed and firewalled ones.
  • Conflict detection while you write. If two hooks would declare a function with the same name, or the name is already taken elsewhere in WordPress, you are told immediately and pointed at the hook that already uses it.
  • Fault tolerant execution. Should any snippet be unable to run, the plugin now reports it in the admin with a clear explanation and a direct link to edit it, while the rest of your hooks keep working normally.
  • Your code stays where you put it. Snippets are now bound to their hook by name, so installing, activating or deactivating WPeMatico extensions never shuffles them. Code written for an extension that is currently inactive is preserved instead of being lost.
  • Smarter function detection. The functions attached to each hook are read from your code itself, so indented, multiple and by-reference declarations are always recognized.
  • Lighter on every page load. Editor assets are now loaded only on the Hooks screen, and the work done on regular requests has been cut down substantially.
  • Reviewed hooks catalogue, verified against the current WPeMatico core and its extensions, including hook names and parameter signatures, so every hook offered behaves exactly as described.
  • Modernized and hardened codebase for current PHP and WordPress versions: stricter capability and input handling on the editor, cleaner translation loading, and no temporary PHP files written to disk.

1.2 Apr 29, 2021

  • Added new filters of WPeMatico and many of its extensions.
  • Fixes codemirror for rich text code.
  • Introducing Filters groups to find them easier.
  • Improved many help tips on filter selection.
  • Bump WordPress version to 5.7.1

1.1.3 Aug 21, 2019

  • Improves the Settings->Hooks screens. Now all is more intuitive.
  • Hide all textareas without codes or filters.
  • Updated all spanish translations.

1.1.2 Oct 19, 2018

  • Added function filter wpematico_addcat_description filter to change the auto category descriptions.
  • Added function filter Add filter wpematico_get_item_images.
  • Fixes function parameter using «$this->».
  • Fixes an issue in action filters.
  • Fixes a warning in area code on use tab for indentation.

1.1.1 Feb 27, 2018

  • Добавлен фильтр wpematico_imagen_src, добавленный в WPeMatico 1.9.1

1.1 Jan 31, 2018

  • Добавлена подсветка кода с помощью библиотеки CodeMirror, включённой в WordPress с версии 4.9.
  • Исправлена ошибка, когда WPeMatico сохраняет изображение из текущей кампании.

1.0.2 Sep 4, 2017

  • Исправлен текстовый домен плагина для wpematico-custom-hooks.
  • Добавлены настройки и вспомогательные ссылки в строке плагина.
  • Добавлен в репозиторий WordPress.

1.0.1 Aug 27, 2017

  • Доработано: JavaScript и стили загружаются только на странице настроек плагина.
  • Доработано: ограниченные сохранение и проверка синтаксиса кода только для ролей пользователей с возможностями edit_plugins или edit_themes.
  • Доработано: сделана дезинфикация и удалены поля формы и переменных для печати или сохранения.
  • Доработаны JavaScript и стили, написанные на php, теперь они имеют свои собственные файлы .js и .css.
  • Исправлены хуки, которые не выполнялись при запуске кампании вручную в WPeMatico.
  • Исправление проверки синтаксических ошибок, чтобы избежать выполнения кода в процессе.
  • Исправления, чтобы избежать прямого доступа к файлам.
  • Удалены неиспользованные комментарии и примеры.

1.0

  • Начальная версия