updated plugin Menu Icons
version 0.13.4
This commit is contained in:
@ -1,3 +1,28 @@
|
||||
##### [Version 3.2.37](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.36...v3.2.37) (2023-03-01)
|
||||
|
||||
Fix array casting
|
||||
|
||||
##### [Version 3.2.36](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.35...v3.2.36) (2023-03-01)
|
||||
|
||||
fix perfomance issues on attachments count https://github.com/Codeinwp/themeisle-sdk/issues/159
|
||||
|
||||
##### [Version 3.2.35](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.34...v3.2.35) (2023-02-22)
|
||||
|
||||
Added Codeinwp and wpshout feeds to dashboard widget
|
||||
|
||||
##### [Version 3.2.34](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.33...v3.2.34) (2023-01-31)
|
||||
|
||||
Improve promotions
|
||||
|
||||
##### [Version 3.2.33](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.32...v3.2.33) (2023-01-30)
|
||||
|
||||
* Adds PHP 8.2 compatibility
|
||||
* Update promotions
|
||||
|
||||
##### [Version 3.2.32](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.31...v3.2.32) (2022-11-30)
|
||||
|
||||
Release
|
||||
|
||||
##### [Version 3.2.31](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.30...v3.2.31) (2022-11-23)
|
||||
|
||||
- improve the promotions module
|
||||
|
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins'), 'version' => '4990ea029287f2766945');
|
||||
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '482f75f37b88f9ea2e79');
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
.ti-sdk-om-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;border-left-color:#3858e9;padding:0;position:relative}.ti-sdk-om-notice .content{align-items:center;background:hsla(0,0%,100%,.75);display:flex;padding:15px 20px}.ti-sdk-om-notice img{display:none;margin-right:20px;max-width:100px}.ti-sdk-om-notice .description{color:#000;font-size:14px;margin-bottom:20px}.ti-sdk-om-notice .actions{display:flex;gap:20px;margin-bottom:0;margin-top:auto}.ti-sdk-om-notice form{display:flex;gap:10px}.ti-sdk-om-notice .form-wrap{display:grid}.ti-sdk-om-notice .form-wrap span{font-weight:500;margin-bottom:5px}.ti-sdk-om-notice input{border-radius:0;min-width:250px}.ti-sdk-om-notice a.components-button{align-items:center;display:flex;justify-content:center}.ti-sdk-om-notice .done{align-items:flex-start;display:flex;flex-direction:column}.ti-sdk-om-notice .done a{width:auto}@media screen and (min-width:768px){.ti-sdk-om-notice img{display:block}}.compat-field-optimole th{display:none!important}.compat-field-optimole td{width:100%!important}.compat-field-optimole .ti-sdk-om-notice{margin:0}.om-notice-dismiss{position:absolute;right:10px;text-decoration:none!important;top:10px}.om-notice-dismiss:before{content:none}.ti-om-stack-wrap .om-stack-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;align-items:center;display:flex;flex-direction:column;padding:20px 10px;position:relative;text-align:center}.ti-om-stack-wrap .om-stack-notice>span{display:none}.ti-om-stack-wrap .om-stack-notice img{max-width:90px!important}.ti-om-stack-wrap .om-stack-notice h2{font-size:18px;font-weight:600;margin:30px auto 10px}.ti-om-stack-wrap .om-stack-notice p{font-size:13px;line-height:17px;margin:0 auto;max-width:250px}.ti-om-stack-wrap .om-stack-notice i{color:#757575;font-size:12px;margin-top:10px}.ti-om-stack-wrap .om-stack-notice .cta{margin:20px auto 0;padding:10px 25px!important}.ti-om-stack-wrap .om-stack-notice .om-notice-dismiss{color:inherit}.ti-om-stack-wrap .om-stack-notice input{border-radius:0}.ti-om-stack-wrap .om-stack-notice form{display:grid;gap:10px;margin-top:10px;place-items:center;width:75%}.ti-om-stack-wrap .om-stack-notice .done{display:grid;gap:10px;margin-top:15px}.ti-om-stack-wrap .om-stack-notice .done p{font-size:15px;font-weight:500}.ti-om-stack-wrap .om-stack-notice .om-progress{margin:20px 0}.om-progress{align-items:center;display:flex;font-size:14px;gap:5px}.om-progress .spin{animation:om-rotation 2s linear infinite}@keyframes om-rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.ti-sdk-om-promo.hidden{display:none}
|
||||
.ti-sdk-om-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;border-left-color:#3858e9;padding:0;position:relative}.ti-sdk-om-notice .content{align-items:center;background:hsla(0,0%,100%,.75);display:flex;padding:15px 20px}.ti-sdk-om-notice img{display:none;margin-right:20px;max-width:100px}.ti-sdk-om-notice .description{color:#000;font-size:14px;margin-bottom:20px}.ti-sdk-om-notice .actions{display:flex;gap:20px;margin-bottom:0;margin-top:auto}.ti-sdk-om-notice form{align-items:center;display:flex;gap:10px}.ti-sdk-om-notice .form-wrap{display:grid}.ti-sdk-om-notice .form-wrap span:not(.dashicons){font-weight:500;margin-bottom:5px}.ti-sdk-om-notice input{border-radius:0;min-width:250px}.ti-sdk-om-notice a.components-button{align-items:center;display:flex;justify-content:center}.ti-sdk-om-notice .is-link{align-items:center;display:flex;text-decoration:none}.ti-sdk-om-notice .is-link span{line-height:normal}.ti-sdk-om-notice .dashicons{margin-right:2px;text-decoration:none}.ti-sdk-om-notice .done{align-items:flex-start;display:flex;flex-direction:column}.ti-sdk-om-notice .done a{width:auto}@media screen and (min-width:768px){.ti-sdk-om-notice img{display:block}}.compat-field-optimole th{display:none!important}.compat-field-optimole td{width:100%!important}.compat-field-optimole .ti-sdk-om-notice{margin:0}.om-notice-dismiss{position:absolute;right:10px;text-decoration:none!important;top:10px}.om-notice-dismiss:before{content:none}.ti-om-stack-wrap .om-stack-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;align-items:center;display:flex;flex-direction:column;padding:20px 10px;position:relative;text-align:center}.ti-om-stack-wrap .om-stack-notice>span{display:none}.ti-om-stack-wrap .om-stack-notice img{max-width:90px!important}.ti-om-stack-wrap .om-stack-notice h2{font-size:18px;font-weight:600;margin:30px auto 10px}.ti-om-stack-wrap .om-stack-notice p{font-size:13px;line-height:17px;margin:0 auto;max-width:250px}.ti-om-stack-wrap .om-stack-notice i{color:#757575;font-size:12px;margin-top:10px}.ti-om-stack-wrap .om-stack-notice .cta{margin:20px auto 0;padding:10px 25px!important}.ti-om-stack-wrap .om-stack-notice .om-notice-dismiss{color:inherit}.ti-om-stack-wrap .om-stack-notice input{border-radius:0}.ti-om-stack-wrap .om-stack-notice form{display:grid;gap:10px;margin-top:10px;place-items:center;width:75%}.ti-om-stack-wrap .om-stack-notice .done{display:grid;gap:10px;margin-top:15px}.ti-om-stack-wrap .om-stack-notice .done p{font-size:15px;font-weight:500}.ti-om-stack-wrap .om-stack-notice .om-progress{margin:20px 0}.block-editor-block-inspector .ti-om-stack-wrap{border-top:1px solid #e0e0e0}.om-progress{align-items:center;display:flex;font-size:14px;gap:5px}.om-progress .spin{animation:om-rotation 2s linear infinite}@keyframes om-rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.ti-sdk-om-promo.hidden{display:none}.media-sidebar .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.media-sidebar .ti-sdk-om-notice .description{margin-bottom:10px}.media-sidebar .ti-sdk-om-notice .content{padding:15px 10px}.media-sidebar .ti-sdk-om-notice .actions{gap:10px}.media-sidebar .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}.attachment-info .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.attachment-info .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}@media screen and (min-width:1200px){.attachment-info .ti-sdk-om-notice form{flex-wrap:unset}}
|
||||
|
@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
return;
|
||||
}
|
||||
// Current SDK version and path.
|
||||
$themeisle_sdk_version = '3.2.31';
|
||||
$themeisle_sdk_version = '3.2.37';
|
||||
$themeisle_sdk_path = dirname( __FILE__ );
|
||||
|
||||
global $themeisle_sdk_max_version;
|
||||
|
@ -81,6 +81,8 @@ class Dashboard_Widget extends Abstract_Module {
|
||||
'themeisle_sdk_dashboard_widget_feeds',
|
||||
[
|
||||
'https://themeisle.com/blog/feed',
|
||||
'https://www.codeinwp.com/blog/feed',
|
||||
'https://wpshout.com/feed',
|
||||
]
|
||||
);
|
||||
add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) );
|
||||
@ -319,7 +321,8 @@ class Dashboard_Widget extends Abstract_Module {
|
||||
}
|
||||
|
||||
$items = $feed->get_items( 0, 5 );
|
||||
foreach ( (array) $items as $item ) {
|
||||
$items = is_array( $items ) ? $items : [];
|
||||
foreach ( $items as $item ) {
|
||||
$items_normalized[] = array(
|
||||
'title' => $item->get_title(),
|
||||
'date' => $item->get_date( 'U' ),
|
||||
|
@ -265,19 +265,23 @@ class Promotions extends Abstract_Module {
|
||||
|
||||
$all = [
|
||||
'optimole' => [
|
||||
'om-editor' => [
|
||||
'om-editor' => [
|
||||
'env' => ! $has_optimole && $is_min_req_v && ! $had_optimole_from_promo,
|
||||
'screen' => 'editor',
|
||||
],
|
||||
'om-attachment' => [
|
||||
'env' => ! $has_optimole && ! $had_optimole_from_promo,
|
||||
'screen' => 'media',
|
||||
'om-image-block' => [
|
||||
'env' => ! $has_optimole && $is_min_req_v && ! $had_optimole_from_promo,
|
||||
'screen' => 'editor',
|
||||
],
|
||||
'om-media' => [
|
||||
'om-attachment' => [
|
||||
'env' => ! $has_optimole && ! $had_optimole_from_promo,
|
||||
'screen' => 'media-editor',
|
||||
],
|
||||
'om-media' => [
|
||||
'env' => ! $has_optimole && ! $had_optimole_from_promo && $has_enough_attachments,
|
||||
'screen' => 'media',
|
||||
],
|
||||
'om-elementor' => [
|
||||
'om-elementor' => [
|
||||
'env' => ! $has_optimole && ! $had_optimole_from_promo && defined( 'ELEMENTOR_VERSION' ),
|
||||
'screen' => 'elementor',
|
||||
],
|
||||
@ -373,6 +377,11 @@ class Promotions extends Abstract_Module {
|
||||
foreach ( $this->promotions as $slug => $promos ) {
|
||||
foreach ( $promos as $key => $data ) {
|
||||
switch ( $data['screen'] ) {
|
||||
case 'media-editor':
|
||||
if ( ! $is_media && ! $is_editor ) {
|
||||
unset( $this->promotions[ $slug ][ $key ] );
|
||||
}
|
||||
break;
|
||||
case 'media':
|
||||
if ( ! $is_media ) {
|
||||
unset( $this->promotions[ $slug ][ $key ] );
|
||||
@ -417,6 +426,7 @@ class Promotions extends Abstract_Module {
|
||||
|
||||
switch ( $slug ) {
|
||||
case 'om-editor':
|
||||
case 'om-image-block':
|
||||
case 'blocks-css':
|
||||
case 'blocks-animation':
|
||||
case 'blocks-conditions':
|
||||
@ -508,6 +518,7 @@ class Promotions extends Abstract_Module {
|
||||
$fields['optimole'] = array(
|
||||
'input' => 'html',
|
||||
'html' => '<div id="ti-optml-notice-helper"></div>',
|
||||
'label' => '',
|
||||
);
|
||||
|
||||
if ( count( $fields ) < 2 ) {
|
||||
@ -551,7 +562,22 @@ class Promotions extends Abstract_Module {
|
||||
if ( $this->debug ) {
|
||||
return true;
|
||||
}
|
||||
$attachment_count = get_transient( 'tsk_attachment_count' );
|
||||
if ( false === $attachment_count ) {
|
||||
$args = array(
|
||||
'post_type' => 'attachment',
|
||||
'posts_per_page' => 51,
|
||||
'fields' => 'ids',
|
||||
'post_status' => 'inherit',
|
||||
'no_found_rows' => true,
|
||||
);
|
||||
|
||||
return array_sum( (array) wp_count_attachments( 'image' ) ) > 50;
|
||||
$query = new \WP_Query( $args );
|
||||
$attachment_count = $query->post_count;
|
||||
|
||||
|
||||
set_transient( 'tsk_attachment_count', $attachment_count, DAY_IN_SECONDS );
|
||||
}
|
||||
return $attachment_count > 50;
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,12 @@ class Product {
|
||||
* @var string $key The product ready key.
|
||||
*/
|
||||
private $key;
|
||||
/**
|
||||
* Author URL
|
||||
*
|
||||
* @var string $author_url The author url.
|
||||
*/
|
||||
private $author_url;
|
||||
/**
|
||||
* Product store url.
|
||||
*
|
||||
|
Reference in New Issue
Block a user