Skip to content

Commit afc67e6

Browse files
authored
Merge pull request #3896 from reduxframework/update-extendify-bpzzjn0
Update Extendify Library
2 parents 7d6ffbe + d7aed29 commit afc67e6

35 files changed

+467
-435
lines changed

extendify-sdk/app/Library/Welcome.php

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,19 @@ public function createAdminPage()
130130
</div>
131131
</div>
132132
<hr class="is-small"/>
133-
<div class="welcome-section">
134-
<h2 class="aligncenter">
135-
<?php \esc_html_e('Upgrade to Extendify Pro', 'extendify'); ?>
136-
</h2>
137-
<p class="aligncenter is-subheading">
138-
<?php \esc_html_e('Do you want more patterns and layouts - without limits? Choose one of our plans and receive unlimited access to our complete library.', 'extendify'); ?>
139-
</p>
140-
</div>
141-
<a href="https://extendify.com/pricing/?utm_source=welcome&amp;utm_medium=settings&amp;utm_campaign=get_started&amp;utm_campaign=get_started" class="button button-primary components-button">
142-
<?php echo \esc_html__('View Pricing', 'extendify'); ?></a>
143-
<hr/>
133+
<?php if (!defined('EXTENDIFY_SITE_LICENSE')) : ?>
134+
<div class="welcome-section">
135+
<h2 class="aligncenter">
136+
<?php \esc_html_e('Upgrade to Extendify Pro', 'extendify'); ?>
137+
</h2>
138+
<p class="aligncenter is-subheading">
139+
<?php \esc_html_e('Do you want more patterns and layouts - without limits? Choose one of our plans and receive unlimited access to our complete library.', 'extendify'); ?>
140+
</p>
141+
</div>
142+
<a href="https://extendify.com/pricing/?utm_source=welcome&amp;utm_medium=settings&amp;utm_campaign=get_started&amp;utm_campaign=get_started" class="button button-primary components-button">
143+
<?php echo \esc_html__('View Pricing', 'extendify'); ?></a>
144+
<hr/>
145+
<?php endif; ?>
144146
</div>
145147
</div>
146148
<?php

extendify-sdk/app/Onboarding/Admin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ public function addScopedScriptsAndStyles()
191191
'partnerName' => defined('EXTENDIFY_PARTNER_NAME') ? constant('EXTENDIFY_PARTNER_NAME') : null,
192192
'partnerSkipSteps' => defined('EXTENDIFY_SKIP_STEPS') ? constant('EXTENDIFY_SKIP_STEPS') : [],
193193
'devbuild' => \esc_attr(Config::$environment === 'DEVELOPMENT'),
194+
'version' => Config::$version,
195+
'insightsId' => \get_option('extendify_site_id', ''),
196+
// Only send insights if they have opted in explicitly.
197+
'insightsEnabled' => defined('EXTENDIFY_INSIGHTS_URL'),
194198
]),
195199
'before'
196200
);

extendify-sdk/public/build/extendify-onboarding.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extendify-sdk/public/build/extendify-onboarding.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extendify-sdk/public/build/extendify-onboarding.js.LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ PERFORMANCE OF THIS SOFTWARE.
3434

3535
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
3636

37+
/** @license React v16.13.1
38+
* react-is.production.min.js
39+
*
40+
* Copyright (c) Facebook, Inc. and its affiliates.
41+
*
42+
* This source code is licensed under the MIT license found in the
43+
* LICENSE file in the root directory of this source tree.
44+
*/
45+
3746
/** @license React v17.0.2
3847
* react-jsx-runtime.production.min.js
3948
*

extendify-sdk/public/build/extendify.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extendify-sdk/public/build/extendify.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extendify-sdk/readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: extendify, richtabor, kbat82, clubkert, arturgrabo
33
Tags: templates, patterns, layouts, blocks, gutenberg
44
Requires at least: 5.4
55
Tested up to: 6.0
6-
Stable tag: 0.9.2
6+
Stable tag: 0.9.3
77
Requires PHP: 5.6
88
License: GPLv2
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -124,6 +124,9 @@ Nope! Extendify imports lightweight block-based content that is served directly
124124

125125
== Changelog ==
126126

127+
= 0.9.3 - 2022-08-11 =
128+
- Various bug fixes and performance improvements
129+
127130
= 0.9.2 - 2022-07-29 =
128131
- Various bug fixes and performance improvements
129132

extendify-sdk/src/Library/components/TypeSelect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const TypeSelect = ({ className }) => {
2626
<button
2727
type="button"
2828
className={classNames({
29-
'outline-none w-full m-0 -ml-px min-w-sm cursor-pointer items-center rounded-tr-sm rounded-br-sm py-2.5 px-4 text-xs leading-none': true,
29+
'outline-none w-full m-0 -ml-px min-w-sm cursor-pointer items-center rounded py-2.5 px-4 text-xs leading-none': true,
3030
'bg-gray-900 text-white': currentType === 'template',
3131
'bg-transparent text-black': currentType !== 'template',
3232
})}

extendify-sdk/src/Onboarding/Onboarding.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Finished } from '@onboarding/pages/Finished'
99
import { useGlobalStore } from '@onboarding/state/Global'
1010
import { usePagesStore } from '@onboarding/state/Pages'
1111
import { updateOption } from './api/WPApi'
12+
import { useSentry } from './hooks/useSentry'
1213
import { useTelemetry } from './hooks/useTelemetry'
1314
import { NeedsTheme } from './pages/NeedsTheme'
1415

@@ -26,6 +27,7 @@ export const Onboarding = () => {
2627
const [show, setShow] = useState(false)
2728
const [needsTheme, setNeedsTheme] = useState(false)
2829
const theme = useSelect((select) => select('core').getCurrentTheme())
30+
const { Sentry } = useSentry()
2931
useDisableWelcomeGuide()
3032
useBodyScrollLock()
3133
useTelemetry()
@@ -76,17 +78,37 @@ export const Onboarding = () => {
7678
<SWRConfig
7779
value={{
7880
errorRetryInterval: 1000,
79-
onErrorRetry: (error, key) => {
80-
console.error(key, error)
81+
onErrorRetry: (
82+
error,
83+
key,
84+
config,
85+
revalidate,
86+
{ retryCount },
87+
) => {
8188
if (error?.data?.status === 403) {
8289
// if they are logged out, we can't recover
8390
window.location.reload()
8491
return
8592
}
8693
if (retrying) return
94+
95+
if (retryCount >= 5) {
96+
console.error('Encountered unrecoverable error', error)
97+
throw new Error(error?.message ?? 'Unknown error')
98+
}
99+
console.error(key, error)
100+
Sentry.captureException(
101+
new Error(error?.message ?? 'Unknown error'),
102+
{
103+
tags: { retrying: true },
104+
extra: { cacheKey: key },
105+
},
106+
)
107+
87108
setRetrying(true)
88109
setTimeout(() => {
89110
setRetrying(false)
111+
revalidate({ retryCount })
90112
}, 5000)
91113
},
92114
}}>

0 commit comments

Comments
 (0)