IWidget
in
Widget interface for extensible shortcode/widget system.
Implement this interface to create custom widgets that can be used as shortcodes in page content.
Table of Contents
Methods
- getAttributes() : array<string|int, mixed>
- Get supported attributes
- getDescription() : string
- Get widget description (for documentation)
- getName() : string
- Get the widget shortcode name
- render() : string
- Render the widget
Methods
getAttributes()
Get supported attributes
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed> —Array of [attribute => description]
getDescription()
Get widget description (for documentation)
public
getDescription() : string
Return values
string —Widget description
getName()
Get the widget shortcode name
public
getName() : string
Return values
string —Shortcode name (e.g., 'property-listings')
render()
Render the widget
public
render(array<string|int, mixed> $attrs) : string
Parameters
- $attrs : array<string|int, mixed>
-
Shortcode attributes
Return values
string —Rendered HTML