-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#### Features * Support default Gutenberg editor instead of importing content in the Classic block * Adds support for Feedzy widget in the widget block editor * Adds default thumbnail image support when no image is available #### Fixes * Title Character Limit and the Description Character Limit parameter in the Feedzy Block * Displaying Default Thumbnail Image does not show in Block or Shortcode approach * Custom tag is trimmed on save of the import if used inside <iframe> * Keyword filters break the import with PHP 8.0
- Loading branch information
Showing
13 changed files
with
190 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Plugin Name: FEEDZY RSS Feeds | ||
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/ | ||
* Author: Themeisle | ||
* | ||
* @package feedzy-rss-feeds | ||
*/ | ||
/* global feedzy_setting */ | ||
/* jshint unused:false */ | ||
jQuery( function( $ ) { | ||
// on upload button click | ||
$( 'body' ).on( 'click', '.feedzy-open-media', function( e ) { | ||
e.preventDefault(); | ||
var button = $( this ), | ||
wp_media_uploader = wp.media( { | ||
title: feedzy_setting.l10n.media_iframe_title, | ||
library : { | ||
type : 'image' | ||
}, | ||
button: { | ||
text: feedzy_setting.l10n.media_iframe_button | ||
}, | ||
multiple: false | ||
} ).on( 'select', function() { // it also has "open" and "close" events | ||
var attachment = wp_media_uploader.state().get( 'selection' ).first().toJSON(); | ||
var attachmentUrl = attachment.url; | ||
if ( attachment.sizes.thumbnail ) { | ||
attachmentUrl = attachment.sizes.thumbnail.url; | ||
} | ||
if ( $( '.feedzy-media-preview' ).length ) { | ||
$( '.feedzy-media-preview' ).find( 'img' ).attr( 'src', attachmentUrl ); | ||
} else { | ||
$( '<div class="fz-form-group feedzy-media-preview"><img src="' + attachmentUrl + '"></div>' ).insertBefore( button.parent() ); | ||
} | ||
button.parent().find( '.feedzy-remove-media' ).addClass( 'is-show' ); | ||
button.parent().find( 'input:hidden' ).val( attachment.id ); | ||
} ).open(); | ||
}); | ||
|
||
// on remove button click | ||
$( 'body' ).on( 'click', '.feedzy-remove-media', function( e ) { | ||
e.preventDefault(); | ||
var button = $( this ); | ||
button.parent().prev( '.feedzy-media-preview' ).remove(); | ||
button.removeClass( 'is-show' ); | ||
button.parent().find( 'input:hidden' ).val( '' ); | ||
}); | ||
}); |