SproutCMS

This is the code documentation for the SproutCMS project

function embedWidget()

Embeds a widget into some text

Usage

string ContentReplace::embedWidget ( string $text , string $pattern , array $widget );

Arguments

  1. string $text
    The text containing the widget embed
  2. string $pattern
    The widget embed to replace
  3. array $widget
    as per lookupWidgets(), has keys and values
           matching the DB fields: 'type' (string), 'settings' (array),
           and 'embed_key' (string)

Return value

  • string
    The text with the rendered widget