PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.10
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.10
1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 All 34 releases
desktop-mode / includes / feedback / bootstrap.php

bootstrap.php in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.1.10, at includes/feedback/bootstrap.php

54 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OpenStation — feedback module bootstrap.
4 *
5 * The deactivation feedback dialog: one optional question asked when a
6 * site admin deactivates OpenStation, forwarded server-side to the
7 * intake plugin on openstation.blog. Nothing in this module writes to the site — no
8 * option, no user meta, no transient, no table — which is why
9 * `docs/data-model.md` has no row for it. The only state is the
10 * submission itself, and it leaves the site the moment it is sent.
11 *
12 * Consent is per submission: nothing goes out unless the admin clicks
13 * "Send", and both dialog buttons deactivate the plugin either way.
14 *
15 * Loaded unconditionally from `desktop-mode.php` (not inside the
16 * admin-modules gate) so the REST route registers on REST requests.
17 *
18 * @package OpenStation
19 */
20
21 defined( 'ABSPATH' ) || exit;
22
23 /**
24 * Where a submission is forwarded: the OpenStation Feedback Intake
25 * plugin on openstation.blog, the site the About tab already reads
26 * (`OPENSTATION_ABOUT_SITE_URL` in `includes/about-feed.php`), so the
27 * disclosure names a host users have already seen named. Filterable
28 * through `openstation_deactivation_feedback_endpoint` for hosts that
29 * run their own intake.
30 */
31 const OPENSTATION_FEEDBACK_ENDPOINT = 'https://openstation.blog/wp-json/openstation-feedback/v1/deactivation';
32
33 /**
34 * Whether the deactivation feedback dialog is on for this site.
35 *
36 * Gates everything: the script on the Plugins screen, the Plugins
37 * app's config block, and the REST route's permission callback. A
38 * host that returns `false` here ships no dialog and answers 403 on
39 * the route.
40 *
41 * @return bool
42 */
43 function openstation_deactivation_feedback_enabled() {
44 /**
45 * Filters whether the deactivation feedback dialog is enabled.
46 *
47 * @param bool $enabled Default true.
48 */
49 return (bool) apply_filters( 'openstation_deactivation_feedback_enabled', true );
50 }
51
52 require_once __DIR__ . '/deactivation.php';
53 require_once __DIR__ . '/rest.php';
54