updater.php
Integrates the release server with WordPress plugin updates, respects the selected release channel, and supplies package information for authorized downloads.
Responsibility#
Integrates the release server with WordPress plugin updates, respects the selected release channel, and supplies package information for authorized downloads.
This is an implementation reference for the released 0.9.13 module. Internal PHP helpers are not a compatibility promise for third-party callers. Prefer the documented REST, Abilities, theme, and filter contracts.
Related modules#
Module constants#
const CANTATA_EDIT_UPDATE_CACHE = 'cantata_edit_update';
const CANTATA_THEME_UPDATE_CACHE = 'cantata_theme_update';
const CANTATA_THEME_ITEM_ID = 2;
These values describe this release. Defined configuration constants and generated identifiers can have different ownership; do not edit stored values directly without following the corresponding workflow.
Literal option and cache keys#
cantata_edit_channel. These are direct literal keys found in this module; dynamically constructed keys and metadata constants are covered by the storage reference.
WordPress hooks#
| Operation | Hook |
|---|---|
add_filter |
update_plugins_updates.cantatasites.com |
add_filter |
update_themes_updates.cantatasites.com |
add_filter |
plugins_api |
add_action |
in_plugin_update_message- |
add_action |
update_option_cantata_edit_channel |
add_action |
update_option_cantata_edit_channel |
add_action |
update_option_ |
add_action |
upgrader_process_complete |
add_action and add_filter subscribe to a hook; do_action and apply_filters expose a hook. A subscription is not itself a new extension API. Dynamic hook names are not included in this literal inventory.
Function and method reference#
cantata_edit_update_channel#
function cantata_edit_update_channel(): string
'stable' or 'beta', set on the settings screen.
Source location: includes/updater.php:18.
cantata_edit_latest_release#
function cantata_edit_latest_release( bool $fresh = false ): ?array
The latest release as the server describes it, or null. Cached, including failures (for an hour).
Implementation connections: cantata_edit_api, cantata_edit_update_channel.
Source location: includes/updater.php:23.
cantata_theme_latest_release#
function cantata_theme_latest_release( bool $fresh = false ): ?array
The latest Kindly Edit Framework parent-theme release. The editor license entitles the same activated site.
Implementation connections: cantata_edit_api, cantata_edit_update_channel.
Source location: includes/updater.php:38.
cantata_edit_update_field#
function cantata_edit_update_field( $value ): array
EDD sends "sections" and "banners" PHP-serialized. Read them without ever building objects.
Implementation connections: cantata_edit_branding, cantata_edit_latest_release, cantata_edit_settings_url.
Source location: includes/updater.php:61.