Skip to content

Instantly share code, notes, and snippets.

@OlegShchavelev
Created November 12, 2019 23:29
Show Gist options
  • Save OlegShchavelev/dd45c173ad8e7fe434519dba5c532fa5 to your computer and use it in GitHub Desktop.
Save OlegShchavelev/dd45c173ad8e7fe434519dba5c532fa5 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