Parameter Data Types is used by CJT Shortcode Block parameters form for validating user inputs and generating Shortcode Parameters Text/String.

The following Data Types are being supported by CJT.

Native/Primitive Data Types

  • boolean: Accept String true/false or numeric 1/0.
  • number: Accepts any numeric value
  • text: Accept String data.
  • raw: Same as the text data type except that when generated as Shrotcode, it won’t wrapped by Quotes.

Structured Data Types — Collection

  • array: Accepts a list/array of any CJT Data Types (Array, Boolean, List, etc..). Generate Shortcode Parameter Text as CJT Array JSON {A ITEM-0, ITEM-1 A}. Passing Javascript array as CJT parameters require use of {A A} instead of Javascript array [ ]. This is important as WordPress Shortcode parser is unable to parse Shortcodes when parameters containing [ or ].
  • structure: Represent Structure Data Type that holds other CJT Data Types. The different between array and structure is that the later one would generate Shortcode Parameters text as JSON Object instead of Array. Array type is discarding all the child parameters names unlike structure data type is preserving the names.