RelatedByTopicShortcode
in package
Table of Contents
Constants
- TAG = 'webviep_related'
Methods
- register() : void
- Register shortcode.
- render() : string
- Render related content by topic.
- resolvePostTypes() : array<string|int, mixed>
- Resolve Post Types.
Constants
TAG
private
mixed
TAG
= 'webviep_related'
Methods
register()
Register shortcode.
public
register() : void
render()
Render related content by topic.
public
render([array<string|int, mixed> $atts = [] ]) : string
Attributes:
- headline: Title above the list.
- limit: Maximum results.
- post_types: current | booth | booth_item | booth,booth_item
- hide_empty: true|false – output nothing when no related posts exist.
Parameters
- $atts : array<string|int, mixed> = []
-
Shortcode attributes.
Return values
stringresolvePostTypes()
Resolve Post Types.
private
resolvePostTypes(string $value, string $currentType) : array<string|int, mixed>
Parameters
- $value : string
- $currentType : string