PluginProbe
Extendify / 3.2.3
Extendify v3.2.3
3.2.3 3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 All 129 releases
← All changes | app/Shared/Controllers/SiteVisibilityController.php +26 -1 3.2.1 → 3.2.3 View file →
@@ -10,9 +10,10 @@
10 10
11 11 use Extendify\SiteVisibility;
12 12
13 13 /**
14 - * The controller for moving the site in and out of Coming Soon mode
14 + * The controller for moving the site in and out of Coming Soon mode and for
15 + * WordPress's "Discourage search engines" setting
15 16 */
16 17
17 18 class SiteVisibilityController
18 19 {
@@ -35,8 +36,32 @@
35 36 */
36 37 public static function unpublish()
37 38 {
38 39 SiteVisibility::markUnpublished();
40 +
41 + return new \WP_REST_Response(['success' => true]);
42 + }
43 +
44 + /**
45 + * Let search engines index the site
46 + *
47 + * @return \WP_REST_Response
48 + */
49 + public static function allowIndexing()
50 + {
51 + SiteVisibility::allowIndexing();
52 +
53 + return new \WP_REST_Response(['success' => true]);
54 + }
55 +
56 + /**
57 + * Ask search engines not to index the site
58 + *
59 + * @return \WP_REST_Response
60 + */
61 + public static function blockIndexing()
62 + {
63 + SiteVisibility::blockIndexing();
39 64
40 65 return new \WP_REST_Response(['success' => true]);
41 66 }
42 67 }