updated plugin Menu Icons
version 0.13.4
This commit is contained in:
@ -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