Created
December 26, 2013 11:48
-
-
Save argnist/8132776 to your computer and use it in GitHub Desktop.
printPlaceholders snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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