WP Manifestindependent plugin directory
manifest / developer / mihdan-clockwork

Mihdan: Clockwork

Отладка WordPress при помощи Clockwork

★ 19stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/mihdan/mihdan-clockwork/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Отладка WordPress при помощи Clockwork

Как использовать

  1. Ставите расширение Clockwork под Chrome или Firefox.
  2. Клонируете репозиторий в папку /wp-content/plugins/
  3. Устанавливаете зависимости composer install
  4. Активируете плагин Mihdan: Clockwork
  5. Открываете в панели Dev-Tools вкладку Clockwork
  6. В вашей теме/плагине пишем do_action( 'mc_notice', 'Усё пропало, шеф!', array( 1, 2 ) )
  7. Результат наблюдаем в консоли браузера

Типы оповещений

do_action( 'mc_emergency', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_alert', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_critical', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_error', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_warning', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_notice', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_info', 'Усё пропало, шеф!', array( 1, 2 ) )
do_action( 'mc_debug', 'Усё пропало, шеф!', array( 1, 2 ) )