$prefix
$prefix : string
Loads and displays comments for built-in "chat" feature.
$alert : \WP_Buoy_Alert
The alert associatd with this chat room.
register() : void
Entry point for the WordPress framework into plugin code.
This is the method called when WordPress loads the plugin file. It is responsible for "registering" the plugin's main functions with the WordPress Plugin API.
install_plugin_dependency(string $slug, string $version = '')
Automates installation of other plugins that we need.
We only use this for the WP REST API at the moment. It's the 1 and only dependency we have on other plugins. When that plugin gets added to WP Core, we can remove this code.
As a result, note that this code is SPECIFIC to the rest-api
plugin. It will not work as-is for other plugins.
string | $slug | |
string | $version |
renderWebAppHTML() : void
Prints meta tag indicators for native-like functionality.
The "activate alert" screen is intended to be the web app "install" screen for Buoy. We insert special mobile browser specific tags in order to create a native-like "installer" for the user. We only want to do this on this specific screen.
filterCommentText(string $comment_text) : string
Spruces up the comment text when displaying a comment.
Chat messages are stored as comments in the WordPress database so this filter takes the text (typically a single line) and adds some basic expected functionality like turning links to images into inline images, and parsing simple markdown.
string | $comment_text |