updated plugin `Menu Icons` version 0.13.4

This commit is contained in:
KawaiiPunk 2023-03-17 22:34:22 +00:00 committed by Gitium
parent 1e9ac45ec6
commit c93c03b346
18 changed files with 161 additions and 74 deletions

View File

@ -1,3 +1,12 @@
##### [Version 0.13.4](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.3...v0.13.4) (2023-03-01)
Update dependencies
##### [Version 0.13.3](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.2...v0.13.3) (2023-02-25)
- Fix img width/height value, props @Htbaa
- Update dependencies
##### [Version 0.13.2](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.1...v0.13.2) (2022-11-24)
* Fix - update dependencies

View File

@ -481,10 +481,10 @@ final class Menu_Icons_Front_End {
}
}
if ( ! empty( $width ) ) {
$width = sprintf( ' width="%dpx"', $width );
$width = sprintf( ' width="%d"', $width );
}
if ( ! empty( $height ) ) {
$height = sprintf( ' height="%dpx"', $height );
$height = sprintf( ' height="%d"', $height );
}
$image_alt = get_post_meta( $meta['icon'], '_wp_attachment_image_alt', true );
$image_alt = $image_alt ? wp_strip_all_tags( $image_alt ) : '';

View File

@ -11,7 +11,7 @@
* Plugin name: Menu Icons
* Plugin URI: https://github.com/Codeinwp/wp-menu-icons
* Description: Spice up your navigation menus with pretty icons, easily.
* Version: 0.13.2
* Version: 0.13.4
* Author: ThemeIsle
* Author URI: https://themeisle.com
* License: GPLv2
@ -29,7 +29,7 @@ final class Menu_Icons {
const DISMISS_NOTICE = 'menu-icons-dismiss-notice';
const VERSION = '0.13.2';
const VERSION = '0.13.4';
/**
* Holds plugin data

View File

@ -225,6 +225,21 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
== Changelog ==
##### [Version 0.13.4](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.3...v0.13.4) (2023-03-01)
Update dependencies
##### [Version 0.13.3](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.2...v0.13.3) (2023-02-25)
- Fix img width/height value, props @Htbaa
- Update dependencies
##### [Version 0.13.2](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.1...v0.13.2) (2022-11-24)
* Fix - update dependencies

View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderIniteaa5284efc067d9aba27d7d8f1a0b978::getLoader();
return ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7::getLoader();

View File

@ -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

View File

@ -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

View File

@ -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}}

View File

@ -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;

View File

@ -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' ),

View File

@ -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;
}
}

View File

@ -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.
*

View File

@ -42,6 +42,9 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir;
@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
@ -425,7 +429,8 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
@ -555,18 +560,26 @@ class ClassLoader
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderIniteaa5284efc067d9aba27d7d8f1a0b978
class ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7
{
private static $loader;
@ -22,34 +22,27 @@ class ComposerAutoloaderIniteaa5284efc067d9aba27d7d8f1a0b978
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderIniteaa5284efc067d9aba27d7d8f1a0b978', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderIniteaa5284efc067d9aba27d7d8f1a0b978', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticIniteaa5284efc067d9aba27d7d8f1a0b978::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::getInitializer($loader));
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticIniteaa5284efc067d9aba27d7d8f1a0b978::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireeaa5284efc067d9aba27d7d8f1a0b978($fileIdentifier, $file);
$filesToLoad = \Composer\Autoload\ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequireeaa5284efc067d9aba27d7d8f1a0b978($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticIniteaa5284efc067d9aba27d7d8f1a0b978
class ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7
{
public static $files = array (
'2c2d2fe92db4cd03403dbb108ac263b7' => __DIR__ . '/..' . '/codeinwp/gutenberg-menu-icons/load.php',
@ -20,7 +20,7 @@ class ComposerStaticIniteaa5284efc067d9aba27d7d8f1a0b978
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->classMap = ComposerStaticIniteaa5284efc067d9aba27d7d8f1a0b978::$classMap;
$loader->classMap = ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::$classMap;
}, null, ClassLoader::class);
}

View File

@ -139,24 +139,23 @@
},
{
"name": "codeinwp/themeisle-sdk",
"version": "dev-master",
"version_normalized": "dev-master",
"version": "3.2.37",
"version_normalized": "3.2.37.0",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
"reference": "04ab7589bf32dbfddbf66bbb69bb0ab2eb8d7c27"
"reference": "a2079ee8cea68b5dbaabec1e06f15048ae9c9de7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/04ab7589bf32dbfddbf66bbb69bb0ab2eb8d7c27",
"reference": "04ab7589bf32dbfddbf66bbb69bb0ab2eb8d7c27",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/a2079ee8cea68b5dbaabec1e06f15048ae9c9de7",
"reference": "a2079ee8cea68b5dbaabec1e06f15048ae9c9de7",
"shasum": ""
},
"require-dev": {
"codeinwp/phpcs-ruleset": "dev-main"
},
"time": "2022-11-23T11:35:13+00:00",
"default-branch": true,
"time": "2023-03-01T18:02:16+00:00",
"type": "library",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@ -177,7 +176,7 @@
],
"support": {
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.31"
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.37"
},
"install-path": "../codeinwp/themeisle-sdk"
}

View File

@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'codeinwp/wp-menu-icons',
'pretty_version' => 'v0.13.2',
'version' => '0.13.2.0',
'reference' => '3d2b34af71c45d63cea043054a93e7df346b4d1e',
'pretty_version' => 'v0.13.4',
'version' => '0.13.4.0',
'reference' => '8ea03e3323f7f4c4a6d07bd33f3a305b46cc1fbe',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -42,20 +42,18 @@
'dev_requirement' => false,
),
'codeinwp/themeisle-sdk' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '04ab7589bf32dbfddbf66bbb69bb0ab2eb8d7c27',
'pretty_version' => '3.2.37',
'version' => '3.2.37.0',
'reference' => 'a2079ee8cea68b5dbaabec1e06f15048ae9c9de7',
'type' => 'library',
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
'aliases' => array(
0 => '9999999-dev',
),
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/wp-menu-icons' => array(
'pretty_version' => 'v0.13.2',
'version' => '0.13.2.0',
'reference' => '3d2b34af71c45d63cea043054a93e7df346b4d1e',
'pretty_version' => 'v0.13.4',
'version' => '0.13.4.0',
'reference' => '8ea03e3323f7f4c4a6d07bd33f3a305b46cc1fbe',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),