Version Description
Download this release
Release Info
| Developer | wpdevteam |
| Plugin | |
| Version | 3.4.3 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.2 to 3.4.3
- EmbedPress/Includes/Classes/EmbedPress_Plugin_Usage_Tracker.php +7 -1
- EmbedPress/Includes/Traits/Shared.php +1 -8
- embedpress.php +1 -1
- includes.php +4 -1
- readme.txt +5 -1
- vendor/composer/installed.json +4 -4
- vendor/composer/installed.php +3 -3
- vendor/priyomukul/wp-notice/src/Dismiss.php +1 -1
- vendor/priyomukul/wp-notice/src/Notice.php +35 -6
EmbedPress/Includes/Classes/EmbedPress_Plugin_Usage_Tracker.php
CHANGED
|
@@ -659,7 +659,7 @@ if( ! class_exists('EmbedPress_Plugin_Usage_Tracker') ) :
|
|
| 659 |
* Responsible for track the click from Notice.
|
| 660 |
* @return void
|
| 661 |
*/
|
| 662 |
-
public function clicked(){
|
| 663 |
if( isset( $_GET['plugin'] ) && trim($_GET['plugin']) === $this->plugin_name && isset( $_GET['plugin_action'] ) ) {
|
| 664 |
if( isset( $_GET['tab'] ) && $_GET['tab'] === 'plugin-information' ) {
|
| 665 |
return;
|
|
@@ -671,6 +671,9 @@ if( ! class_exists('EmbedPress_Plugin_Usage_Tracker') ) :
|
|
| 671 |
$this->set_is_tracking_allowed( true, $plugin );
|
| 672 |
if( $this->do_tracking( true ) ) {
|
| 673 |
$this->update_block_notice( $plugin );
|
|
|
|
|
|
|
|
|
|
| 674 |
}
|
| 675 |
/**
|
| 676 |
* Redirect User To the Current URL, but without set query arguments.
|
|
@@ -679,6 +682,9 @@ if( ! class_exists('EmbedPress_Plugin_Usage_Tracker') ) :
|
|
| 679 |
} else {
|
| 680 |
$this->set_is_tracking_allowed( false, $plugin );
|
| 681 |
$this->update_block_notice( $plugin );
|
|
|
|
|
|
|
|
|
|
| 682 |
}
|
| 683 |
}
|
| 684 |
}
|
| 659 |
* Responsible for track the click from Notice.
|
| 660 |
* @return void
|
| 661 |
*/
|
| 662 |
+
public function clicked( $notice = null ){
|
| 663 |
if( isset( $_GET['plugin'] ) && trim($_GET['plugin']) === $this->plugin_name && isset( $_GET['plugin_action'] ) ) {
|
| 664 |
if( isset( $_GET['tab'] ) && $_GET['tab'] === 'plugin-information' ) {
|
| 665 |
return;
|
| 671 |
$this->set_is_tracking_allowed( true, $plugin );
|
| 672 |
if( $this->do_tracking( true ) ) {
|
| 673 |
$this->update_block_notice( $plugin );
|
| 674 |
+
if( ! is_null ( $notice ) ) {
|
| 675 |
+
$notice->dismiss->dismiss_notice();
|
| 676 |
+
}
|
| 677 |
}
|
| 678 |
/**
|
| 679 |
* Redirect User To the Current URL, but without set query arguments.
|
| 682 |
} else {
|
| 683 |
$this->set_is_tracking_allowed( false, $plugin );
|
| 684 |
$this->update_block_notice( $plugin );
|
| 685 |
+
if( ! is_null ( $notice ) ) {
|
| 686 |
+
$notice->dismiss->dismiss_notice();
|
| 687 |
+
}
|
| 688 |
}
|
| 689 |
}
|
| 690 |
}
|
EmbedPress/Includes/Traits/Shared.php
CHANGED
|
@@ -117,13 +117,9 @@ trait Shared {
|
|
| 117 |
]
|
| 118 |
);
|
| 119 |
|
| 120 |
-
ob_start();
|
| 121 |
-
$this->insights->notice();
|
| 122 |
-
$opt_in_content = ob_get_clean();
|
| 123 |
-
|
| 124 |
$notices->add(
|
| 125 |
'optin',
|
| 126 |
-
$
|
| 127 |
[
|
| 128 |
'start' => $notices->strtotime( '+20 day' ),
|
| 129 |
'recurrence' => 30,
|
|
@@ -131,9 +127,6 @@ trait Shared {
|
|
| 131 |
'display_if' => ! is_array( $notices->is_installed( 'embedpress-pro/embedpress-pro.php' ) )
|
| 132 |
]
|
| 133 |
);
|
| 134 |
-
if( ! empty( $opt_in_content ) ) {
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
|
| 138 |
$notices->init();
|
| 139 |
|
| 117 |
]
|
| 118 |
);
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
$notices->add(
|
| 121 |
'optin',
|
| 122 |
+
[$this->insights, 'notice'],
|
| 123 |
[
|
| 124 |
'start' => $notices->strtotime( '+20 day' ),
|
| 125 |
'recurrence' => 30,
|
| 127 |
'display_if' => ! is_array( $notices->is_installed( 'embedpress-pro/embedpress-pro.php' ) )
|
| 128 |
]
|
| 129 |
);
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
$notices->init();
|
| 132 |
|
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.4.
|
| 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.4.3
|
| 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.4.
|
| 26 |
/**
|
| 27 |
* @deprecated 2.2.0
|
| 28 |
*/
|
|
@@ -106,6 +106,9 @@ function is_embedpress_pro_active() {
|
|
| 106 |
*/
|
| 107 |
function get_embedpress_pro_version() {
|
| 108 |
if ( is_embedpress_pro_active() ) {
|
|
|
|
|
|
|
|
|
|
| 109 |
$p = wp_get_active_and_valid_plugins();
|
| 110 |
$p = array_filter( $p, function ( $plugin){
|
| 111 |
return !empty( strpos( $plugin, 'embedpress-pro'));
|
| 22 |
}
|
| 23 |
|
| 24 |
if ( ! defined('EMBEDPRESS_VERSION')) {
|
| 25 |
+
define('EMBEDPRESS_VERSION', "3.4.3");
|
| 26 |
/**
|
| 27 |
* @deprecated 2.2.0
|
| 28 |
*/
|
| 106 |
*/
|
| 107 |
function get_embedpress_pro_version() {
|
| 108 |
if ( is_embedpress_pro_active() ) {
|
| 109 |
+
if(defined('EMBEDPRESS_PRO_PLUGIN_VERSION')){
|
| 110 |
+
return EMBEDPRESS_PRO_PLUGIN_VERSION;
|
| 111 |
+
}
|
| 112 |
$p = wp_get_active_and_valid_plugins();
|
| 113 |
$p = array_filter( $p, function ( $plugin){
|
| 114 |
return !empty( strpos( $plugin, 'embedpress-pro'));
|
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: 6.0
|
| 8 |
Requires PHP: 5.6
|
| 9 |
-
Stable tag: 3.4.
|
| 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.4.2] - 2022-06-30 =
|
| 386 |
* Fixed: Hight-Width wasn’t working with WordPress default themes in Gutenberg.
|
| 387 |
* Fixed: Theme dependency with EmbedPress block in Gutenberg.
|
| 6 |
Requires at least: 4.6
|
| 7 |
Tested up to: 6.0
|
| 8 |
Requires PHP: 5.6
|
| 9 |
+
Stable tag: 3.4.3
|
| 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.4.3] - 2022-06-30 =
|
| 386 |
+
* Fixed: Stopped working in Multisite Environment.
|
| 387 |
+
* Few minor bug fix and improvements.
|
| 388 |
+
|
| 389 |
= [3.4.2] - 2022-06-30 =
|
| 390 |
* Fixed: Hight-Width wasn’t working with WordPress default themes in Gutenberg.
|
| 391 |
* Fixed: Theme dependency with EmbedPress block in Gutenberg.
|
vendor/composer/installed.json
CHANGED
|
@@ -7,15 +7,15 @@
|
|
| 7 |
"source": {
|
| 8 |
"type": "git",
|
| 9 |
"url": "git@github.com:priyomukul/wp-notice.git",
|
| 10 |
-
"reference": "
|
| 11 |
},
|
| 12 |
"dist": {
|
| 13 |
"type": "zip",
|
| 14 |
-
"url": "https://api.github.com/repos/priyomukul/wp-notice/zipball/
|
| 15 |
-
"reference": "
|
| 16 |
"shasum": ""
|
| 17 |
},
|
| 18 |
-
"time": "2022-
|
| 19 |
"default-branch": true,
|
| 20 |
"type": "library",
|
| 21 |
"installation-source": "dist",
|
| 7 |
"source": {
|
| 8 |
"type": "git",
|
| 9 |
"url": "git@github.com:priyomukul/wp-notice.git",
|
| 10 |
+
"reference": "83de1a5ccd2e8492b36459d4a7e3211fe999ee9c"
|
| 11 |
},
|
| 12 |
"dist": {
|
| 13 |
"type": "zip",
|
| 14 |
+
"url": "https://api.github.com/repos/priyomukul/wp-notice/zipball/83de1a5ccd2e8492b36459d4a7e3211fe999ee9c",
|
| 15 |
+
"reference": "83de1a5ccd2e8492b36459d4a7e3211fe999ee9c",
|
| 16 |
"shasum": ""
|
| 17 |
},
|
| 18 |
+
"time": "2022-07-03T11:59:29+00:00",
|
| 19 |
"default-branch": true,
|
| 20 |
"type": "library",
|
| 21 |
"installation-source": "dist",
|
vendor/composer/installed.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
'type' => 'wordpress-plugin',
|
| 6 |
'install_path' => __DIR__ . '/../../',
|
| 7 |
'aliases' => array(),
|
| 8 |
-
'reference' => '
|
| 9 |
'name' => 'embedpress/embedpress',
|
| 10 |
'dev' => true,
|
| 11 |
),
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
'type' => 'wordpress-plugin',
|
| 17 |
'install_path' => __DIR__ . '/../../',
|
| 18 |
'aliases' => array(),
|
| 19 |
-
'reference' => '
|
| 20 |
'dev_requirement' => false,
|
| 21 |
),
|
| 22 |
'priyomukul/wp-notice' => array(
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
'aliases' => array(
|
| 28 |
0 => '9999999-dev',
|
| 29 |
),
|
| 30 |
-
'reference' => '
|
| 31 |
'dev_requirement' => false,
|
| 32 |
),
|
| 33 |
'wpdevelopers/embera' => array(
|
| 5 |
'type' => 'wordpress-plugin',
|
| 6 |
'install_path' => __DIR__ . '/../../',
|
| 7 |
'aliases' => array(),
|
| 8 |
+
'reference' => 'd2ffe0de0b676a68c3534f11ed7839d518068eab',
|
| 9 |
'name' => 'embedpress/embedpress',
|
| 10 |
'dev' => true,
|
| 11 |
),
|
| 16 |
'type' => 'wordpress-plugin',
|
| 17 |
'install_path' => __DIR__ . '/../../',
|
| 18 |
'aliases' => array(),
|
| 19 |
+
'reference' => 'd2ffe0de0b676a68c3534f11ed7839d518068eab',
|
| 20 |
'dev_requirement' => false,
|
| 21 |
),
|
| 22 |
'priyomukul/wp-notice' => array(
|
| 27 |
'aliases' => array(
|
| 28 |
0 => '9999999-dev',
|
| 29 |
),
|
| 30 |
+
'reference' => '83de1a5ccd2e8492b36459d4a7e3211fe999ee9c',
|
| 31 |
'dev_requirement' => false,
|
| 32 |
),
|
| 33 |
'wpdevelopers/embera' => array(
|
vendor/priyomukul/wp-notice/src/Dismiss.php
CHANGED
|
@@ -127,7 +127,7 @@ class Dismiss extends Base {
|
|
| 127 |
* @since 1.0
|
| 128 |
* @return void
|
| 129 |
*/
|
| 130 |
-
|
| 131 |
if ( 'user' === $this->scope ) {
|
| 132 |
return $this->app->storage()->save_meta( $this->id );
|
| 133 |
}
|
| 127 |
* @since 1.0
|
| 128 |
* @return void
|
| 129 |
*/
|
| 130 |
+
public function dismiss_notice() {
|
| 131 |
if ( 'user' === $this->scope ) {
|
| 132 |
return $this->app->storage()->save_meta( $this->id );
|
| 133 |
}
|
vendor/priyomukul/wp-notice/src/Notice.php
CHANGED
|
@@ -44,7 +44,6 @@ class Notice extends Base {
|
|
| 44 |
public function __construct( ...$args ){
|
| 45 |
list( $id, $content, $options, $queue, $app ) = $args;
|
| 46 |
|
| 47 |
-
|
| 48 |
$this->app = $app;
|
| 49 |
$this->id = $id;
|
| 50 |
$this->content = $content;
|
|
@@ -67,25 +66,48 @@ class Notice extends Base {
|
|
| 67 |
} else {
|
| 68 |
$this->options = wp_parse_args( $queue[ $id ], $this->options );
|
| 69 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
}
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
public function display( $force = false ){
|
| 74 |
if ( ! $force && ! $this->show() ) {
|
| 75 |
return;
|
| 76 |
}
|
|
|
|
|
|
|
| 77 |
|
| 78 |
// Print the notice.
|
| 79 |
printf(
|
| 80 |
'<div style="display: grid; grid-template-columns: 50px 1fr; align-items: center;" id="%1$s" class="%2$s">%3$s<div class="wpnotice-content-wrapper">%4$s%5$s</div></div>',
|
| 81 |
'wpnotice-' . esc_attr( $this->app->app ) . '-' . esc_attr( $this->id ), // The ID.
|
| 82 |
esc_attr( $this->get_classes() ), // The classes.
|
| 83 |
-
! empty( $
|
| 84 |
-
! empty( $
|
| 85 |
-
! empty( $
|
| 86 |
);
|
| 87 |
}
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
// 'later' => array(
|
| 90 |
// 'link' => 'https://wpdeveloper.com/review-notificationx',
|
| 91 |
// 'target' => '_blank',
|
|
@@ -121,8 +143,15 @@ class Notice extends Base {
|
|
| 121 |
|
| 122 |
public function attributes( $params = [] ){
|
| 123 |
$_attr = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
-
$_attr[] = 'class="dismiss-btn"';
|
| 126 |
$_attr[] = 'target="_blank"';
|
| 127 |
if( ! empty( $params ) ) {
|
| 128 |
foreach( $params as $key => $value ) {
|
|
@@ -244,7 +273,7 @@ class Notice extends Base {
|
|
| 244 |
|
| 245 |
public function __call( $name, $args ){
|
| 246 |
if( property_exists( $this, $name ) ) {
|
| 247 |
-
return $this
|
| 248 |
}
|
| 249 |
}
|
| 250 |
|
| 44 |
public function __construct( ...$args ){
|
| 45 |
list( $id, $content, $options, $queue, $app ) = $args;
|
| 46 |
|
|
|
|
| 47 |
$this->app = $app;
|
| 48 |
$this->id = $id;
|
| 49 |
$this->content = $content;
|
| 66 |
} else {
|
| 67 |
$this->options = wp_parse_args( $queue[ $id ], $this->options );
|
| 68 |
}
|
| 69 |
+
|
| 70 |
+
if( isset( $this->options['do_action'] ) ) {
|
| 71 |
+
add_action( 'admin_init', [ $this, 'do_action' ] );
|
| 72 |
+
}
|
| 73 |
}
|
| 74 |
|
| 75 |
+
public function do_action(){
|
| 76 |
+
do_action( $this->options['do_action'], $this );
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
private function get_content(){
|
| 80 |
+
if(is_callable($this->content)){
|
| 81 |
+
ob_start();
|
| 82 |
+
call_user_func($this->content);
|
| 83 |
+
$opt_in_content = ob_get_clean();
|
| 84 |
+
return $opt_in_content;
|
| 85 |
+
}
|
| 86 |
+
return $this->content;
|
| 87 |
+
}
|
| 88 |
|
| 89 |
public function display( $force = false ){
|
| 90 |
if ( ! $force && ! $this->show() ) {
|
| 91 |
return;
|
| 92 |
}
|
| 93 |
+
$content = $this->get_content();
|
| 94 |
+
$links = $this->get_links();
|
| 95 |
|
| 96 |
// Print the notice.
|
| 97 |
printf(
|
| 98 |
'<div style="display: grid; grid-template-columns: 50px 1fr; align-items: center;" id="%1$s" class="%2$s">%3$s<div class="wpnotice-content-wrapper">%4$s%5$s</div></div>',
|
| 99 |
'wpnotice-' . esc_attr( $this->app->app ) . '-' . esc_attr( $this->id ), // The ID.
|
| 100 |
esc_attr( $this->get_classes() ), // The classes.
|
| 101 |
+
! empty( $content['thumbnail'] ) ? $this->get_thumbnail( $content['thumbnail'] ) : '',
|
| 102 |
+
! empty( $content['html'] ) ? $content['html'] : $content,
|
| 103 |
+
! empty( $links ) ? $this->links( $links ) : ''
|
| 104 |
);
|
| 105 |
}
|
| 106 |
|
| 107 |
+
public function get_links(){
|
| 108 |
+
return ! empty( $this->content['links'] ) ? $this->content['links'] : ( ! empty( $this->options['links'] ) ? $this->options['links'] : []);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
// 'later' => array(
|
| 112 |
// 'link' => 'https://wpdeveloper.com/review-notificationx',
|
| 113 |
// 'target' => '_blank',
|
| 143 |
|
| 144 |
public function attributes( $params = [] ){
|
| 145 |
$_attr = [];
|
| 146 |
+
$classname = 'dismiss-btn ';
|
| 147 |
+
|
| 148 |
+
if( ! empty( $params['class'] ) ) {
|
| 149 |
+
$classname .= $params['class'];
|
| 150 |
+
unset( $params['class'] );
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
$_attr[] = 'class="' . esc_attr( $classname ) . '"';
|
| 154 |
|
|
|
|
| 155 |
$_attr[] = 'target="_blank"';
|
| 156 |
if( ! empty( $params ) ) {
|
| 157 |
foreach( $params as $key => $value ) {
|
| 273 |
|
| 274 |
public function __call( $name, $args ){
|
| 275 |
if( property_exists( $this, $name ) ) {
|
| 276 |
+
return $this->{$name}[ $args[0] ];
|
| 277 |
}
|
| 278 |
}
|
| 279 |
|
