Global Community Events namespace.
- Since:
-
- 4.8.0
- Source:
Methods
-
<static> getEvents(requestParams)
-
Sends REST API requests to fetch events for the widget.
Parameters:
Name Type Description requestParams
Object REST API Request parameters object. - Since:
-
- 4.8.0
- Source:
Returns:
- Type
- void
-
<static> init()
-
Initializes the wp.communityEvents object.
- Since:
-
- 4.8.0
- Source:
Returns:
- Type
- void
-
<static> renderEventsTemplate(templateParams, initiatedBy)
-
Renders the template for the Events section of the Events & News widget.
Parameters:
Name Type Description templateParams
Object The various parameters that will get passed to wp.template. initiatedBy
string 'user' to indicate that this was triggered manually by the user; 'app' to indicate it was triggered automatically by the app itself. - Since:
-
- 4.8.0
- Source:
Returns:
- Type
- void
-
<static> toggleLocationForm(action)
-
Toggles the visibility of the Edit Location form.
Parameters:
Name Type Description action
event | string 'show' or 'hide' to specify a state; or an event object to flip between states. - Since:
-
- 4.8.0
- Source:
Returns:
- Type
- void