示例#1
0
?>
      <label class="grid-group">
        <span class="grid span-1 form-label"><?php 
echo $speak->description;
?>
</span>
        <span class="grid span-5">
        <?php 
echo Form::textarea('description', Guardian::wayback('description', $default->description), Config::speak('manager.placeholder_description_', strtolower($speak->article)), array('class' => 'textarea-block'));
?>
        </span>
      </label>
      <?php 
$tags = array();
$tags_wayback = ',' . implode(',', Guardian::wayback('kind', Mecha::A($default->kind))) . ',';
foreach (Get::tags() as $tag) {
    if ($tag && $tag->id !== 0) {
        $tags[] = '<div>' . Form::checkbox('kind[]', $tag->id, strpos($tags_wayback, ',' . $tag->id . ',') !== false, $tag->name) . '</div>';
    }
}
?>
      <?php 
if (count($tags) > 0) {
    ?>
      <div class="grid-group">
        <span class="grid span-1 form-label"><?php 
    echo $speak->tags;
    ?>
</span>
        <div class="grid span-5"><?php 
    echo implode("", $tags);
示例#2
0
 *  GET PAGE/ARTICLE TAG(S)
 * ==========================================================================
 *
 * -- CODE: -----------------------------------------------------------------
 *
 *    foreach(Get::pageTags() as $tag) { ... }
 *    foreach(Get::articleTags() as $tag) { ... }
 *
 * --------------------------------------------------------------------------
 *
 */
Get::plug('pageTags', function ($order = 'ASC', $sorter = 'name') {
    return Get::tags($order, $sorter, 'page');
});
Get::plug('articleTags', function ($order = 'ASC', $sorter = 'name') {
    return Get::tags($order, $sorter, 'article');
});
/**
 * ==========================================================================
 *  RETURN SPECIFIC PAGE/ARTICLE TAG ITEM FILTERED BY ITS AVAILABLE DATA
 * ==========================================================================
 *
 * -- CODE: -----------------------------------------------------------------
 *
 *    $tag = Get::pageTag('lorem-ipsum');
 *    $tag = Get::articleTag('lorem-ipsum');
 *
 * --------------------------------------------------------------------------
 *
 */
Get::plug('pageTag', function ($filter, $output = null, $fallback = false) {