You are here

shortcode_basic_tags.module in Shortcode 2.0.x

Register hooks for ShortCodes that use Twig templates.

File

shortcode_basic_tags/shortcode_basic_tags.module
View source
<?php

/**
 * @file
 * Register hooks for ShortCodes that use Twig templates.
 */

/**
 * Implements hook_theme().
 */
function shortcode_basic_tags_theme() {
  return [
    // Quote.
    'shortcode_quote' => [
      'variables' => [
        'author' => NULL,
        'class' => NULL,
        'text' => '',
      ],
    ],
    // Image.
    'shortcode_img' => [
      'variables' => [
        'src' => NULL,
        'alt' => NULL,
        'class' => '',
      ],
    ],
    // Button.
    'shortcode_button' => [
      'variables' => [
        'url' => NULL,
        'attributes' => [],
        'text' => '',
      ],
    ],
    // Dropcap.
    'shortcode_dropcap' => [
      'variables' => [
        'class' => NULL,
        'text' => '',
      ],
    ],
    // Item.
    'shortcode_item' => [
      'variables' => [
        'type' => 'div',
        'attributes' => [],
        'text' => '',
      ],
    ],
    // Clear.
    'shortcode_clear' => [
      'variables' => [
        'type' => 'div',
        'attributes' => [],
        'text' => '',
      ],
    ],
    // Link.
    'shortcode_link' => [
      'variables' => [
        'url' => NULL,
        'attributes' => [],
        'text' => '',
      ],
    ],
  ];
}

Functions

Namesort descending Description
shortcode_basic_tags_theme Implements hook_theme().