Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #908

Merged
merged 34 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
62f1f8c
fix: featured img override by open ai action
Soare-Robert-Daniel Feb 12, 2024
508c36d
chore: js build
Soare-Robert-Daniel Feb 12, 2024
ccd97ad
fix: re-allow users to add magic tags to featured image
Soare-Robert-Daniel Feb 26, 2024
629ea26
Sync branch [skip ci]
pirate-bot Feb 27, 2024
f308b90
Sync branch [skip ci]
pirate-bot Feb 27, 2024
601dc55
chore: remove URL image mention from label
Soare-Robert-Daniel Feb 28, 2024
60f3680
fix: prevent jobs from stopping the cron loop
Soare-Robert-Daniel Feb 28, 2024
fa82512
Merge pull request #894 from Codeinwp/fix/url-tags-inside-featured-image
Soare-Robert-Daniel Mar 1, 2024
92855c5
fix: pro feature img fetch crash free users on Cron
Soare-Robert-Daniel Mar 4, 2024
553e74d
Merge branch 'development' into fix/feeds-import-cron
Soare-Robert-Daniel Mar 4, 2024
fafe61d
fix: filter key for select components (#898)
Soare-Robert-Daniel Mar 6, 2024
a7ec5e0
fix: css name conflict for `.right` class name
Soare-Robert-Daniel Mar 7, 2024
398482f
feat: add tag parsing for feed source generated by endpoint
Soare-Robert-Daniel Mar 12, 2024
5b671eb
chore: phpcs and phpdoc
Soare-Robert-Daniel Mar 12, 2024
d042b65
Merge branch 'master' into development
preda-bogdan Mar 13, 2024
349ef77
Merge branch 'development' into fix/featured-image-override-by-gpt
Soare-Robert-Daniel Mar 21, 2024
e6773d0
Merge pull request #897 from Codeinwp/fix/feeds-import-cron
Soare-Robert-Daniel Mar 21, 2024
3c3c3b3
Merge pull request #902 from Codeinwp/fix/feed-import-css-name-conflict
Soare-Robert-Daniel Mar 21, 2024
6aabb39
Merge branch 'development' into fix/featured-image-override-by-gpt
Soare-Robert-Daniel Mar 21, 2024
2c1a6ad
fix: allow mix content in title field for map content
Soare-Robert-Daniel Mar 21, 2024
1146c23
chore: phpcs
Soare-Robert-Daniel Mar 21, 2024
3777a5e
Merge branch 'development' into fix/full-content-import-source-per-feed
Soare-Robert-Daniel Mar 22, 2024
6be5324
chore: update comment job name
Soare-Robert-Daniel Mar 27, 2024
7817bee
Merge pull request #906 from Codeinwp/chore/ci-update
Soare-Robert-Daniel Mar 27, 2024
aa1539a
chore(deps): bump codeinwp/themeisle-sdk from 3.3.14 to 3.3.15
dependabot[bot] Mar 28, 2024
dd3f206
Merge pull request #907 from Codeinwp/dependabot/composer/development…
vytisbulkevicius Mar 28, 2024
e90763a
Merge pull request #889 from Codeinwp/fix/featured-image-override-by-gpt
vytisbulkevicius Mar 28, 2024
63a31ea
Merge pull request #905 from Codeinwp/fix/title-with-text-before-tag
vytisbulkevicius Mar 28, 2024
19b0e4f
Merge pull request #903 from Codeinwp/fix/full-content-import-source-…
vytisbulkevicius Mar 28, 2024
cbbfc47
chore: sdk update
Soare-Robert-Daniel Mar 29, 2024
7aa6f6c
chore(deps): bump codeinwp/themeisle-sdk from 3.3.15 to 3.3.16
dependabot[bot] Mar 29, 2024
2e6c802
Merge pull request #911 from Codeinwp/dependabot/composer/development…
vytisbulkevicius Mar 29, 2024
c347ccb
Merge branch 'development' into chore/sdk-update
Soare-Robert-Daniel Mar 29, 2024
6b1f148
Merge pull request #910 from Codeinwp/chore/sdk-update
vytisbulkevicius Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/pr_verify_linked_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Verify PR

on:
pull_request:
types: [ edited, synchronize, opened, reopened ]
types: [edited, synchronize, opened, reopened]
branches:
- development
check_run:
Expand All @@ -19,13 +19,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
with:
quiet: 'true'
quiet: "true"
- name: Find Comment
uses: peter-evans/find-comment@v1
id: find_coomment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'pirate-bot'
comment-author: "pirate-bot"
body-includes: No Linked Issue found
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v1
Expand All @@ -41,9 +41,9 @@ jobs:
if: steps.verify_linked_issues.outputs.has_linked_issues == 'false'
run: exit 1;
- name: Delete comment
uses: jungwinter/comment@v1
uses: winterjung/comment@v1
if: steps.verify_linked_issues.outputs.has_linked_issues == 'true' && steps.find_coomment.outputs.comment-id != ''
with:
type: delete
comment_id: ${{ steps.find_coomment.outputs.comment-id }}
token: ${{ secrets.BOT_TOKEN }}
token: ${{ secrets.BOT_TOKEN }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"source": "https://github.com/Codeinwp/feedzy-rss-feeds"
},
"require": {
"codeinwp/themeisle-sdk": "^3.2"
"codeinwp/themeisle-sdk": "^3.3"
},
"autoload": {
"files": [
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions css/metabox-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
.fz-input-group{flex-wrap: wrap;}
.fz-input-group .fz-input-group-right{width: 100%; padding-left: 0; padding-top: 8px;}
.fz-input-group .fz-input-group-right .btn.dropdown-toggle{width: 100%;}
.fz-form-wrap .form-block.form-block-two-column .left{width: 100%; padding-right: 0; padding-bottom: 24px;}
.fz-form-wrap .form-block.form-block-two-column .right{width: 100%;}
.fz-form-action .left{width: 100%; padding-bottom: 16px;}
.fz-form-action .left .btn{width: 100%; display: block; text-align: center;}
.fz-form-action .right{width: 100%; flex-direction: column;}
.fz-form-action .right .btn + .btn{margin-left: 0; margin-top: 8px;}
.fz-form-wrap .form-block.form-block-two-column .fz-left{width: 100%; padding-right: 0; padding-bottom: 24px;}
.fz-form-wrap .form-block.form-block-two-column .fz-right{width: 100%;}
.fz-form-action .fz-left{width: 100%; padding-bottom: 16px;}
.fz-form-action .fz-left .btn{width: 100%; display: block; text-align: center;}
.fz-form-action .fz-right{width: 100%; flex-direction: column;}
.fz-form-action .fz-right .btn + .btn{margin-left: 0; margin-top: 8px;}
.fz-form-row .fz-form-col-6, .fz-form-row .fz-form-col-4, .fz-form-row .fz-form-col-8{width: 100%;}
.fz-document-list > ul > li{width: 100%;}
.fz-help-improve-box .left{width: 100%;}
.fz-help-improve-box .right{width: 100%;}
.fz-help-improve-box .fz-left{width: 100%;}
.fz-help-improve-box .fz-right{width: 100%;}
.fz-tabs-menu ul {flex-wrap: wrap;}
.fz-tabs-menu ul li{flex-shrink: 0; width: 50%;}
.fz-tabs-menu ul li a{padding: 0px; border: 1px solid transparent;}
Expand Down
25 changes: 13 additions & 12 deletions css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,15 @@ fieldset[disabled] .form-control {
display: flex;
flex-wrap: wrap;
}
.fz-form-wrap .form-block.form-block-two-column .left{
.fz-form-wrap .form-block.form-block-two-column .fz-left{
width: 285px;
padding-right: 24px;
}
.fz-form-wrap .form-block.form-block-two-column .right{
.fz-form-wrap .form-block.form-block-two-column .fz-right{
width: calc(100% - 285px);
text-align: left;
}
.fz-form-wrap .form-block.form-block-two-column .right .upgrade-alert{
.fz-form-wrap .form-block.form-block-two-column .fz-right .upgrade-alert{
margin-top: 20px;
}
.fz-form-wrap .form-block .only-pro-content{
Expand Down Expand Up @@ -666,14 +667,14 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
flex-wrap: wrap;
justify-content: space-between;
}
.fz-form-action .right{
.fz-form-action .fz-right{
display: flex;
flex-wrap: wrap;
}
.fz-form-action .right .btn{
.fz-form-action .fz-right .btn{
margin-bottom: 8px;
}
.fz-form-action .right .btn + .btn{
.fz-form-action .fz-right .btn + .btn{
margin-left: 16px;
}

Expand Down Expand Up @@ -901,9 +902,9 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
}
.fz-form-wrap .tagify__tag{
position: relative;
margin-left: 0;
margin-right: 16px;
margin-bottom: 16px;
margin-left: 2px;
margin-right: 2px;
margin-bottom: 2px;
vertical-align: top;
}
.fz-form-wrap .tagify__tag>div{
Expand Down Expand Up @@ -1310,18 +1311,18 @@ input.fz-switch-toggle[type=checkbox]:checked:before{
flex-direction: row-reverse;
border: 1px solid #D9D9D9;
}
.fz-help-improve-box .left{
.fz-help-improve-box .fz-left{
width: calc(100% - 320px);
padding: 30px;
}
.fz-help-improve-box .left p{
.fz-help-improve-box .fz-left p{
font-size: 16px;
line-height: 24px;
color: #050505;
margin-bottom: 24px;
max-width: 710px;
}
.fz-help-improve-box .right{
.fz-help-improve-box .fz-right{
width: 320px;
padding: 18px;
background-color: #F5F7F9;
Expand Down
1 change: 1 addition & 0 deletions feedzy-rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ function run_feedzy_rss_feeds() {
define( 'FEEDZY_REST_VERSION', '1' );
// to redirect all themeisle_log_event to error log.
define( 'FEEDZY_LOCAL_DEBUG', false );
define( 'FEEDZY_FEED_CUSTOM_TAG_NAMESPACE', 'http://feedzy.themeisle.com' );

// always make this true before testing
// also used in gutenberg.
Expand Down
22 changes: 14 additions & 8 deletions includes/abstract/feedzy-rss-feeds-admin-abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ public function get_short_code_attributes( $atts ) {
*
* @param string $raw Url or list of urls.
*
* @return mixed|void Urls of the feeds.
* @return string|array<string> Urls of the feeds.
*/
public function normalize_urls( $raw ) {
$feeds = apply_filters( 'feedzy_process_feed_source', $raw );
Expand Down Expand Up @@ -1412,12 +1412,12 @@ public function get_feed_array( $feed_items, $sc, $feed, $feed_url, $sizes ) {
* @since 3.0.0
* @access private
*
* @param array $sc The shorcode attributes array.
* @param array $sizes The sizes array.
* @param object $item The feed item object.
* @param string $feed_url The feed url.
* @param int $index The item number (may not be the same as the item_index).
* @param int $item_index The real index of this items in the feed (maybe be different from $index if filters are used).
* @param array $sc The shorcode attributes array.
* @param array $sizes The sizes array.
* @param \SimplePie_Item $item The feed item object.
* @param string $feed_url The feed url.
* @param int $index The item number (may not be the same as the item_index).
* @param int $item_index The real index of this items in the feed (maybe be different from $index if filters are used).
*
* @return array
*/
Expand Down Expand Up @@ -1515,8 +1515,14 @@ private function get_feed_item_filter( $sc, $sizes, $item, $feed_url, $index, $i

// multiple sources?
$is_multiple = is_array( $feed_url );
$feed_source = $item->get_feed()->get_title();

$feed_source = '';
$feed_source_tags = $item->get_item_tags( FEEDZY_FEED_CUSTOM_TAG_NAMESPACE, 'parent-source' );
if ( ! empty( $feed_source_tags ) && ! empty( $feed_source_tags[0]['data'] ) ) {
$feed_source = $feed_source_tags[0]['data'];
} else {
$feed_source = $item->get_feed()->get_title();
}
// author.
if ( $item->get_author() && $meta_args['author'] ) {
$author = $item->get_author();
Expand Down
18 changes: 11 additions & 7 deletions includes/admin/feedzy-rss-feeds-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,21 +453,25 @@ private function summarize_content() {
}

/**
* Generate item image.
* Generate item image using OpenAI.
* Return default value if OpenAI is not available or `Generate only for missing images` option is enabled and feed has image.
*
* @return string
* @return string Image URL to download.
*/
private function generate_image() {
$content = call_user_func( array( $this, 'item_title' ) );

if ( ! class_exists( '\Feedzy_Rss_Feeds_Pro_Openai' ) ) {
return isset( $this->default_value ) ? $this->default_value : '';
}
if ( $this->current_job->data->generateImgWithChatGPT && empty( $this->default_value ) ) {

$feed_has_image = false !== filter_var( $this->default_value, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED );
if ( ( ! isset( $this->current_job->data->generateOnlyMissingImages ) || ! empty( $this->current_job->data->generateOnlyMissingImages ) ) && $feed_has_image ) {
return isset( $this->default_value ) ? $this->default_value : '';
}
$openai = new \Feedzy_Rss_Feeds_Pro_Openai();
$content = $openai->call_api( $this->settings, $content, 'image', array() );
return $content;

$prompt = call_user_func( array( $this, 'item_title' ) );
$openai = new \Feedzy_Rss_Feeds_Pro_Openai();
return $openai->call_api( $this->settings, $prompt, 'image', array() );
}
}
}
Loading
Loading