PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
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 0.5.0 0.6.0 All 127 releases
← All changes | app/AutoLaunch/Admin.php +12 -0 3.1.33.2.1 View file →
@@ -10,8 +10,9 @@
10 10
11 11 use Extendify\Config;
12 12 use Extendify\Insights;
13 13 use Extendify\PartnerData;
14 +use Extendify\Shared\Services\LaunchUpdate\LaunchUpdater;
14 15
15 16 /**
16 17 * This class handles any file loading for the admin area.
17 18 */
@@ -66,8 +67,10 @@
66 67 ]),
67 68 ]);
68 69 }
69 70
71 + $showLaunchUpdate = PartnerData::setting('showLaunchUpdate');
72 + $launchUpdate = $showLaunchUpdate ? LaunchUpdater::claimPendingUpdates() : [];
70 73 \wp_add_inline_script(
71 74 Config::$slug . '-launch-scripts',
72 75 'window.extLaunchData = ' . \wp_json_encode([
73 76 'editorStyles' => \get_block_editor_settings([], new \WP_Block_Editor_Context()),
@@ -72,8 +75,11 @@
72 75 'window.extLaunchData = ' . \wp_json_encode([
73 76 'editorStyles' => \get_block_editor_settings([], new \WP_Block_Editor_Context()),
74 77 'wpRoot' => \rest_url(),
75 78 'activeTests' => \get_option(Insights::ACTIVE_TESTS_OPTION, []),
79 + 'showLaunchTitle' => (bool) PartnerData::setting('showLaunchTitle'),
80 + 'customDesign' => PartnerData::setting('customDesign'),
81 + 'partnerStrings' => PartnerData::setting('strings'),
76 82 'resetSiteInformation' => [
77 83 'pagesIds' => array_map('esc_attr', $this->getLaunchCreatedPages()),
78 84 'navigationsIds' => array_map('esc_attr', $this->getLaunchCreatedNavigations()),
79 85 'templatePartsIds' => array_map('esc_attr', $this->getTemplatePartIds()),
@@ -86,8 +92,14 @@
86 92 'hello-world',
87 93 'Default post slug'
88 94 ),
89 95 'hideAutoLaunchExitLink' => (bool) PartnerData::setting('hideLaunchExitLink'),
96 + 'themeUpdateNeeded' => !empty($launchUpdate['theme']),
97 + 'pluginUpdateNeeded' => !empty($launchUpdate['plugin']),
98 + 'launchUpdateAttempt' => $launchUpdate['attempt'] ?? 0,
99 + 'launchUpdateStale' => (object) ($launchUpdate['stale'] ?? []),
100 + 'pluginUpdateViaRest' => LaunchUpdater::isWpOrgBuild(),
101 + 'pluginSlug' => Config::$slug,
90 102 ]),
91 103 'before'
92 104 );
93 105