You are here

function shortcode_list_all in Shortcode 6

Same name and namespace in other branches
  1. 7.2 shortcode.module \shortcode_list_all()
  2. 7 shortcode.module \shortcode_list_all()

Build a list of all shortcodes (for filter). Calls the shortcode hook with the list parameter on all module

From filter.module

2 calls to shortcode_list_all()
_shortcode_process in ./shortcode.module
Process the shortcodes according to the text and the text format.
_shortcode_settings_form in ./shortcode.module
Base form elements of the all shortcode options

File

./shortcode.module, line 20

Code

function shortcode_list_all() {
  $shortcodes = array();
  foreach (module_list() as $module) {
    $list = module_invoke($module, 'shortcodes', 'list');
    if (isset($list) && is_array($list)) {
      foreach ($list as $name => $descr) {
        $shortcodes[$name] = (object) array(
          'module' => $module,
          'descr' => $descr,
        );
      }
    }
  }
  return $shortcodes;
}