Skip to content

Instantly share code, notes, and snippets.

@CrazyBoy49z
Forked from vgrish/printPlaceholders.php
Created September 17, 2018 17:11
Show Gist options
  • Save CrazyBoy49z/33ffb32f86e5216aae473c17850a8620 to your computer and use it in GitHub Desktop.
Save CrazyBoy49z/33ffb32f86e5216aae473c17850a8620 to your computer and use it in GitHub Desktop.
смотрим плейсходеры на странице
<?php
if (!$modx->user->isAuthenticated('mgr')) return;
$placeholders = $prefix ? array() : $modx->placeholders;
if ($prefix) {
foreach ($modx->placeholders as $key => $ph) {
if (strpos($key, $prefix) === 0) {
$placeholders[$key] = $ph;
}
}
}
return '<pre>' . print_r($placeholders, true) . '</pre>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment