WireTextTools::findPlaceholders() method

Find and return all {placeholder} tags found in given string

Available since version 3.0.126.

Usage

// basic usage
$array = $wireTextTools->findPlaceholders(string $str);

// usage with all arguments
$array = $wireTextTools->findPlaceholders(string $str, array $options = []);

Arguments

NameType(s)Description
strstring

String that might contain field {tags}

options (optional)array
  • has (bool): Specify true to only return true or false if it has tags (default=false).
    • tagOpen (string): The required opening tag character(s), default is '{'
  • tagClose (string): The required closing tag character(s), default is '}'

Return value

array bool


WireTextTools methods and properties

API reference based on ProcessWire core version 3.0.156

Twitter updates

  • ProcessWire 3.0.158 core updates — More
    29 May 2020
  • ProcessWire 3.0.157 core updates— More
    23 May 2020
  • ProcessWire 3.0.156 core updates— More
    15 May 2020

Latest news

  • ProcessWire Weekly #316
    In the 316th issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a couple of new third party modules, and check out the website of a very interesting German online event. Read on!
    Weekly.pw / 30 May 2020
  • ProcessWire 3.0.154 and 3.0.155 core updates
    This post covers a few of the bigger updates in ProcessWire 3.0.154 and 3.0.155 on the dev branch. This includes a new function for live replacement of text in core and modules, a new method for creating canonical URLs, and some major upgrades to our $input->urlSegment() method that I think you’ll like!
    Blog / 24 April 2020
  • Subscribe to weekly ProcessWire news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH