Skip to content

Commit 8003f42

Browse files
release: fixes
- Fixed issue with import job failing when it has one of the source feeds invalid - Updated dependencies
2 parents 91b4ea3 + 09132a5 commit 8003f42

File tree

7 files changed

+119
-46
lines changed

7 files changed

+119
-46
lines changed

.github/workflows/build-dev-artifacts.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
pr_number: ${{ steps.get-pr-number.outputs.num }}
6262
comment_body: ${{ steps.get-comment-body.outputs.body }}
6363
steps:
64+
- name: Check out source files
65+
uses: actions/checkout@v4
6466
- name: Get PR number
6567
id: get-pr-number
6668
run: echo "::set-output name=num::$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')"
@@ -76,9 +78,20 @@ jobs:
7678

7779
- name: Get comment body
7880
id: get-comment-body
81+
env:
82+
GITHUB_REPO_NAME: ${{ github.event.pull_request.base.repo.name }}
83+
DEV_ZIP_BRANCH_NAME: ${{ needs.dev-zip.outputs.branch-name }}
84+
DEV_ZIP_GIT_SHA_8: ${{ needs.dev-zip.outputs.git-sha-8 }}
85+
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
7986
run: |
87+
previewLink=$(node ./bin/generatePlaygroundPreviewLink.js)
88+
8089
body="Plugin build for ${{ github.event.pull_request.head.sha }} is ready :bellhop_bell:!
81-
- Download [build](https://verti-artifacts.s3.amazonaws.com/${{ github.event.pull_request.base.repo.name }}-${{ needs.dev-zip.outputs.branch-name }}-${{ needs.dev-zip.outputs.git-sha-8 }}/feedzy-rss-feeds.zip)"
90+
- Download [build](https://verti-artifacts.s3.amazonaws.com/${{ github.event.pull_request.base.repo.name }}-${{ needs.dev-zip.outputs.branch-name }}-${{ needs.dev-zip.outputs.git-sha-8 }}/feedzy-rss-feeds.zip)
91+
92+
> [!NOTE]
93+
> You can preview the changes in the <a href=\"$previewLink\" target=\"_blank\">Playground</a>
94+
"
8295
body="${body//$'\n'/'%0A'}"
8396
echo "::set-output name=body::$body"
8497
- name: Create comment on PR with links to plugin builds

bin/generatePlaygroundPreviewLink.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env node
2+
// Read GitHub Action environment variables.
3+
const repoName = process.env.GITHUB_REPO_NAME || '';
4+
const branchName = process.env.DEV_ZIP_BRANCH_NAME || '';
5+
const gitSha8 = process.env.DEV_ZIP_GIT_SHA_8 || '';
6+
7+
// Create the blueprint object with necessary schema and options.
8+
const blueprint = {
9+
preferredVersions: {
10+
php: '8.0',
11+
},
12+
plugins: [
13+
'wpide',
14+
`https://verti-artifacts.s3.amazonaws.com/${repoName}-${branchName}-${gitSha8}/feedzy-rss-feeds.zip`,
15+
],
16+
login: true,
17+
landingPage: '/wp-admin/post-new.php?post_type=feedzy_imports',
18+
features: {
19+
networking: true,
20+
},
21+
};
22+
23+
// Convert the blueprint object to JSON and then encode it in Base64.
24+
const blueprintJson = JSON.stringify(blueprint);
25+
const encodedBlueprint = Buffer.from(blueprintJson).toString('base64');
26+
27+
// Output the full preview link.
28+
process.stdout.write('https://playground.wordpress.net/#' + encodedBlueprint);

composer.lock

Lines changed: 23 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/settings.css

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.feedzy-wrap *{
1+
.feedzy-wrap > *{
22
box-sizing: border-box;
33
margin: 0;
44
padding: 0;
@@ -115,30 +115,22 @@
115115
display: none;
116116
}
117117

118-
.feedzy-banner:has(.tsdk-banner-cta) {
118+
:is(.feedzy-banner, .feedzy-banner-dashboard):not(.themeisle-sale) {
119+
visibility: hidden;
120+
}
121+
122+
.feedzy-banner:has(.themeisle-sale) {
119123
margin: 0 auto;
120124
display: flex;
121125
justify-content: center;
122126
margin-bottom: 20px;
127+
max-width: 1224px;
128+
padding: 0 12px;
123129
}
124130

125-
.feedzy-banner:has(.tsdk-banner-cta) .tsdk-banner-urgency-text {
126-
padding: 5px;
127-
}
128-
129-
.feedzy-banner-dashboard {
130-
display: none;
131-
}
132-
133-
.feedzy-banner-dashboard:has(.tsdk-banner-cta) {
134-
display: block;
135-
margin: 20px 0;
136-
137-
/* Remove the properties added by .notice */
138-
background: transparent;
139-
border: unset;
140-
box-shadow: unset;
141-
padding: unset;
131+
.feedzy-banner .themeisle-sale {
132+
width: 100%;
133+
margin: 0;
142134
}
143135

144136
.feedzy-container{

img/black-friday.jpg

-89.9 KB
Binary file not shown.

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ function( $time ) use ( $cache_time ) {
849849
}
850850

851851
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
852-
$set_server_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) );
852+
$set_server_agent = sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) . SIMPLEPIE_USERAGENT );
853853
$feed->set_useragent( apply_filters( 'http_headers_useragent', $set_server_agent ) );
854854
}
855855

includes/admin/feedzy-rss-feeds-admin.php

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ function( $data, $page_slug ) {
7777
);
7878
}
7979

80+
add_filter( 'themeisle_sdk_blackfriday_data', array( $this, 'add_black_friday_data' ) );
81+
8082
/**
8183
* Load SDK dependencies.
8284
*/
@@ -89,13 +91,6 @@ function( $data, $page_slug ) {
8991
$this->add_banner_anchor();
9092
}
9193

92-
if ( in_array( $page_slug, array( 'imports', 'categories', 'settings' ), true ) ) {
93-
$license_data = get_option( 'feedzy_rss_feeds_pro_license_data', array() );
94-
if ( self::plan_category( $license_data ) <= 1 ) {
95-
do_action( 'themeisle_sdk_load_banner', 'feedzy' );
96-
}
97-
}
98-
9994
if (
10095
in_array( $page_slug, array( 'imports', 'new-category', 'settings' ), true )
10196
&& 'yes' === get_option( 'feedzy_rss_feeds_logger_flag', false )
@@ -2369,4 +2364,44 @@ private function enable_telemetry() {
23692364
add_filter( 'themeisle_sdk_enable_telemetry', '__return_true' );
23702365
wp_enqueue_script( $this->plugin_name . '_telemetry', FEEDZY_ABSURL . 'js/telemetry.js', array(), $this->version, true );
23712366
}
2367+
2368+
/**
2369+
* Set the black friday data.
2370+
*
2371+
* @param array $configs The configuration array for the loaded products.
2372+
* @return array
2373+
*/
2374+
public function add_black_friday_data( $configs ) {
2375+
$config = $configs['default'];
2376+
2377+
// translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
2378+
$message_template = __( 'Our biggest sale of the year: %1$sup to %2$s OFF%3$s on %4$s. Don\'t miss this limited-time offer.', 'feedzy-rss-feeds' );
2379+
$product_label = 'Feedzy';
2380+
$discount = '70%';
2381+
2382+
$is_pro = feedzy_is_pro();
2383+
2384+
if ( $is_pro ) {
2385+
// translators: %1$s - HTML tag, %2$s - discount, %3$s - HTML tag, %4$s - product name.
2386+
$message_template = __( 'Get %1$sup to %2$s off%3$s when you upgrade your %4$s plan or renew early.', 'feedzy-rss-feeds' );
2387+
$product_label = 'Feedzy Pro';
2388+
$discount = '30%';
2389+
}
2390+
2391+
$product_label = sprintf( '<strong>%s</strong>', $product_label );
2392+
$url_params = array(
2393+
'utm_term' => $is_pro ? 'plan-' . apply_filters( 'product_feedzy_license_plan', 0 ) : 'free',
2394+
'lkey' => $is_pro ? apply_filters( 'product_feedzy_license_key', false ) : false
2395+
);
2396+
2397+
$config['message'] = sprintf( $message_template, '<strong>', $discount, '</strong>', $product_label );
2398+
$config['sale_url'] = add_query_arg(
2399+
$url_params,
2400+
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/feedzy-bf', 'bfcm', 'feedzy' ) )
2401+
);
2402+
2403+
$configs[ $this->plugin_name ] = $config;
2404+
2405+
return $configs;
2406+
}
23722407
}

0 commit comments

Comments
 (0)