What you can build
A plugin adds to Poly Community through components and registries. The components of Poly Community itself (Events, Courses, Jobs, Listings and the rest) are made the same way, so what they do, yours can. Whatever a component shows is WordPress blocks drawn with the WordPress Interactivity API: directives in its markup, its data in the store, its script a script module, and moves between pages through the Interactivity Router. Built on the Interactivity API maps each part to the WordPress reference.
What you can build
- A section of its own. A component brings its pages and their addresses, its items in the community menu, a tab on every profile or space, its own tables, its admin screens and its rows on any settings page. It has a switch under Settings → Components, where its data is counted and deleted too. See Building a component, and the Rooms example plugin of Building for instant pages and live updates, which you can download and run.
- New kinds of content. Kinds of item with their own fields, as events and jobs are (Kinds of item), category trees (
poly_community_register_trees), what an item can carry (poly_community_register_attachments), catalogues declared in code, as Listings has them (poly_community_register_catalogs), what search finds of yours (poly_community_register_search_kinds) and what members may review (poly_community_register_review_targets). - People and access. Relationship types between members (
poly_community_register_relationship_types), kinds of space (spaceTypesinkit.json), access rules and the parts of a "who can" rule (poly_community_register_access_rules,whoCan), what a member must do before taking part (poly_community_requirements), forms such as applications and claims (poly_community_register_forms), and actions of your own held back like the core ones, so approval, profile requirements and verification hold them too (actionsinkit.json). - Money. What members sell through your component (
poly_community_register_seller_kinds), and another payment gateway as a provider of the WordPlus SDK (Payment gateways). - Logging in. Another way to log in, such as Discord or GitLab (Login providers).
- Reacting to what happens. Signals, one registry for what reacts to a change once it is saved: points, webhooks, automations, the audit log (
poly_community_register_signals). Background jobs (poly_community_register_jobs), notification and email types (notificationsinkit.json,poly_community_email_kinds), reasons to report (poly_community_report_reasons), and your data in the export and erasure of personal data (poly_community_register_data_kinds). - Pages that move at once and stay current. Row types, lists, events, facts of the reader, parts and a component script, the same tools the core uses. See Building for instant pages and live updates, Lists, Live updates in code and Moving between pages.
- Tools in the composer. A button in the post composer that attaches what your component makes to a post:
window.polyCommunityComposer.tool( slug, { open, preview } ). - Kinds of site. More choices on the start page, each setting up a whole kind of site (
poly_community_blueprints). - Apps outside the site. Mobile apps and other services, through the REST API with API keys and apps (Settings → Advanced → API).
What you cannot build
- A front end of another kind inside the community, such as a React app that draws its own HTML in the browser. It can be mounted, as Better Messages does with the messenger, but such a page has no page file and none of the live updates of Poly Community, and it handles both itself. A part built with blocks and directives gets both (Built on the Interactivity API).
- Interactivity API directives of your own. WordPress keeps custom directives behind private APIs it says will break. A block uses the directives WordPress has.
- Directives inside rows drawn as HTML. WordPress does not run directives inside what
data-wp-htmldraws. A button there names its action, and Poly Community runs it (Buttons inside rows drawn as parts). - A kind of event channel of your own. Events go on the channels of the core: everyone, members, one account, a profile, its followers or friends, the moderators, and the channels of a space or a post. Filters widen those of a post and a profile (
poly_community_item_channels,poly_community_profile_channels), but there is no registry for a new kind of channel that pages listen to (Live updates in code). - Live updates for visitors. A visitor page listens to no events and shows what changed on the next page opened. Members see changes as they happen.
- A page file for a block that draws something of its reader or of the moment. The page still moves without a reload, by its HTML through the router, only slower (Moving between pages).
- Code that never changes on everything. What does not change is on the stable list, from the day it is listed there: adding components, row types and lists, the parts of
Poly_Community(), and every block and design token. The events, thepoly-communityscript module, the facts of the reader and the page file hooks are not on it yet.
To change a component that is there rather than add one, in the admin, the Site Editor, a copy of a view in your theme or hooks in a plugin, see Changing a component.
See also Building on Poly Community.