EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor - Version 3.3.4

Version Description

Download this release

Release Info

Developer wpdevteam
Plugin Icon wp plugin EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor
Version 3.3.4
Comparing to
See all releases

Code changes from version 3.3.3 to 3.3.4

EmbedPress/Elementor/Widgets/Embedpress_Elementor.php CHANGED
@@ -62,6 +62,9 @@ class Embedpress_Elementor extends Widget_Base {
62
  'spotify',
63
  'smugmug',
64
  'meetup',
 
 
 
65
  'dailymotion',
66
  'instagram',
67
  'slideshare',
62
  'spotify',
63
  'smugmug',
64
  'meetup',
65
+ 'apple',
66
+ 'apple podcast',
67
+ 'podcast',
68
  'dailymotion',
69
  'instagram',
70
  'slideshare',
EmbedPress/Ends/Back/Handler.php CHANGED
@@ -157,6 +157,8 @@ class Handler extends EndHandlerAbstract {
157
  */
158
  public function getUrlSchemes() {
159
  return [
 
 
160
  // PollDaddy
161
  '*.polldaddy.com/s/*',
162
  '*.polldaddy.com/poll/*',
157
  */
158
  public function getUrlSchemes() {
159
  return [
160
+ // Apple podcasts
161
+ 'podcasts.apple.com/*',
162
  // PollDaddy
163
  '*.polldaddy.com/s/*',
164
  '*.polldaddy.com/poll/*',
EmbedPress/Shortcode.php CHANGED
@@ -146,7 +146,7 @@ class Shortcode {
146
  $urlData->originalContent = $url;
147
  }
148
 
149
- $eventResults = apply_filters( 'embedpress:onBeforeEmbed', $urlData );
150
  if ( empty( $eventResults ) ) {
151
  return $subject;
152
  }
@@ -158,7 +158,7 @@ class Shortcode {
158
  // $attributesHtml[] = $attrName . '="' . $attrValue . '"';
159
  //}
160
  if ( isset( $customAttributes['width'])) {
161
- $attributesHtml[] = "style=\"width:{$customAttributes['width']}px; max-width:100%; height: auto\"";
162
  }
163
 
164
  // Check if $url is a google shortened url and tries to extract from it which Google service it refers to.
@@ -167,6 +167,7 @@ class Shortcode {
167
  $embedTemplate = '<div ' . implode( ' ', $attributesHtml ) . '>{html}</div>';
168
 
169
  $parsedContent = self::get_content_from_template($url, $embedTemplate);
 
170
  // Replace all single quotes to double quotes. I.e: foo='joe' -> foo="joe"
171
  $parsedContent = str_replace( "'", '"', $parsedContent );
172
  $parsedContent = str_replace( "{provider_alias}", $provider_name , $parsedContent );
@@ -263,9 +264,6 @@ KAMAL;
263
  ] );
264
  $embed = self::modify_spotify_content( $embed);
265
  $embed = apply_filters( 'embedpress:onAfterEmbed', $embed );
266
- //set_transient( $hash, $embed, HOUR_IN_SECONDS * 6);
267
- //error_log( '----embed-----');
268
- //error_log( print_r( $embed, 1));
269
  return $embed;
270
  }
271
  }
@@ -616,6 +614,15 @@ KAMAL;
616
  }
617
 
618
  protected static function get_content_from_template( $url, $template ) {
 
 
 
 
 
 
 
 
 
619
  if ( strpos( $url, 'meetup.com') !== false ) {
620
  $html = '';
621
  }else{
146
  $urlData->originalContent = $url;
147
  }
148
 
149
+ $eventResults = apply_filters( 'embedpress:onBeforeEmbed', $urlData, $subject );
150
  if ( empty( $eventResults ) ) {
151
  return $subject;
152
  }
158
  // $attributesHtml[] = $attrName . '="' . $attrValue . '"';
159
  //}
160
  if ( isset( $customAttributes['width'])) {
161
+ $attributesHtml[] = "style=\"width:{$customAttributes['width']}px; max-width:100%; height: auto; display:inline-block;\"";
162
  }
163
 
164
  // Check if $url is a google shortened url and tries to extract from it which Google service it refers to.
167
  $embedTemplate = '<div ' . implode( ' ', $attributesHtml ) . '>{html}</div>';
168
 
169
  $parsedContent = self::get_content_from_template($url, $embedTemplate);
170
+
171
  // Replace all single quotes to double quotes. I.e: foo='joe' -> foo="joe"
172
  $parsedContent = str_replace( "'", '"', $parsedContent );
173
  $parsedContent = str_replace( "{provider_alias}", $provider_name , $parsedContent );
264
  ] );
265
  $embed = self::modify_spotify_content( $embed);
266
  $embed = apply_filters( 'embedpress:onAfterEmbed', $embed );
 
 
 
267
  return $embed;
268
  }
269
  }
614
  }
615
 
616
  protected static function get_content_from_template( $url, $template ) {
617
+ if ( is_embedpress_pro_active() ) {
618
+ if ( strpos( $url, 'podcasts.apple.com') ) {
619
+ $iframe_url = str_replace( 'podcasts.apple.com', 'embed.podcasts.apple.com', $url);
620
+ $html = '<iframe allow="autoplay *; encrypted-media *; fullscreen *" frameborder="0" height="175" style="width:100%;max-width:660px;overflow:hidden;background:transparent;" src="'.esc_url( $iframe_url).'"></iframe>';
621
+ return str_replace( '{html}', $html, $template );
622
+
623
+ }
624
+ }
625
+
626
  if ( strpos( $url, 'meetup.com') !== false ) {
627
  $html = '';
628
  }else{
EmbedPress/ThirdParty/Googlecalendar/Embedpress_Google_Helper.php CHANGED
@@ -476,8 +476,6 @@ class Embedpress_Google_Helper {
476
  * Helper function die with different kind of errors.
477
  */
478
  public static function embedpress_die($error = null) {
479
- error_log( 'got hittt in error');
480
- error_log( print_r( $error, 1));
481
  $backLink = '<br><br><a href="' . admin_url('admin.php?page=embedpress&page_type=google-calendar') . '">' . __('Back', 'embedpress') . '</a>';
482
  if (empty($error)) {
483
  wp_die(__('Unknown error', 'embedpress') . $backLink);
476
  * Helper function die with different kind of errors.
477
  */
478
  public static function embedpress_die($error = null) {
 
 
479
  $backLink = '<br><br><a href="' . admin_url('admin.php?page=embedpress&page_type=google-calendar') . '">' . __('Back', 'embedpress') . '</a>';
480
  if (empty($error)) {
481
  wp_die(__('Unknown error', 'embedpress') . $backLink);
Gutenberg/block-backend/block-embedpress.php CHANGED
@@ -14,13 +14,18 @@ function embedpress_render_block($attributes){
14
  'left' => 'alignleft',
15
  'right' => 'alignright',
16
  'wide' => 'alignwide',
17
- 'full' => 'alignfull'
 
18
  ];
19
- $alignment = isset($attributes['align']) && isset($aligns[$attributes['align']])?$aligns[$attributes['align']]:'';
 
 
 
 
20
  ob_start();
21
  ?>
22
- <div class="embedpress-gutenberg-wrapper <?php echo esc_attr($alignment) ?>">
23
- <div class="wp-block-embed__wrapper">
24
  <?php echo $embed; ?>
25
  </div>
26
  </div>
14
  'left' => 'alignleft',
15
  'right' => 'alignright',
16
  'wide' => 'alignwide',
17
+ 'full' => 'alignfull',
18
+ 'center' => 'aligncenter',
19
  ];
20
+ if ( isset($attributes['align']) ) {
21
+ $alignment = isset($aligns[$attributes['align']]) ? $aligns[$attributes['align']] .' clear' : '';
22
+ }else{
23
+ $alignment = 'aligncenter'; // default alignment is center in js, so keeping same here
24
+ }
25
  ob_start();
26
  ?>
27
+ <div class="embedpress-gutenberg-wrapper">
28
+ <div class="wp-block-embed__wrapper <?php echo esc_attr($alignment) ?>">
29
  <?php echo $embed; ?>
30
  </div>
31
  </div>
Gutenberg/dist/blocks.style.build.css CHANGED
@@ -1,4 +1,4 @@
1
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:0 !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-document-editmode .components-form-file-upload{display:none !important}
2
- .embedpress-gutenberg-wrapper{margin:30px auto}.embedpress-gutenberg-wrapper iframe{max-width:100%}.embedpress-gutenberg-wrapper.alignright{max-width:100%}.ose-the-new-york-times iframe{min-height:500px;max-height:100%}body.page .flexia-wrapper>.content-area{padding:0 !important}.flexia-wrapper.flexia-container>.content-area{margin:0 !important}.flexia-wrapper.flexia-container>.content-area .embedpress-gutenberg-wrapper{margin:0 auto}@media only screen and (min-width: 482px){.entry-content>.embedpress-gutenberg-wrapper.alignright,.entry-content>.embedpress-gutenberg-wrapper.alignleft,.embedpress-gutenberg-wrapper.alignright,.embedpress-gutenberg-wrapper.alignleft{max-width:100%}}.clear::after{content:'';display:block;clear:both;min-height:1px}
3
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:10px !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-embed-document{max-width:100%}.embedpress-document-editmode .components-form-file-upload{display:none !important}.wp-block-embedpress-embedpress-pdf+*{clear:both}
4
  .embedpress-calendar-gutenberg{margin:30px auto}.embedpress-calendar-gutenberg iframe{max-width:100%}.embedpress-calendar-gutenberg.alignright{max-width:100%}body.page .flexia-wrapper>.content-area{padding:0 !important}.flexia-wrapper.flexia-container>.content-area{margin:0 !important}.flexia-wrapper.flexia-container>.content-area .embedpress-calendar-gutenberg{margin:0 auto}@media only screen and (min-width: 482px){.entry-content>.embedpress-calendar-gutenberg.alignright,.entry-content>.embedpress-calendar-gutenberg.alignleft,.embedpress-calendar-gutenberg.alignright,.embedpress-calendar-gutenberg.alignleft{max-width:100%}}.clear::after{content:'';display:block;clear:both;min-height:1px}
1
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:0 !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-document-editmode .components-form-file-upload{display:none !important}
2
+ .embedpress-gutenberg-wrapper{margin:30px auto}.embedpress-gutenberg-wrapper iframe{max-width:100%}.embedpress-gutenberg-wrapper.alignright{max-width:100%}.ose-the-new-york-times iframe{min-height:500px;max-height:100%}body.page .flexia-wrapper>.content-area{padding:0 !important}.flexia-wrapper.flexia-container>.content-area{margin:0 !important}.flexia-wrapper.flexia-container>.content-area .embedpress-gutenberg-wrapper{margin:0 auto}@media only screen and (min-width: 482px){.entry-content>.embedpress-gutenberg-wrapper.alignright,.entry-content>.embedpress-gutenberg-wrapper.alignleft,.embedpress-gutenberg-wrapper.alignright,.embedpress-gutenberg-wrapper.alignleft{max-width:100%}}.clear::after{content:'';display:block;clear:both;min-height:1px}.embedpress-gutenberg-wrapper .alignleft,.embedpress-gutenberg-wrapper .alignright,.embedpress-gutenberg-wrapper .aligncenter{float:none;text-align:right}.embedpress-gutenberg-wrapper .alignleft{text-align:left}.embedpress-gutenberg-wrapper .aligncenter{clear:both;display:block;float:none;margin-right:auto;margin-left:auto;text-align:center}.embedpress-gutenberg-wrapper .ose-embedpress-responsive{display:inline-block}
3
  .pdfobject-container{height:600px;width:600px;margin:0 auto}.embedpress-el-powered{text-align:center;margin-top:10px !important;font-size:16px !important;font-weight:700}.embedpress-embed-document iframe,[data-type="embedpress/document"] iframe{margin:0 auto;display:block}.embedpress-embed-document{max-width:100%}.embedpress-document-editmode .components-form-file-upload{display:none !important}.wp-block-embedpress-embedpress-pdf+*{clear:both}
4
  .embedpress-calendar-gutenberg{margin:30px auto}.embedpress-calendar-gutenberg iframe{max-width:100%}.embedpress-calendar-gutenberg.alignright{max-width:100%}body.page .flexia-wrapper>.content-area{padding:0 !important}.flexia-wrapper.flexia-container>.content-area{margin:0 !important}.flexia-wrapper.flexia-container>.content-area .embedpress-calendar-gutenberg{margin:0 auto}@media only screen and (min-width: 482px){.entry-content>.embedpress-calendar-gutenberg.alignright,.entry-content>.embedpress-calendar-gutenberg.alignleft,.embedpress-calendar-gutenberg.alignright,.embedpress-calendar-gutenberg.alignleft{max-width:100%}}.clear::after{content:'';display:block;clear:both;min-height:1px}
embedpress.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: EmbedPress lets you embed videos, images, posts, audio, maps and upload PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 100+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.com
8
- * Version: 3.3.3
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
5
  * Description: EmbedPress lets you embed videos, images, posts, audio, maps and upload PDF, DOC, PPT & all other types of content into your WordPress site with one-click and showcase it beautifully for the visitors. 100+ sources supported.
6
  * Author: WPDeveloper
7
  * Author URI: https://wpdeveloper.com
8
+ * Version: 3.3.4
9
  * Text Domain: embedpress
10
  * Domain Path: /languages
11
  *
includes.php CHANGED
@@ -22,7 +22,7 @@ if ( ! defined('EMBEDPRESS_PLG_NAME')) {
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
- define('EMBEDPRESS_VERSION', "3.3.3");
26
  /**
27
  * @deprecated 2.2.0
28
  */
22
  }
23
 
24
  if ( ! defined('EMBEDPRESS_VERSION')) {
25
+ define('EMBEDPRESS_VERSION', "3.3.4");
26
  /**
27
  * @deprecated 2.2.0
28
  */
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: embed, embed youtube, gutenberg embed, pdf, doc, docs, ppt, elementor embe
6
  Requires at least: 4.6
7
  Tested up to: 5.9
8
  Requires PHP: 5.6
9
- Stable tag: 3.3.3
10
  License: GPLv3 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
@@ -382,6 +382,10 @@ Not at all. You can set up everything your team needs without any coding knowled
382
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
383
  and this project adheres to [Semantic Versioning](http://semver.org/).
384
 
 
 
 
 
385
  = [3.3.3] - 2022-01-20 =
386
  * Fixed: Facebook video content not showing issue.
387
  * Improvement: Google Calendar notices.
6
  Requires at least: 4.6
7
  Tested up to: 5.9
8
  Requires PHP: 5.6
9
+ Stable tag: 3.3.4
10
  License: GPLv3 or later
11
  License URI: https://opensource.org/licenses/GPL-3.0
12
 
382
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
383
  and this project adheres to [Semantic Versioning](http://semver.org/).
384
 
385
+ = [3.3.4] - 2022-02-14 =
386
+ * Fixed: Alignment issues for Gutenberg.
387
+ * Few minor bug fix and improvements.
388
+
389
  = [3.3.3] - 2022-01-20 =
390
  * Fixed: Facebook video content not showing issue.
391
  * Improvement: Google Calendar notices.