Ejemplo n.º 1
0
/**
 * Apply all text replacements in wizard steps
 *
 * @param string $text the wizard step text
 *
 * @return false|string
 */
function wizard_replacements($text)
{
    if (empty($text) || !is_string($text)) {
        return false;
    }
    $text = wizard_replace_profile_fields($text);
    $text = wizard_replace_user_fields($text);
    $text = wizard_replace_exit($text);
    return $text;
}
Ejemplo n.º 2
0
<?php

/**
 * Show one step
 */
$value = elgg_extract('value', $vars);
if (empty($value)) {
    return;
}
$step = (int) elgg_extract('step', $vars);
// $last = (bool) elgg_extract('last', $vars, false);
$attrs = array('data-step' => $step, 'class' => array('wizard-step', "wizard-step-{$step}"));
if ($step !== 0) {
    $attrs['class'][] = 'hidden';
}
echo '<div ' . elgg_format_attributes($attrs) . '>';
// content
$value = wizard_replace_profile_fields($value);
echo '<div class="elgg-output">';
echo autop($value);
echo '</div>';
echo '</div>';