function getPostValue() { if (func_num_args() == 0) { return array('description' => t('Get POST value'), 'customonclick' => ExtendedContentParseInput::getTextInput(t('Insert post key name below'))); } return isset($_POST[func_get_arg(0)]) ? htmlentities($_POST[func_get_arg(0)], ENT_QUOTES) : ''; }
function getEvalPhpCode() { if (func_num_args() == 0) { return array('description' => t('Insert php code'), 'customonclick' => ExtendedContentParseInput::getTextInput(t('Insert php code below (without starting and ending tags, even if you can use them to put plain text)'))); } return eval(func_get_arg(0)); }
function getPageCustomAttribute() { if (func_num_args() == 0) { return array('description' => t('Page custom text attribute'), 'customonclick' => ExtendedContentParseInput::getTextInput(t('Insert attribute handle below'))); } $page = Page::getCurrentPage(); return $page->getCollectionAttributeValue(func_get_arg(0)); }
function getUserCustomAttribute() { if (func_num_args() == 0) { return array('description' => t('User custom text attribute'), 'customonclick' => ExtendedContentParseInput::getTextInput(t('Insert attribute handle below'))); } Loader::model('user'); $u = new User(); if (empty($u->uID)) { return; } $ui = UserInfo::getByID($u->uID); return $ui->getAttribute(func_get_arg(0)); }