diff --git a/wp-content/plugins/menu-icons/CHANGELOG.md b/wp-content/plugins/menu-icons/CHANGELOG.md
index f249106b..254a79ee 100644
--- a/wp-content/plugins/menu-icons/CHANGELOG.md
+++ b/wp-content/plugins/menu-icons/CHANGELOG.md
@@ -1,5 +1,16 @@
+##### [Version 0.12.8](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.7...v0.12.8) (2021-05-12)
- ### v0.12.5 - 2020-08-18
+* Fix issue when the image is not accessible to fetch the width/height metadata.
+
+##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
+
+Fix PHP fatal error when uploading SVG with the image uploader
+
+##### [Version 0.12.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.5...v0.12.6) (2021-05-05)
+
+* Adds explicit width/height to icons to prevent layout shifts issues
+
+### v0.12.5 - 2020-08-18
**Changes:**
### v0.12.4 - 2020-07-13
@@ -46,4 +57,3 @@
**Changes:**
* Change ownership to ThemeIsle.
* Improves compatibility with various ThemeIsle products.
-
diff --git a/wp-content/plugins/menu-icons/CONTRIBUTING.md b/wp-content/plugins/menu-icons/CONTRIBUTING.md
new file mode 100644
index 00000000..36b5b5b1
--- /dev/null
+++ b/wp-content/plugins/menu-icons/CONTRIBUTING.md
@@ -0,0 +1,13 @@
+## Releasing
+
+This repository uses conventional [changelog commit](https://github.com/Codeinwp/conventional-changelog-simple-preset) messages to trigger release
+
+How to release a new version:
+
+- Clone the master branch
+- Do your changes
+- Send a PR to master and merge it using the following subject message
+ - `release: ` - for patch release
+ - `release(minor): ` - for minor release
+ - `release(major): ` - for major release
+ The release notes will inherit the body of the commit message which triggered the release. For more details check the [simple-preset](https://github.com/Codeinwp/conventional-changelog-simple-preset) that we use.
\ No newline at end of file
diff --git a/wp-content/plugins/menu-icons/assets/banner-1544x500.jpg b/wp-content/plugins/menu-icons/assets/banner-1544x500.jpg
deleted file mode 100644
index 3a10b5c2..00000000
Binary files a/wp-content/plugins/menu-icons/assets/banner-1544x500.jpg and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/banner-772x250.jpg b/wp-content/plugins/menu-icons/assets/banner-772x250.jpg
deleted file mode 100644
index 3a10b5c2..00000000
Binary files a/wp-content/plugins/menu-icons/assets/banner-772x250.jpg and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-1.png b/wp-content/plugins/menu-icons/assets/screenshot-1.png
deleted file mode 100644
index 94c255d1..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-1.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-2.png b/wp-content/plugins/menu-icons/assets/screenshot-2.png
deleted file mode 100644
index 9e1d6b7f..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-2.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-3.png b/wp-content/plugins/menu-icons/assets/screenshot-3.png
deleted file mode 100644
index 0adbd96c..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-3.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-4.png b/wp-content/plugins/menu-icons/assets/screenshot-4.png
deleted file mode 100644
index e3baa44f..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-4.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-5.png b/wp-content/plugins/menu-icons/assets/screenshot-5.png
deleted file mode 100644
index 2c899acb..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-5.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-6.png b/wp-content/plugins/menu-icons/assets/screenshot-6.png
deleted file mode 100644
index 1dc1760b..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-6.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-7.png b/wp-content/plugins/menu-icons/assets/screenshot-7.png
deleted file mode 100644
index 2e4565dd..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-7.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/assets/screenshot-8.png b/wp-content/plugins/menu-icons/assets/screenshot-8.png
deleted file mode 100644
index 165b1a17..00000000
Binary files a/wp-content/plugins/menu-icons/assets/screenshot-8.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/includes/front.php b/wp-content/plugins/menu-icons/includes/front.php
index 8667ba2c..39d4da2d 100644
--- a/wp-content/plugins/menu-icons/includes/front.php
+++ b/wp-content/plugins/menu-icons/includes/front.php
@@ -420,10 +420,45 @@ final class Menu_Icons_Front_End {
$classes = sprintf( '%s _svg', self::get_icon_classes( $meta ) );
$style = self::get_icon_style( $meta, array( 'svg_width', 'vertical_align' ) );
+ $svg_icon = esc_url( wp_get_attachment_url( $meta['icon'] ) );
+ $width = '';
+ $height = '';
+ if ( 'image/svg+xml' === get_post_mime_type( $meta['icon'] ) ) {
+
+ // Check `WP_Filesystem` function exists OR not.
+ require_once ABSPATH . '/wp-admin/includes/file.php';
+ \WP_Filesystem();
+ global $wp_filesystem;
+
+ $svg_icon = get_attached_file( $meta['icon'] );
+ $svg_icon_content = $wp_filesystem->get_contents( $svg_icon );
+ if ( $svg_icon_content ) {
+ $xmlget = simplexml_load_string( $svg_icon_content );
+ $xmlattributes = $xmlget->attributes();
+ $width = (string) $xmlattributes->width;
+ $width = (int) filter_var( $xmlattributes->width, FILTER_SANITIZE_NUMBER_INT );
+ $height = (string) $xmlattributes->height;
+ $height = (int) filter_var( $xmlattributes->height, FILTER_SANITIZE_NUMBER_INT );
+ }
+ } else {
+ $attachment_meta = wp_get_attachment_metadata( $meta['icon'] );
+ if ( $attachment_meta ) {
+ $width = isset( $attachment_meta['width'] ) ? $attachment_meta['width'] : $width;
+ $height = isset( $attachment_meta['height'] ) ? $attachment_meta['height'] : $height;
+ }
+ }
+ if ( ! empty( $width ) ) {
+ $width = sprintf( ' width="%dpx"', $width );
+ }
+ if ( ! empty( $height ) ) {
+ $height = sprintf( ' height="%dpx"', $height );
+ }
return sprintf(
- '',
+ '',
esc_url( wp_get_attachment_url( $meta['icon'] ) ),
esc_attr( $classes ),
+ $width,
+ $height,
$style
);
}
diff --git a/wp-content/plugins/menu-icons/includes/picker.php b/wp-content/plugins/menu-icons/includes/picker.php
index a995c1e3..30fde468 100644
--- a/wp-content/plugins/menu-icons/includes/picker.php
+++ b/wp-content/plugins/menu-icons/includes/picker.php
@@ -186,9 +186,9 @@ final class Menu_Icons_Picker {
return;
}
- if( ! function_exists( 'get_current_screen' ) ) {
- return;
- }
+ if ( ! function_exists( 'get_current_screen' ) ) {
+ return;
+ }
$screen = get_current_screen();
if ( ! $screen instanceof WP_Screen || 'nav-menus' !== $screen->id ) {
diff --git a/wp-content/plugins/menu-icons/menu-icons.php b/wp-content/plugins/menu-icons/menu-icons.php
index 2a4fed76..8496ac2a 100644
--- a/wp-content/plugins/menu-icons/menu-icons.php
+++ b/wp-content/plugins/menu-icons/menu-icons.php
@@ -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.12.5
+ * Version: 0.12.8
* Author: ThemeIsle
* Author URI: https://themeisle.com
* License: GPLv2
@@ -27,7 +27,7 @@
*/
final class Menu_Icons {
- const VERSION = '0.12.5';
+ const VERSION = '0.12.8';
/**
* Holds plugin data
diff --git a/wp-content/plugins/menu-icons/readme.txt b/wp-content/plugins/menu-icons/readme.txt
index 11954581..7fa0401b 100644
--- a/wp-content/plugins/menu-icons/readme.txt
+++ b/wp-content/plugins/menu-icons/readme.txt
@@ -2,7 +2,7 @@
Contributors: codeinwp, themeisle
Tags: menu, nav-menu, icons, navigation
Requires at least: 4.3
-Tested up to: 5.4
+Tested up to: 5.7
Stable tag: trunk
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -224,31 +224,47 @@ add_filter( 'menu_icons_menu_settings', 'my_menu_icons_menu_settings', 10, 2 );
Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
== Changelog ==
-= 0.12.5 - 2020-08-18 =
+
+##### [Version 0.12.8](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.7...v0.12.8) (2021-05-12)
+
+* Fix issue when the image is not accessible to fetch the width/height metadata.
-= 0.12.4 - 2020-07-13 =
+
+##### [Version 0.12.7](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.6...v0.12.7) (2021-05-07)
+
+Fix PHP fatal error when uploading SVG with the image uploader
+
+
+
+
+##### [Version 0.12.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.12.5...v0.12.6) (2021-05-05)
+
+* Adds explicit width/height to icons to prevent layout shifts issues
+
+
+= 0.12.4 - 2020-07-13 =
* Fix Font Awesome not loading
-= 0.12.3 - 2020-07-13 =
+= 0.12.3 - 2020-07-13 =
* Fixed Menu Icons in Block Editor not working
* Fixed CWP links.
-= 0.12.2 - 2019-11-15 =
+= 0.12.2 - 2019-11-15 =
-= 0.12.1 - 2019-11-15 =
+= 0.12.1 - 2019-11-15 =
* Improve legacy compatibility
-= 0.12.0 - 2019-11-15 =
+= 0.12.0 - 2019-11-15 =
* Fix issues with WordPress 5.3.
diff --git a/wp-content/plugins/menu-icons/vendor/autoload.php b/wp-content/plugins/menu-icons/vendor/autoload.php
index 5607b84d..a5bed4e0 100644
--- a/wp-content/plugins/menu-icons/vendor/autoload.php
+++ b/wp-content/plugins/menu-icons/vendor/autoload.php
@@ -2,6 +2,6 @@
// autoload.php @generated by Composer
-require_once __DIR__ . '/composer' . '/autoload_real.php';
+require_once __DIR__ . '/composer/autoload_real.php';
-return ComposerAutoloaderInitabef56b0da707c7e3eaebd0d256cca29::getLoader();
+return ComposerAutoloaderInit45b19aab4a02085424168fe90bd9d9df::getLoader();
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-1.png b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-1.png
deleted file mode 100644
index 8d70875f..00000000
Binary files a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-1.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-2.png b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-2.png
deleted file mode 100644
index 9aa80110..00000000
Binary files a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/assets/screenshot-2.png and /dev/null differ
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/icon-picker.php b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/icon-picker.php
index e414ce8b..8196de94 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/icon-picker.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/icon-picker.php
@@ -337,4 +337,6 @@ final class Icon_Picker {
$this->is_admin_loaded = true;
}
}
-add_action( 'plugins_loaded', array( 'Icon_Picker', 'instance' ), 7 );
+if ( function_exists( 'add_action' ) ) {
+ add_action( 'plugins_loaded', array( 'Icon_Picker', 'instance' ), 7 );
+}
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/icon-picker.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/icon-picker.js
deleted file mode 100644
index bb74b492..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/icon-picker.js
+++ /dev/null
@@ -1,101 +0,0 @@
-require( './media/manifest' );
-
-( function( $ ) {
- var l10n = wp.media.view.l10n.iconPicker,
- templates = {},
- frame, selectIcon, removeIcon, getFrame, updateField, updatePreview, $field;
-
- getFrame = function() {
- if ( ! frame ) {
- frame = new wp.media.view.MediaFrame.IconPicker();
-
- frame.target.on( 'change', updateField );
- }
-
- return frame;
- };
-
- updateField = function( model ) {
- _.each( model.get( 'inputs' ), function( $input, key ) {
- $input.val( model.get( key ) );
- });
-
- model.clear({ silent: true });
- $field.trigger( 'ipf:update' );
- };
-
- updatePreview = function( e ) {
- var $el = $( e.currentTarget ),
- $select = $el.find( 'a.ipf-select' ),
- $remove = $el.find( 'a.ipf-remove' ),
- type = $el.find( 'input.ipf-type' ).val(),
- icon = $el.find( 'input.ipf-icon' ).val(),
- url = $el.find( 'input.url' ).val(),
- template;
-
- if ( type === '' || icon === '' || ! _.has( iconPicker.types, type ) ) {
- $remove.addClass( 'hidden' );
- $select
- .removeClass( 'has-icon' )
- .addClass( 'button' )
- .text( l10n.selectIcon )
- .attr( 'title', '' );
-
- return;
- }
-
- if ( templates[ type ]) {
- template = templates[ type ];
- } else {
- template = templates[ type ] = wp.template( 'iconpicker-' + iconPicker.types[ type ].templateId + '-icon' );
- }
-
- $remove.removeClass( 'hidden' );
- $select
- .attr( 'title', l10n.selectIcon )
- .addClass( 'has-icon' )
- .removeClass( 'button' )
- .html( template({
- type: type,
- icon: icon,
- url: url
- }) );
- };
-
- selectIcon = function( e ) {
- var frame = getFrame(),
- model = { inputs: {} };
-
- e.preventDefault();
-
- $field = $( e.currentTarget ).closest( '.ipf' );
- model.id = $field.attr( 'id' );
-
- // Collect input fields and use them as the model's attributes.
- $field.find( 'input' ).each( function() {
- var $input = $( this ),
- key = $input.attr( 'class' ).replace( 'ipf-', '' ),
- value = $input.val();
-
- model[ key ] = value;
- model.inputs[ key ] = $input;
- });
-
- frame.target.set( model, { silent: true });
- frame.open();
- };
-
- removeIcon = function( e ) {
- var $el = $( e.currentTarget ).closest( 'div.ipf' );
-
- $el.find( 'input' ).val( '' );
- $el.trigger( 'ipf:update' );
- };
-
- $( document )
- .on( 'click', 'a.ipf-select', selectIcon )
- .on( 'click', 'a.ipf-remove', removeIcon )
- .on( 'ipf:update', 'div.ipf', updatePreview );
-
- $( 'div.ipf' ).trigger( 'ipf:update' );
-}( jQuery ) );
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/font.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/font.js
deleted file mode 100644
index 418d3559..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/font.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * wp.media.controller.IconPickerFont
- *
- * @class
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- * @mixes wp.media.controller.iconPickerMixin
- */
-var IconPickerFont = wp.media.controller.State.extend( _.extend({}, wp.media.controller.iconPickerMixin, {
- defaults: {
- multiple: false,
- menu: 'default',
- toolbar: 'select',
- baseType: 'font'
- },
-
- initialize: function() {
- var data = this.get( 'data' );
-
- this.set( 'groups', new Backbone.Collection( data.groups ) );
- this.set( 'library', new wp.media.model.IconPickerFonts( data.items ) );
- this.set( 'selection', new wp.media.model.Selection( null, {
- multiple: this.get( 'multiple' )
- }) );
- },
-
- activate: function() {
- this.frame.on( 'open', this.updateSelection, this );
- this.resetFilter();
- this.updateSelection();
- },
-
- deactivate: function() {
- this.frame.off( 'open', this.updateSelection, this );
- },
-
- resetFilter: function() {
- this.get( 'library' ).props.set( 'group', 'all' );
- },
-
- updateSelection: function() {
- var selection = this.get( 'selection' ),
- library = this.get( 'library' ),
- target = this.frame.target,
- icon = target.get( 'icon' ),
- type = target.get( 'type' ),
- selected;
-
- if ( this.id === type ) {
- selected = library.findWhere({ id: icon });
- }
-
- selection.reset( selected ? selected : null );
- },
-
- getContentView: function() {
- return new wp.media.view.IconPickerFontBrowser( _.extend({
- controller: this.frame,
- model: this,
- groups: this.get( 'groups' ),
- collection: this.get( 'library' ),
- selection: this.get( 'selection' ),
- baseType: this.get( 'baseType' ),
- type: this.get( 'id' )
- }, this.ipGetSidebarOptions() ) );
- }
-}) );
-
-module.exports = IconPickerFont;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/img.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/img.js
deleted file mode 100644
index 20ba81d1..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/img.js
+++ /dev/null
@@ -1,148 +0,0 @@
-var Library = wp.media.controller.Library,
- l10n = wp.media.view.l10n,
- models = wp.media.model,
- views = wp.media.view,
- IconPickerImg;
-
-/**
- * wp.media.controller.IconPickerImg
- *
- * @augments wp.media.controller.Library
- * @augments wp.media.controller.State
- * @augments Backbone.Model
- * @mixes media.selectionSync
- * @mixes wp.media.controller.iconPickerMixin
- */
-IconPickerImg = Library.extend( _.extend({}, wp.media.controller.iconPickerMixin, {
- defaults: _.defaults({
- id: 'image',
- baseType: 'image',
- syncSelection: false
- }, Library.prototype.defaults ),
-
- initialize: function( options ) {
- var selection = this.get( 'selection' );
-
- this.options = options;
-
- this.set( 'library', wp.media.query({ type: options.data.mimeTypes }) );
-
- this.routers = {
- upload: {
- text: l10n.uploadFilesTitle,
- priority: 20
- },
- browse: {
- text: l10n.mediaLibraryTitle,
- priority: 40
- }
- };
-
- if ( ! ( selection instanceof models.Selection ) ) {
- this.set( 'selection', new models.Selection( selection, {
- multiple: false
- }) );
- }
-
- Library.prototype.initialize.apply( this, arguments );
- },
-
- activate: function() {
- Library.prototype.activate.apply( this, arguments );
- this.get( 'library' ).observe( wp.Uploader.queue );
- this.frame.on( 'open', this.updateSelection, this );
- this.updateSelection();
- },
-
- deactivate: function() {
- Library.prototype.deactivate.apply( this, arguments );
- this.get( 'library' ).unobserve( wp.Uploader.queue );
- this.frame.off( 'open', this.updateSelection, this );
- },
-
- getContentView: function( mode ) {
- var content = ( mode === 'upload' ) ? this.uploadContent() : this.browseContent();
-
- this.frame.$el.removeClass( 'hide-toolbar' );
-
- return content;
- },
-
- /**
- * Media library content
- *
- * @returns {wp.media.view.IconPickerImgBrowser} "Browse" content view.
- */
- browseContent: function() {
- var options = _.extend({
- model: this,
- controller: this.frame,
- collection: this.get( 'library' ),
- selection: this.get( 'selection' ),
- sortable: this.get( 'sortable' ),
- search: this.get( 'searchable' ),
- filters: this.get( 'filterable' ),
- dragInfo: this.get( 'dragInfo' ),
- idealColumnWidth: this.get( 'idealColumnWidth' ),
- suggestedWidth: this.get( 'suggestedWidth' ),
- suggestedHeight: this.get( 'suggestedHeight' )
- }, this.ipGetSidebarOptions() );
-
- if ( this.id === 'svg' ) {
- options.AttachmentView = views.IconPickerSvgItem;
- }
-
- return new views.IconPickerImgBrowser( options );
- },
-
- /**
- * Render callback for the content region in the `upload` mode.
- *
- * @returns {wp.media.view.UploaderInline} "Upload" content view.
- */
- uploadContent: function() {
- return new wp.media.view.UploaderInline({
- controller: this.frame
- });
- },
-
- updateSelection: function() {
- var selection = this.get( 'selection' ),
- target = this.frame.target,
- icon = target.get( 'icon' ),
- type = target.get( 'type' ),
- selected;
-
- if ( this.id === type ) {
- selected = models.Attachment.get( icon );
- this.dfd = selected.fetch();
- }
-
- selection.reset( selected ? selected : null );
- },
-
- /**
- * Get image icon URL
- *
- * @param {object} model - Selected icon model.
- * @param {string} size - Image size.
- *
- * @returns {string} Icon URL.
- */
- ipGetIconUrl: function( model, size ) {
- var url = model.get( 'url' ),
- sizes = model.get( 'sizes' );
-
- if ( undefined === size ) {
- size = 'thumbnail';
- }
-
- if ( sizes && sizes[ size ]) {
- url = sizes[ size ].url;
- }
-
- return url;
- }
-}) );
-
-module.exports = IconPickerImg;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/mixin.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/mixin.js
deleted file mode 100644
index 0f5f2b1e..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/controllers/mixin.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Methods for the state
- *
- * @mixin
- */
-var iconPickerMixin = {
-
- /**
- * @returns {object}
- */
- ipGetSidebarOptions: function() {
- var frameOptions = this.frame.options,
- options = {};
-
- if ( frameOptions.SidebarView && frameOptions.SidebarView.prototype instanceof wp.media.view.IconPickerSidebar ) {
- options.sidebar = true;
- options.SidebarView = frameOptions.SidebarView;
- } else {
- options.sidebar = false;
- }
-
- return options;
- },
-
- /**
- * Get image icon URL
- *
- * @returns {string}
- */
- ipGetIconUrl: function() {
- return '';
- }
-};
-
-module.exports = iconPickerMixin;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/manifest.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/manifest.js
deleted file mode 100644
index 8997deb2..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/manifest.js
+++ /dev/null
@@ -1,16 +0,0 @@
-wp.media.model.IconPickerTarget = require( './models/target.js' );
-wp.media.model.IconPickerFonts = require( './models/fonts.js' );
-
-wp.media.controller.iconPickerMixin = require( './controllers/mixin.js' );
-wp.media.controller.IconPickerFont = require( './controllers/font.js' );
-wp.media.controller.IconPickerImg = require( './controllers/img.js' );
-
-wp.media.view.IconPickerBrowser = require( './views/browser.js' );
-wp.media.view.IconPickerSidebar = require( './views/sidebar.js' );
-wp.media.view.IconPickerFontItem = require( './views/font-item.js' );
-wp.media.view.IconPickerFontLibrary = require( './views/font-library.js' );
-wp.media.view.IconPickerFontFilter = require( './views/font-filter.js' );
-wp.media.view.IconPickerFontBrowser = require( './views/font-browser.js' );
-wp.media.view.IconPickerImgBrowser = require( './views/img-browser.js' );
-wp.media.view.IconPickerSvgItem = require( './views/svg-item.js' );
-wp.media.view.MediaFrame.IconPicker = require( './views/frame.js' );
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/fonts.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/fonts.js
deleted file mode 100644
index 8dcd52eb..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/fonts.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * wp.media.model.IconPickerFonts
- */
-var IconPickerFonts = Backbone.Collection.extend({
- constructor: function() {
- Backbone.Collection.prototype.constructor.apply( this, arguments );
-
- this.items = new Backbone.Collection( this.models );
- this.props = new Backbone.Model({
- group: 'all',
- search: ''
- });
-
- this.props.on( 'change', this.refresh, this );
- },
-
- /**
- * Refresh library when props is changed
- *
- * @param {Backbone.Model} props
- */
- refresh: function( props ) {
- let items = _.clone( this.items.models );
-
- _.each( props.toJSON(), ( value, filter ) => {
- const method = this.filters[ filter ];
-
- if ( method ) {
- items = items.filter( item => {
- return method( item, value );
- });
- }
- });
-
- this.reset( items );
- },
-
- filters: {
- /**
- * @static
- *
- * @param {Backbone.Model} item Item model.
- * @param {string} group Group ID.
- *
- * @returns {Boolean}
- */
- group: function( item, group ) {
- return ( group === 'all' || item.get( 'group' ) === group || item.get( 'group' ) === '' );
- },
-
- /**
- * @static
- *
- * @param {Backbone.Model} item Item model.
- * @param {string} term Search term.
- *
- * @returns {Boolean}
- */
- search: function( item, term ) {
- let result;
-
- if ( term === '' ) {
- result = true;
- } else {
- result = _.any([ 'id', 'name' ], attribute => {
- const value = item.get( attribute );
-
- return value && value.search( term ) >= 0;
- }, term );
- }
-
- return result;
- }
- }
-});
-
-module.exports = IconPickerFonts;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/target.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/target.js
deleted file mode 100644
index 3d552948..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/models/target.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * wp.media.model.IconPickerTarget
- *
- * A target where the picked icon should be sent to
- *
- * @augments Backbone.Model
- */
-var IconPickerTarget = Backbone.Model.extend({
- defaults: {
- type: '',
- group: 'all',
- icon: '',
- url: '',
- sizes: []
- }
-});
-
-module.exports = IconPickerTarget;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/browser.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/browser.js
deleted file mode 100644
index 4383d0ab..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/browser.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Methods for the browser views
- */
-var IconPickerBrowser = {
- createSidebar: function() {
- this.sidebar = new this.options.SidebarView({
- controller: this.controller,
- selection: this.options.selection
- });
-
- this.views.add( this.sidebar );
- }
-};
-
-module.exports = IconPickerBrowser;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-browser.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-browser.js
deleted file mode 100644
index c1f6a987..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-browser.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * wp.media.view.IconPickerFontBrowser
- */
-var IconPickerFontBrowser = wp.media.View.extend( _.extend({
- className: function() {
- var className = 'attachments-browser iconpicker-fonts-browser';
-
- if ( ! this.options.sidebar ) {
- className += ' hide-sidebar';
- }
-
- return className;
- },
-
- initialize: function() {
- this.groups = this.options.groups;
-
- this.createToolbar();
- this.createLibrary();
-
- if ( this.options.sidebar ) {
- this.createSidebar();
- }
- },
-
- createLibrary: function() {
- this.items = new wp.media.view.IconPickerFontLibrary({
- controller: this.controller,
- collection: this.collection,
- selection: this.options.selection,
- baseType: this.options.baseType,
- type: this.options.type
- });
-
- // Add keydown listener to the instance of the library view
-
- this.views.add( this.items );
- },
-
- createToolbar: function() {
- this.toolbar = new wp.media.view.Toolbar({
- controller: this.controller
- });
-
- this.views.add( this.toolbar );
-
- // Dropdown filter
- this.toolbar.set( 'filters', new wp.media.view.IconPickerFontFilter({
- controller: this.controller,
- model: this.collection.props,
- priority: - 80
- }).render() );
-
- // Search field
- this.toolbar.set( 'search', new wp.media.view.Search({
- controller: this.controller,
- model: this.collection.props,
- priority: 60
- }).render() );
- }
-}, wp.media.view.IconPickerBrowser ) );
-
-module.exports = IconPickerFontBrowser;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-filter.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-filter.js
deleted file mode 100644
index cd3f322b..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-filter.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * wp.media.view.IconPickerFontFilter
- */
-var IconPickerFontFilter = wp.media.view.AttachmentFilters.extend({
- createFilters: function() {
- var groups = this.controller.state().get( 'groups' ),
- filters = {};
-
- filters.all = {
- text: wp.media.view.l10n.iconPicker.allFilter,
- props: { group: 'all' }
- };
-
- groups.each( function( group ) {
- filters[ group.id ] = {
- text: group.get( 'name' ),
- props: { group: group.id }
- };
- });
-
- this.filters = filters;
- },
-
- change: function() {
- var filter = this.filters[ this.el.value ];
-
- if ( filter ) {
- this.model.set( 'group', filter.props.group );
- }
- }
-});
-
-module.exports = IconPickerFontFilter;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-item.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-item.js
deleted file mode 100644
index 8688cd95..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-item.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var Attachment = wp.media.view.Attachment.Library,
- IconPickerFontItem;
-
-/**
- * wp.media.view.IconPickerFontItem
- */
-IconPickerFontItem = Attachment.extend({
- className: 'attachment iconpicker-item',
-
- initialize: function() {
- this.template = wp.media.template( 'iconpicker-' + this.options.baseType + '-item' );
- Attachment.prototype.initialize.apply( this, arguments );
- },
-
- render: function() {
- var options = _.defaults( this.model.toJSON(), {
- baseType: this.options.baseType,
- type: this.options.type
- });
-
- this.views.detach();
- this.$el.html( this.template( options ) );
- this.updateSelect();
- this.views.render();
-
- return this;
- }
-});
-
-module.exports = IconPickerFontItem;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-library.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-library.js
deleted file mode 100644
index c8c79f6d..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/font-library.js
+++ /dev/null
@@ -1,100 +0,0 @@
-var $ = jQuery,
- Attachments = wp.media.view.Attachments,
- IconPickerFontLibrary;
-
-/**
- * wp.media.view.IconPickerFontLibrary
- */
-IconPickerFontLibrary = Attachments.extend({
- className: 'attachments iconpicker-items clearfix',
-
- initialize: function() {
- Attachments.prototype.initialize.apply( this, arguments );
-
- _.bindAll( this, 'scrollToSelected' );
- _.defer( this.scrollToSelected, this );
- this.controller.on( 'open', this.scrollToSelected, this );
- $( this.options.scrollElement ).off( 'scroll', this.scroll );
- },
-
- _addItem: function( model ) {
- this.views.add( this.createAttachmentView( model ), {
- at: this.collection.indexOf( model )
- });
- },
-
- _removeItem: function( model ) {
- var view = this._viewsByCid[ model.cid ];
- delete this._viewsByCid[ model.cid ];
-
- if ( view ) {
- view.remove();
- }
- },
-
- render: function() {
- _.each( this._viewsByCid, this._removeItem, this );
- this.collection.each( this._addItem, this );
-
- return this;
- },
-
- createAttachmentView: function( model ) {
- var view = new wp.media.view.IconPickerFontItem({
- controller: this.controller,
- model: model,
- collection: this.collection,
- selection: this.options.selection,
- baseType: this.options.baseType,
- type: this.options.type
- });
-
- return this._viewsByCid[ view.cid ] = view;
- },
-
- /**
- * Scroll to selected item
- */
- scrollToSelected: function() {
- var selected = this.options.selection.single(),
- singleView, distance;
-
- if ( ! selected ) {
- return;
- }
-
- singleView = this.getView( selected );
-
- if ( singleView && ! this.isInView( singleView.$el ) ) {
- distance = (
- singleView.$el.offset().top -
- parseInt( singleView.$el.css( 'paddingTop' ), 10 ) -
- this.$el.offset().top +
- this.$el.scrollTop() -
- parseInt( this.$el.css( 'paddingTop' ), 10 )
- );
-
- this.$el.scrollTop( distance );
- }
- },
-
- getView: function( model ) {
- return _.findWhere( this._viewsByCid, { model: model });
- },
-
- isInView: function( $elem ) {
- var docViewTop = this.$window.scrollTop(),
- docViewBottom = docViewTop + this.$window.height(),
- elemTop = $elem.offset().top,
- elemBottom = elemTop + $elem.height();
-
- return ( ( elemBottom <= docViewBottom ) && ( elemTop >= docViewTop ) );
- },
-
- prepare: function() {},
- ready: function() {},
- initSortable: function() {},
- scroll: function() {}
-});
-
-module.exports = IconPickerFontLibrary;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/frame.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/frame.js
deleted file mode 100644
index 900c9148..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/frame.js
+++ /dev/null
@@ -1,118 +0,0 @@
-/**
- * wp.media.view.MediaFrame.IconPicker
- *
- * A frame for selecting an icon.
- *
- * @class
- * @augments wp.media.view.MediaFrame.Select
- * @augments wp.media.view.MediaFrame
- * @augments wp.media.view.Frame
- * @augments wp.media.View
- * @augments wp.Backbone.View
- * @augments Backbone.View
- * @mixes wp.media.controller.StateMachine
- */
-
-var l10n = wp.media.view.l10n,
- Select = wp.media.view.MediaFrame.Select,
- IconPicker;
-
-IconPicker = Select.extend({
- initialize: function() {
- _.defaults( this.options, {
- title: l10n.iconPicker.frameTitle,
- multiple: false,
- ipTypes: iconPicker.types,
- target: null,
- SidebarView: null
- });
-
- if ( this.options.target instanceof wp.media.model.IconPickerTarget ) {
- this.target = this.options.target;
- } else {
- this.target = new wp.media.model.IconPickerTarget();
- }
-
- Select.prototype.initialize.apply( this, arguments );
- },
-
- createStates: function() {
- var Controller;
-
- _.each( this.options.ipTypes, function( props ) {
- if ( ! wp.media.controller.hasOwnProperty( 'IconPicker' + props.controller ) ) {
- return;
- }
-
- Controller = wp.media.controller[ 'IconPicker' + props.controller ];
-
- this.states.add( new Controller({
- id: props.id,
- content: props.id,
- title: props.name,
- data: props.data
- }) );
- }, this );
- },
-
- /**
- * Bind region mode event callbacks.
- */
- bindHandlers: function() {
- this.on( 'router:create:browse', this.createRouter, this );
- this.on( 'router:render:browse', this.browseRouter, this );
- this.on( 'content:render', this.ipRenderContent, this );
- this.on( 'toolbar:create:select', this.createSelectToolbar, this );
- this.on( 'open', this._ipSetState, this );
- this.on( 'select', this._ipUpdateTarget, this );
- },
-
- /**
- * Set state based on the target's icon type
- */
- _ipSetState: function() {
- var stateId = this.target.get( 'type' );
-
- if ( ! stateId || ! this.states.findWhere({ id: stateId }) ) {
- stateId = this.states.at( 0 ).id;
- }
-
- this.setState( stateId );
- },
-
- /**
- * Update target's attributes after selecting an icon
- */
- _ipUpdateTarget: function() {
- var state = this.state(),
- selected = state.get( 'selection' ).single(),
- props;
-
- props = {
- type: state.id,
- icon: selected.get( 'id' ),
- sizes: selected.get( 'sizes' ),
- url: state.ipGetIconUrl( selected )
- };
-
- this.target.set( props );
- },
-
- browseRouter: function( routerView ) {
- var routers = this.state().routers;
-
- if ( routers ) {
- routerView.set( routers );
- }
- },
-
- ipRenderContent: function() {
- var state = this.state(),
- mode = this.content.mode(),
- content = state.getContentView( mode );
-
- this.content.set( content );
- }
-});
-
-module.exports = IconPicker;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/img-browser.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/img-browser.js
deleted file mode 100644
index 51d880e4..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/img-browser.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * wp.media.view.IconPickerImgBrowser
- */
-var IconPickerImgBrowser = wp.media.view.AttachmentsBrowser.extend( wp.media.view.IconPickerBrowser );
-
-module.exports = IconPickerImgBrowser;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/sidebar.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/sidebar.js
deleted file mode 100644
index 91396d1a..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/sidebar.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * wp.media.view.IconPickerSidebar
- */
-var IconPickerSidebar = wp.media.view.Sidebar.extend({
- initialize: function() {
- var selection = this.options.selection;
-
- wp.media.view.Sidebar.prototype.initialize.apply( this, arguments );
-
- selection.on( 'selection:single', this.createSingle, this );
- selection.on( 'selection:unsingle', this.disposeSingle, this );
-
- if ( selection.single() ) {
- this.createSingle();
- }
- },
-
- /**
- * @abstract
- */
- createSingle: function() {},
-
- /**
- * @abstract
- */
- disposeSingle: function() {}
-});
-
-module.exports = IconPickerSidebar;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/svg-item.js b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/svg-item.js
deleted file mode 100644
index 77915f8d..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/js/src/media/views/svg-item.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * wp.media.view.IconPickerSvgItem
- */
-var IconPickerSvgItem = wp.media.view.Attachment.Library.extend({
- template: wp.template( 'iconpicker-svg-item' )
-});
-
-module.exports = IconPickerSvgItem;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/phpcs.ruleset.xml b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/phpcs.ruleset.xml
deleted file mode 100644
index 4b6499ad..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/phpcs.ruleset.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
- */node_modules/*
- */vendor/*
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/readme.md b/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/readme.md
deleted file mode 100644
index 1d8520ed..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/readme.md
+++ /dev/null
@@ -1,85 +0,0 @@
-
-# Icon Picker
-
-Pick an icon of your choice.
-
-**Contributors:** [kucrut](https://profiles.wordpress.org/kucrut)
-**Tags:** [icons](https://wordpress.org/plugins/tags/icons), [image](https://wordpress.org/plugins/tags/image), [svg](https://wordpress.org/plugins/tags/svg)
-**Requires at least:** 4.3
-**Tested up to:** 4.7.2
-**Stable tag:** 0.5.0
-**License:** [GPLv2](http://www.gnu.org/licenses/gpl-2.0.html)
-**Donate Link:** http://kucrut.org/#coffee
-
-[![Build Status](https://travis-ci.org/kucrut/wp-icon-picker.svg?branch=master)](https://travis-ci.org/kucrut/wp-icon-picker) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com)
-
-## Description ##
-
-An icon picker library plugin.
-
-## Screenshots ##
-
-### Icon selector
-
-![Icon selector](assets/screenshot-1.png)
-
-### Icon fields in a post meta box using [CMB](https://github.com/humanmade/Custom-Meta-Boxes/)
-
-![Icon fields in a post meta box using [CMB](https://github.com/humanmade/Custom-Meta-Boxes/)](assets/screenshot-2.png)
-
-## Frequently Asked Questions ##
-
-### How do I use css file from CDN? ###
-You can use the `icon_picker_icon_type_stylesheet_uri` filter, eg:
-```php
-/**
- * Load Font Awesome's CSS from CDN
- *
- * @param string $stylesheet_uri Icon type's stylesheet URI.
- * @param string $icon_type_id Icon type's ID.
- * @param Icon_Picker_Type_Font $icon_type Icon type's instance.
- *
- * @return string
- */
-function myprefix_font_awesome_css_from_cdn( $stylesheet_uri, $icon_type_id, $icon_type ) {
- if ( 'fa' === $icon_type_id ) {
- $stylesheet_uri = sprintf(
- 'https://maxcdn.bootstrapcdn.com/font-awesome/%s/css/font-awesome.min.css',
- $icon_type->version
- );
- }
-
- return $stylesheet_uri;
-}
-add_filter( 'icon_picker_icon_type_stylesheet_uri', 'myprefix_font_awesome_css_from_cdn', 10, 3 );
-```
-
-
-## Changelog ##
-
-### 0.5.0 ###
-* Update Font Awesome to 4.7.0.
-* Switch to Webpack.
-* Various [bug fixes and enhancements](https://github.com/kucrut/wp-icon-picker/issues?q=is%3Aissue+milestone%3A0.5.0+is%3Aclosed).
-
-### 0.4.1 ###
-* Improve support for CMB: Make the field usable in a repeatable field.
-
-### 0.4.0 ###
-* Introduce `icon_picker_icon_type_stylesheet_uri` filter hook.
-* Font Awesome 4.6.1
-
-### 0.3.0 ###
-* Fix CSS classname conflicts.
-
-### 0.2.0 ###
-* Introduce `icon_picker_field()`.
-* Add support for [CMB](https://github.com/humanmade/Custom-Meta-Boxes/).
-
-### 0.1.1 ###
-* Load translation, props [Eduardo Larequi](https://wordpress.org/support/profile/elarequi).
-
-### 0.1.0 ###
-* Initial
-
-
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php b/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php
index 29ff5401..8a51fbae 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php
@@ -17,7 +17,7 @@
* Text Domain: menu-item-custom-fields
*/
-if ( ! class_exists( 'Menu_Item_Custom_Fields' ) && ! version_compare( get_bloginfo( 'version' ), '5.4', '>=' ) ) :
+if ( ! class_exists( 'Menu_Item_Custom_Fields' ) && ( function_exists('get_bloginfo') && ! version_compare( get_bloginfo( 'version' ), '5.4', '>=' ) ) ) :
/**
* Menu Item Custom Fields Loader
*/
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/phpcs.ruleset.xml b/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/phpcs.ruleset.xml
deleted file mode 100644
index 197518ba..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/phpcs.ruleset.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- */node_modules/*
- */vendor/*
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/readme.md b/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/readme.md
deleted file mode 100644
index d2d6e7ce..00000000
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/menu-item-custom-fields/readme.md
+++ /dev/null
@@ -1,66 +0,0 @@
-
-# Menu Item Custom Fields
-
-Easily add custom fields to nav menu items.
-
-**Contributors:** [kucrut](https://profiles.wordpress.org/kucrut)
-**Tags:** [menu](https://wordpress.org/plugins/tags/menu), [nav-menu](https://wordpress.org/plugins/tags/nav-menu), [custom-fields](https://wordpress.org/plugins/tags/custom-fields), [metadata](https://wordpress.org/plugins/tags/metadata)
-**Requires at least:** 3.8
-**Tested up to:** 4.7.2
-**Stable tag:** 1.0.0
-**License:** [GPLv2](http://www.gnu.org/licenses/gpl-2.0.html)
-**Donate Link:** https://www.paypal.me/kucrut
-
-[![Build Status](https://travis-ci.org/kucrut/wp-menu-item-custom-fields.svg?branch=master)](https://travis-ci.org/kucrut/wp-menu-item-custom-fields)
-
-## Description ##
-
-### Breaking Change ###
-Since version `1.0.0`, the first parameter passed to the `wp_nav_menu_item_custom_fields` is the menu item ID, instead of the nav menu ID. This should not have a big impact, since the nav menu ID passed was always `0` (not used by core).
-
-This is a *library* plugin. It doesn't do anything visible on its own. It was written to allow other plugins/themes to add custom fields to menu items *easily*. See **Installation**.
-
-Development of this plugin is done on [GitHub](https://github.com/kucrut/wp-menu-item-custom-fields). **Pull requests welcome**. Please see [issues reported](https://github.com/kucrut/wp-menu-item-custom-fields/issues) there before going to the plugin forum.
-
-
-## Installation ##
-
-### As regular plugin ###
-1. Upload `menu-item-custom-fields` to the `/wp-content/plugins/` directory
-1. Activate the plugin through the 'Plugins' menu in WordPress
-
-### As library in your plugin/theme ###
-Simply copy `menu-item-custom-fields` to your plugin directory and require the main plugin file, eg:
-`
-require_once dirname( __FILE__ ) . '/menu-item-custom-fields/menu-item-custom-fields.php';
-`
-
-### Usage ###
-Copy (and customize) and include the `menu-item-custom-fields-example.php` file found in the `doc/` directory of this plugin into your plugin/theme.
-
-
-## Changelog ##
-
-### 1.0.0 ###
-* Pass correct parameters to the `wp_nav_menu_item_custom_fields` hook, props [@helgatheviking](https://github.com/helgatheviking).
-
-### 0.4.0 ###
-* Support WordPress 4.7, props [rahulnever2far](https://github.com/rahulnever2far).
-
-### 0.3.0 ###
-* Use `wp_nav_menu_item_custom_fields` as walker hook. See this [blog post](http://shazdeh.me/2014/06/25/custom-fields-nav-menu-items/).
-* Update example plugin
-
-### 0.2.1 ###
-* Update compatibility info
-
-### 0.2.0 ###
-* Improve walker class loader
-
-### 0.1.1 ###
-* Move custom fields up (before ``)
-
-### 0.1.0 ###
-* Initial public release
-
-
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md
index 4d674517..44cc82ae 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md
@@ -1,3 +1,25 @@
+##### [Version 3.2.20](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.19...v3.2.20) (2021-03-30)
+
+add wp-config support
+
+##### [Version 3.2.19](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.18...v3.2.19) (2021-03-12)
+
+* Adds compatibility with latest PHPCS coding standards.
+* Adds compatibility with core auto-update.
+
+##### [Version 3.2.18](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.17...v3.2.18) (2021-03-04)
+
+* Fix regression on rollback order
+
+##### [Version 3.2.17](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.16...v3.2.17) (2021-03-04)
+
+* Fix compatibility with PHP 8 due to usort
+
+##### [Version 3.2.16](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.15...v3.2.16) (2020-11-17)
+
+* Fix long texts on rollback.
+* Fix RTL mode for uninstall feedback.
+
##### [Version 3.2.15](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.14...v3.2.15) (2020-07-23)
* remove no redundant module
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php
index 218a28fb..2d02e3d1 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
return;
}
// Current SDK version and path.
-$themeisle_sdk_version = '3.2.15';
+$themeisle_sdk_version = '3.2.20';
$themeisle_sdk_path = dirname( __FILE__ );
global $themeisle_sdk_max_version;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php
index d1b0bfac..51ba9cf1 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php
@@ -37,14 +37,14 @@ abstract class Abstract_Module {
*
* @return bool Should load module?
*/
- public abstract function can_load( $product );
+ abstract public function can_load( $product );
/**
* Bootstrap the module.
*
* @param Product $product Product object.
*/
- public abstract function load( $product );
+ abstract public function load( $product );
/**
* Check if the product is from partner.
@@ -63,4 +63,21 @@ abstract class Abstract_Module {
return array_key_exists( $product->get_slug(), Module_Factory::$slugs );
}
+
+ /**
+ * Wrapper for wp_remote_get on VIP environments.
+ *
+ * @param string $url Url to check.
+ * @param array $args Option params.
+ *
+ * @return array|\WP_Error
+ */
+ public function safe_get( $url, $args = array() ) {
+ return function_exists( 'vip_safe_wp_remote_get' )
+ ? vip_safe_wp_remote_get( $url )
+ : wp_remote_get( //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get, Already used.
+ $url,
+ $args
+ );
+ }
}
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php
index d41e80f1..29313e9f 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Module_factory.php
@@ -88,7 +88,7 @@ class Module_Factory {
*
* @var Abstract_Module $module_object Module instance.
*/
- $module_object = new $class( $product );
+ $module_object = new $class( $product );
if ( ! $module_object->can_load( $product ) ) {
continue;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php
index 9b778204..efca2719 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php
@@ -96,7 +96,7 @@ class Dashboard_Widget extends Abstract_Module {
*
* @return string|void
*/
- function add_widget() {
+ public function add_widget() {
global $wp_meta_boxes;
if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
return;
@@ -114,7 +114,7 @@ class Dashboard_Widget extends Abstract_Module {
/**
* Render widget content
*/
- function render_dashboard_widget() {
+ public function render_dashboard_widget() {
$this->setup_feeds();
if ( empty( $this->items ) || ! is_array( $this->items ) ) {
return;
@@ -220,19 +220,21 @@ class Dashboard_Widget extends Abstract_Module {
+ class="ti-dw-day-container">
feeds );
// TODO report error when is an error loading the feed.
@@ -353,7 +357,7 @@ class Dashboard_Widget extends Abstract_Module {
/**
* Contact the API and fetch the recommended plugins/themes
*/
- function recommend_plugin_or_theme() {
+ public function recommend_plugin_or_theme() {
$products = $this->get_product_from_api();
if ( ! is_array( $products ) ) {
$products = array();
@@ -374,8 +378,8 @@ class Dashboard_Widget extends Abstract_Module {
*
* @return array|mixed The list of products to use in recomended section.
*/
- function get_product_from_api() {
- if ( false === ( $products = get_transient( 'themeisle_sdk_products' ) ) ) {
+ public function get_product_from_api() {
+ if ( false === ( $products = get_transient( 'themeisle_sdk_products' ) ) ) { //phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
$products = array();
$all_themes = $this->get_themes_from_wporg( 'themeisle' );
$all_plugins = $this->get_plugins_from_wporg( 'themeisle' );
@@ -429,8 +433,8 @@ class Dashboard_Widget extends Abstract_Module {
*
* @return array The list of themes.
*/
- function get_themes_from_wporg( $author ) {
- $products = wp_remote_get(
+ public function get_themes_from_wporg( $author ) {
+ $products = $this->safe_get(
'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[author]=' . $author . '&request[per_page]=30&request[fields][active_installs]=true'
);
$products = json_decode( wp_remote_retrieve_body( $products ) );
@@ -450,8 +454,8 @@ class Dashboard_Widget extends Abstract_Module {
*
* @return array The list of plugins for the selected author.
*/
- function get_plugins_from_wporg( $author ) {
- $products = wp_remote_get(
+ public function get_plugins_from_wporg( $author ) {
+ $products = $this->safe_get(
'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[author]=' . $author . '&request[per_page]=40&request[fields][active_installs]=true'
);
$products = json_decode( wp_remote_retrieve_body( $products ) );
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
index 5ec8d964..f24bd2cb 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
@@ -62,6 +62,12 @@ class Licenser extends Abstract_Module {
* @var null Local license object.
*/
private $license_local = null;
+ /**
+ * Product namespace, used for fixed name filters/cli commands.
+ *
+ * @var string $namespace Product namespace.
+ */
+ private $namespace = null;
/**
* Disable wporg updates for premium products.
@@ -71,7 +77,7 @@ class Licenser extends Abstract_Module {
*
* @return mixed List of themes to check for update.
*/
- function disable_wporg_update( $r, $url ) {
+ public function disable_wporg_update( $r, $url ) {
if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
return $r;
@@ -83,7 +89,7 @@ class Licenser extends Abstract_Module {
unset( $themes->themes->{$this->product->get_slug()} );
// Encode the updated JSON response.
- $r['body']['themes'] = json_encode( $themes );
+ $r['body']['themes'] = wp_json_encode( $themes );
return $r;
}
@@ -172,18 +178,18 @@ class Licenser extends Abstract_Module {
%s%s
%s
%s',
- ( ( 'valid' === $status ) ? sprintf( '', $value, $this->product->get_key() ) : '' ),
+ ( ( 'valid' === $status ) ? sprintf( '', esc_attr( $value ), esc_attr( $this->product->get_key() ) ) : '' ),
( ( 'valid' === $status ) ? 'themeisle-sdk-text-input-valid' : '' ),
- $this->product->get_key(),
- ( ( 'valid' === $status ) ? $this->product->get_key() . '_mask' : $this->product->get_key() ),
- ( ( 'valid' === $status ) ? ( str_repeat( '*', 30 ) . substr( $value, - 5 ) ) : $value ),
- ( 'valid' === $status ? 'themeisle-sdk-license-deactivate-cta' : 'themeisle-sdk-license-activate-cta' ),
- ( 'valid' === $status ? $valid_string : $invalid_string ),
- $this->product->get_key(),
- ( 'valid' === $status ? $deactivate_string : $activate_string ),
- sprintf( $license_message, '' . $this->get_distributor_name() . ' ', $this->product->get_type() ),
- empty( $error_message ) ? '' : sprintf( '%s
', $error_message )
- );
+ esc_attr( $this->product->get_key() ),
+ esc_attr( ( ( 'valid' === $status ) ? $this->product->get_key() . '_mask' : $this->product->get_key() ) ),
+ esc_attr( ( ( 'valid' === $status ) ? ( str_repeat( '*', 30 ) . substr( $value, - 5 ) ) : $value ) ),
+ esc_attr( ( 'valid' === $status ? 'themeisle-sdk-license-deactivate-cta' : 'themeisle-sdk-license-activate-cta' ) ),
+ esc_attr( 'valid' === $status ? $valid_string : $invalid_string ),
+ esc_attr( $this->product->get_key() ),
+ esc_attr( 'valid' === $status ? $deactivate_string : $activate_string ),
+ sprintf( wp_kses_data( $license_message ), '' . esc_attr( $this->get_distributor_name() ) . ' ', esc_attr( $this->product->get_type() ) ),
+ wp_kses_data( empty( $error_message ) ? '' : sprintf( '%s
', ( $error_message ) ) )
+ ) . wp_nonce_field( $this->product->get_key() . 'nonce', $this->product->get_key() . 'nonce_field', false, false );//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
@@ -210,17 +216,12 @@ class Licenser extends Abstract_Module {
}
/**
- * License price id.
+ * Return the last error message.
*
- * @return int License plan.
+ * @return mixed Error message.
*/
- public function get_plan() {
- $license_data = get_option( $this->product->get_key() . '_license_data', '' );
- if ( ! isset( $license_data->price_id ) ) {
- return -1;
- }
-
- return (int) $license_data->price_id;
+ public function get_error() {
+ return get_transient( $this->product->get_key() . 'act_err' );
}
/**
@@ -249,12 +250,26 @@ class Licenser extends Abstract_Module {
return $this->product->get_store_name();
}
+ /**
+ * License price id.
+ *
+ * @return int License plan.
+ */
+ public function get_plan() {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( ! isset( $license_data->price_id ) ) {
+ return - 1;
+ }
+
+ return (int) $license_data->price_id;
+ }
+
/**
* Show the admin notice regarding the license status.
*
* @return bool Should we show the notice ?
*/
- function show_notice() {
+ public function show_notice() {
if ( ! is_admin() ) {
return false;
}
@@ -274,10 +289,10 @@ class Licenser extends Abstract_Module {
product->get_name(),
- $this->product->get_name(),
- '' . $this->get_distributor_name() . ''
+ wp_kses_data( $no_activations_string ),
+ esc_attr( $this->product->get_name() ),
+ esc_attr( $this->product->get_name() ),
+ '' . esc_attr( $this->get_distributor_name() ) . ''
);
?>
@@ -292,7 +307,7 @@ class Licenser extends Abstract_Module {
?>
- product->get_name() . ' ' . $this->product->get_type(), $this->get_api_url() . '?license=' . $this->license_key ); ?>
+ product->get_name() . ' ' . $this->product->get_type() ), esc_url( $this->get_api_url() . '?license=' . $this->license_key ) ); ?>
- product->get_name() . ' ' . $this->product->get_type(), $this->get_api_url(), admin_url( 'options-general.php' ) . '#' . $this->product->get_key() . '_license' ); ?>
+ product->get_name() . ' ' . $this->product->get_type() ), esc_url( $this->get_api_url() ), esc_url( admin_url( 'options-general.php' ) . '#' . $this->product->get_key() . '_license' ) ); ?>
product->get_key() . '_license_data', '' );
if ( '' === $license_data ) {
return false;
@@ -355,7 +370,7 @@ class Licenser extends Abstract_Module {
*
* @return string The renew url.
*/
- function renew_url() {
+ public function renew_url() {
$license_data = get_option( $this->product->get_key() . '_license_data', '' );
if ( '' === $license_data ) {
return $this->get_api_url();
@@ -371,7 +386,7 @@ class Licenser extends Abstract_Module {
* Run the license check call.
*/
public function product_valid() {
- if ( false !== ( $license = get_transient( $this->product->get_key() . '_license_data' ) ) ) {
+ if ( false !== ( $license = get_transient( $this->product->get_key() . '_license_data' ) ) ) { //phpcs:ignore Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure
return;
}
$license = $this->check_license();
@@ -423,42 +438,6 @@ class Licenser extends Abstract_Module {
}
- /**
- * Increment the failed checks.
- */
- private function increment_failed_checks() {
- $this->failed_checks ++;
- update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
- }
-
- /**
- * Reset the failed checks
- */
- private function reset_failed_checks() {
- $this->failed_checks = 1;
- update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
- }
-
- /**
- * Set license validation error message.
- *
- * @param string $message Error message.
- */
- public function set_error( $message = '' ) {
- set_transient( $this->product->get_key() . 'act_err', $message, MINUTE_IN_SECONDS );
-
- return;
- }
-
- /**
- * Return the last error message.
- *
- * @return mixed Error message.
- */
- public function get_error() {
- return get_transient( $this->product->get_key() . 'act_err' );
- }
-
/**
* Do license activation/deactivation.
*
@@ -486,7 +465,7 @@ class Licenser extends Abstract_Module {
// Call the custom API.
if ( 'check' === $action ) {
- $response = wp_remote_get( sprintf( '%slicense/check/%s/%s/%s/%s', Product::API_URL, rawurlencode( $this->product->get_name() ), $license, rawurlencode( home_url() ), Loader::get_cache_token() ) );
+ $response = $this->safe_get( sprintf( '%slicense/check/%s/%s/%s/%s', Product::API_URL, rawurlencode( $this->product->get_name() ), $license, rawurlencode( home_url() ), Loader::get_cache_token() ) );
} else {
$response = wp_remote_post(
sprintf( '%slicense/%s/%s/%s', Product::API_URL, $action, rawurlencode( $this->product->get_name() ), $license ),
@@ -550,15 +529,42 @@ class Licenser extends Abstract_Module {
return true;
}
+ /**
+ * Reset the failed checks
+ */
+ private function reset_failed_checks() {
+ $this->failed_checks = 1;
+ update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
+ }
+
+ /**
+ * Increment the failed checks.
+ */
+ private function increment_failed_checks() {
+ $this->failed_checks ++;
+ update_option( $this->product->get_key() . '_failed_checks', $this->failed_checks );
+ }
+
/**
* Activate the license remotely.
*/
- function process_license() {
+ public function process_license() {
// listen for our activate button to be clicked.
if ( ! isset( $_POST[ $this->product->get_key() . '_btn_trigger' ] ) ) {
return;
}
- $license = $_POST[ $this->product->get_key() . '_license' ];
+ if ( ! isset( $_POST[ $this->product->get_key() . 'nonce_field' ] )
+ || ! wp_verify_nonce( $_POST[ $this->product->get_key() . 'nonce_field' ], $this->product->get_key() . 'nonce' ) //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
+ ) {
+ return;
+ }
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
+ }
+ $license = isset( $_POST[ $this->product->get_key() . '_license' ] )
+ ? sanitize_text_field( $_POST[ $this->product->get_key() . '_license' ] )
+ : '';
+
$response = $this->do_license_process( $license, 'toggle' );
if ( is_wp_error( $response ) ) {
$this->set_error( $response->get_error_message() );
@@ -568,14 +574,22 @@ class Licenser extends Abstract_Module {
if ( true === $response ) {
$this->set_error( '' );
}
+ }
+
+ /**
+ * Set license validation error message.
+ *
+ * @param string $message Error message.
+ */
+ public function set_error( $message = '' ) {
+ set_transient( $this->product->get_key() . 'act_err', $message, MINUTE_IN_SECONDS );
- return;
}
/**
* Load the Themes screen.
*/
- function load_themes_screen() {
+ public function load_themes_screen() {
add_thickbox();
add_action( 'admin_notices', array( &$this, 'update_nag' ) );
}
@@ -583,7 +597,7 @@ class Licenser extends Abstract_Module {
/**
* Alter the nag for themes update.
*/
- function update_nag() {
+ public function update_nag() {
$theme = wp_get_theme( $this->product->get_slug() );
$api_response = get_transient( $this->product_key );
if ( false === $api_response || ! isset( $api_response->new_version ) ) {
@@ -596,16 +610,16 @@ class Licenser extends Abstract_Module {
echo '';
printf(
'
%1$s %2$s is available.
Check out what\'s new or
update now.',
- $theme->get( 'Name' ),
- $api_response->new_version,
- sprintf( '%s&TB_iframe=true&width=1024&height=800', $this->product->get_changelog() ),
- $theme->get( 'Name' ),
- $update_url,
- $update_onclick
+ esc_attr( $theme->get( 'Name' ) ),
+ esc_attr( $api_response->new_version ),
+ esc_url( sprintf( '%s&TB_iframe=true&width=1024&height=800', $this->product->get_changelog() ) ),
+ esc_attr( $theme->get( 'Name' ) ),
+ esc_url( $update_url ),
+ $update_onclick // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, Already escaped.
);
echo '
';
- echo '';
- echo wpautop( $api_response->sections['changelog'] );
+ echo '
';
+ echo wp_kses_data( wpautop( $api_response->sections['changelog'] ) );
echo '
';
}
}
@@ -617,7 +631,7 @@ class Licenser extends Abstract_Module {
*
* @return mixed
*/
- function theme_update_transient( $value ) {
+ public function theme_update_transient( $value ) {
$update_data = $this->check_for_update();
if ( $update_data ) {
$value->response[ $this->product->get_slug() ] = $update_data;
@@ -631,7 +645,7 @@ class Licenser extends Abstract_Module {
*
* @return array|bool Either the update data or false in case of failure.
*/
- function check_for_update() {
+ public function check_for_update() {
$update_data = get_transient( $this->product_key );
if ( false === $update_data ) {
@@ -669,7 +683,7 @@ class Licenser extends Abstract_Module {
*/
private function get_version_data() {
- $response = wp_remote_get(
+ $response = $this->safe_get(
sprintf(
'%slicense/version/%s/%s/%s/%s',
Product::API_URL,
@@ -679,7 +693,7 @@ class Licenser extends Abstract_Module {
rawurlencode( home_url() )
),
array(
- 'timeout' => 15,
+ 'timeout' => 15, //phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout, Inherited by wp_remote_get only, for vip environment we use defaults.
'sslverify' => false,
)
);
@@ -706,8 +720,8 @@ class Licenser extends Abstract_Module {
/**
* Delete the update transient
*/
- function delete_theme_update_transient() {
- delete_transient( $this->product_key );
+ public function delete_theme_update_transient() {
+ return delete_transient( $this->product_key );
}
/**
@@ -727,6 +741,8 @@ class Licenser extends Abstract_Module {
if ( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
$_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
+ } else {
+ $_transient_data->no_update[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
}
}
@@ -782,7 +798,7 @@ class Licenser extends Abstract_Module {
*
* @return array $array
*/
- function http_request_args( $args, $url ) {
+ public function http_request_args( $args, $url ) {
// If it is an https request and we are performing a package download, disable ssl verification.
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
$args['sslverify'] = false;
@@ -829,6 +845,7 @@ class Licenser extends Abstract_Module {
$namespace = apply_filters( 'themesle_sdk_namespace_' . md5( $product->get_basefile() ), false );
if ( false !== $namespace ) {
+ $this->namespace = $namespace;
add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
add_filter( 'product_' . $namespace . '_license_status', [ $this, 'get_license_status' ], PHP_INT_MAX );
add_filter( 'product_' . $namespace . '_license_key', [ $this->product, 'get_license' ] );
@@ -850,17 +867,17 @@ class Licenser extends Abstract_Module {
]
);
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
- add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
+ add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
return $this;
}
if ( $this->product->is_theme() ) {
add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
- add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
+ add_action( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
- add_filter( 'http_request_args', array( $this, 'disable_wporg_update' ), 5, 2 );
+ add_filter( 'http_request_args', array( $this, 'disable_wporg_update' ), 5, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
return $this;
@@ -870,42 +887,74 @@ class Licenser extends Abstract_Module {
}
/**
- * Run license activation on plugin activate.
+ * Register license fields for the products.
*/
- public function auto_activate() {
- if ( ! current_user_can( 'switch_themes' ) ) {
- return;
- }
- $status = $this->get_license_status();
- if ( 'not_active' !== $status ) {
- return;
- }
+ public function register_license_hooks() {
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
+ add_action( 'admin_init', array( $this, 'process_license' ) );
+ add_action( 'admin_init', array( $this, 'product_valid' ), 99999999 );
+ add_action( 'admin_notices', array( $this, 'show_notice' ) );
+ add_filter( $this->product->get_key() . '_license_status', array( $this, 'get_license_status' ) );
+ }
+
+ /**
+ * Check license on filesystem.
+ *
+ * @return mixed License key.
+ */
+ public function get_file_license() {
$license_file = dirname( $this->product->get_basefile() ) . '/license.json';
global $wp_filesystem;
if ( ! is_file( $license_file ) ) {
- return;
+ return false;
}
- require_once( ABSPATH . '/wp-admin/includes/file.php' );
+ require_once ABSPATH . '/wp-admin/includes/file.php';
\WP_Filesystem();
$content = json_decode( $wp_filesystem->get_contents( $license_file ) );
if ( ! is_object( $content ) ) {
- return;
+ return false;
}
if ( ! isset( $content->key ) ) {
+ return false;
+ }
+ return $content->key;
+ }
+ /**
+ * Run license activation on plugin activate.
+ */
+ public function auto_activate() {
+ $status = $this->get_license_status();
+ if ( 'not_active' !== $status ) {
+ return false;
+ }
+
+ if ( ! empty( $this->namespace ) ) {
+ $license_key = apply_filters( 'product_' . $this->namespace . '_license_key_constant', '' );
+ }
+
+ if ( empty( $license_key ) ) {
+ $license_key = $this->get_file_license();
+ }
+ if ( empty( $license_key ) ) {
return;
}
- $this->license_local = $content;
+
+
+ $this->license_local = $license_key;
$lock_key = $this->product->get_key() . '_autoactivated';
if ( 'yes' === get_option( $lock_key, '' ) ) {
return;
}
- $response = $this->do_license_process( $content->key, 'activate' );
+ if ( 'yes' === get_transient( $lock_key ) ) {
+ return;
+ }
+ $response = $this->do_license_process( $license_key, 'activate' );
- update_option( $lock_key, 'yes' );
+ set_transient( $lock_key, 'yes', 6 * HOUR_IN_SECONDS );
if ( apply_filters( $this->product->get_key() . '_hide_license_notices', false ) ) {
return;
@@ -922,7 +971,7 @@ class Licenser extends Abstract_Module {
public function autoactivate_notice() {
?>
-
%s has been successfully activated using %s license !', $this->product->get_name(), str_repeat( '*', 20 ) . substr( $this->license_local->key, - 10 ) ); ?>
+
%s has been successfully activated using %s license !', esc_attr( $this->product->get_name() ), esc_attr( str_repeat( '*', 20 ) . substr( $this->license_local, - 10 ) ) ); ?>
product->get_key() . '_license_status', array( $this, 'get_license_status' ) );
- }
}
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php
index 8546cfe0..f9442a09 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php
@@ -78,7 +78,7 @@ class Logger extends Abstract_Module {
}
$action_key = $this->product->get_key() . '_log_activity';
if ( ! wp_next_scheduled( $action_key ) ) {
- wp_schedule_single_event( time() + ( rand( 1, 24 ) * 3600 ), $action_key );
+ wp_schedule_single_event( time() + ( wp_rand( 1, 24 ) * 3600 ), $action_key );
}
add_action( $action_key, array( $this, 'send_log' ) );
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php
index ad03e3a7..b6213392 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php
@@ -84,7 +84,7 @@ class Notification extends Abstract_Module {
$notification_html = self::get_notification_html( $notification_details );
do_action( $notification_details['id'] . '_before_render' );
- echo $notification_html;
+ echo $notification_html; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, already escaped internally.
do_action( $notification_details['id'] . '_after_render' );
self::render_snippets();
@@ -340,7 +340,7 @@ class Notification extends Abstract_Module {
$.post(
ajaxurl,
{
- 'nonce': '',
+ 'nonce': '',
'action': 'themeisle_sdk_dismiss_notice',
'id': notification_id,
'confirm': confirm
@@ -365,7 +365,7 @@ class Notification extends Abstract_Module {
/**
* Dismiss the notification.
*/
- static function dismiss() {
+ public static function dismiss() {
check_ajax_referer( (string) __CLASS__, 'nonce' );
$id = isset( $_POST['id'] ) ? sanitize_text_field( $_POST['id'] ) : '';
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php
index 7827b495..c1dea7ba 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Recommendation.php
@@ -64,7 +64,7 @@ class Recommendation extends Abstract_Module {
* @param array $strings - list of translated strings.
* @param array $preferences - list of preferences.
*/
- function render_products_box( $plugins_list, $themes_list, $strings, $preferences = array() ) {
+ public function render_products_box( $plugins_list, $themes_list, $strings, $preferences = array() ) {
if ( empty( $plugins_list ) && empty( $themes_list ) ) {
return;
@@ -90,7 +90,7 @@ class Recommendation extends Abstract_Module {
foreach ( $list as $theme ) {
echo '
';
- echo '
';
+ echo '
';
echo '
';
echo '
' . esc_html( $theme->custom_name ) . '';
if ( ! isset( $preferences['description'] ) || ( isset( $preferences['description'] ) && $preferences['description'] ) ) {
@@ -118,7 +118,7 @@ class Recommendation extends Abstract_Module {
foreach ( $list as $current_plugin ) {
echo '
';
- echo '
';
+ echo '
';
echo '
';
echo '
' . esc_html( $current_plugin->custom_name ) . '';
if ( ! isset( $preferences['description'] ) || ( isset( $preferences['description'] ) && $preferences['description'] ) ) {
@@ -185,7 +185,7 @@ class Recommendation extends Abstract_Module {
return $theme;
}
- $products = wp_remote_get(
+ $products = $this->safe_get(
'https://api.wordpress.org/themes/info/1.1/?action=query_themes&request[theme]=' . $slug . '&request[per_page]=1'
);
$products = json_decode( wp_remote_retrieve_body( $products ) );
@@ -246,7 +246,7 @@ class Recommendation extends Abstract_Module {
* @return array|mixed|object
*/
private function call_plugin_api( $slug ) {
- include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
+ include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
$call_api = get_transient( 'ti_plugin_info_' . $slug );
@@ -303,27 +303,30 @@ class Recommendation extends Abstract_Module {
}
.recommend-product .theme-banner {
- width:200px;
+ width: 200px;
margin: auto;
}
+
.recommend-product .plugin-banner {
width: 100px;
margin: auto;
}
- .recommend-product .plugin_box .button span{
+ .recommend-product .plugin_box .button span {
margin-top: 2px;
margin-right: 7px;
}
- .recommend-product .plugin_box .button{
- margin-bottom:10px;
+
+ .recommend-product .plugin_box .button {
+ margin-bottom: 10px;
}
+
.recommend-product .plugin_box {
margin-bottom: 20px;
padding-top: 5px;
display: flex;
- box-shadow: 0px 0px 10px -5px rgba(0,0,0,0.55);
+ box-shadow: 0px 0px 10px -5px rgba(0, 0, 0, 0.55);
background: #fff;
border-radius: 5px;
flex-direction: column;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
index 0329f61b..227fd12c 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
@@ -120,7 +120,9 @@ class Rollback extends Abstract_Module {
if ( empty( $url ) ) {
return [];
}
- $response = wp_remote_get( $url );
+ $response = function_exists( 'wp_remote_get_wp_remote_get' )
+ ? wp_remote_get_wp_remote_get( $url )
+ : wp_remote_get( $url ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get
if ( is_wp_error( $response ) ) {
return array();
}
@@ -191,7 +193,7 @@ class Rollback extends Abstract_Module {
* Start the rollback operation.
*/
public function start_rollback() {
- if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
+ if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) { //phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
wp_nonce_ays( '' );
}
@@ -228,9 +230,12 @@ class Rollback extends Abstract_Module {
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
+ // Style fix for the api link that gets outside the content.
+ echo '';
+
if ( false === $transient ) {
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
$plugin = $plugin_folder . '/' . $plugin_file;
$nonce = 'upgrade-plugin_' . $plugin;
@@ -241,7 +246,7 @@ class Rollback extends Abstract_Module {
delete_transient( $this->product->get_key() . '_warning_rollback' );
wp_die(
'',
- $title,
+ esc_attr( $title ),
array(
'response' => 200,
)
@@ -268,9 +273,12 @@ class Rollback extends Abstract_Module {
$transient = get_transient( $this->product->get_key() . '_warning_rollback' );
+ // Style fix for the api link that gets outside the content.
+ echo '';
+
if ( false === $transient ) {
set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
$theme = $folder . '/style.css';
$nonce = 'upgrade-theme_' . $theme;
@@ -281,7 +289,7 @@ class Rollback extends Abstract_Module {
delete_transient( $this->product->get_key() . '_warning_rollback' );
wp_die(
'',
- $title,
+ esc_attr( $title ),
array(
'response' => 200,
)
@@ -335,7 +343,7 @@ class Rollback extends Abstract_Module {
* @return bool Which version is greater?
*/
public function sort_rollback_array( $a, $b ) {
- return version_compare( $a['version'], $b['version'], '<' ) > 0;
+ return version_compare( $b['version'], $a['version'] );
}
/**
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php
index ea301996..6916947f 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php
@@ -805,7 +805,7 @@ class Translate extends Abstract_Module {
$translations = get_transient( $cache_key );
if ( false === $translations ) {
- require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
+ require_once ABSPATH . 'wp-admin/includes/translation-install.php';
$translations = translations_api(
$product->get_type() . 's',
array(
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
index a054f5cb..2d5bdc15 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
@@ -132,7 +132,7 @@ class Uninstall_Feedback extends Abstract_Module {
/**
* Loads the additional resources
*/
- function load_resources() {
+ public function load_resources() {
$screen = get_current_screen();
if ( ! $screen || ! in_array( $screen->id, array( 'theme-install', 'plugins' ) ) ) {
@@ -178,7 +178,7 @@ class Uninstall_Feedback extends Abstract_Module {
echo wp_kses_post( $info_disclosure_link );
echo wp_kses_post( $this->get_disclosure_labels() );
echo '
';
- echo get_submit_button(
+ echo get_submit_button( //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, Function has an internal sanitization.
$button_submit,
'secondary',
$this->product->get_key() . 'ti-deactivate-yes',
@@ -236,7 +236,7 @@ class Uninstall_Feedback extends Abstract_Module {
}
.ti-feedback .popup--form input[type="radio"] {
- margin: 0 10px 0 0;
+
}
.ti-feedback .popup--form input[type="radio"]:checked ~ textarea {
@@ -314,7 +314,7 @@ class Uninstall_Feedback extends Abstract_Module {
}
.ti-feedback .buttons input:last-child {
- margin-left: auto;
+
}
.ti-theme-uninstall-feedback-drawer {
@@ -366,13 +366,19 @@ class Uninstall_Feedback extends Abstract_Module {
content: "";
display: block;
position: absolute;
- border: 20px solid #23A1CE;
- left: -10px;
top: 50%;
- border-top: 20px solid transparent;
- border-bottom: 20px solid transparent;
- border-left: 0;
transform: translateY(-50%);
+
}
.ti-plugin-uninstall-feedback-popup {
@@ -380,7 +386,7 @@ class Uninstall_Feedback extends Abstract_Module {
position: absolute;
white-space: normal;
width: 400px;
- left: 100%;
+
top: -15px;
}
@@ -408,7 +414,7 @@ class Uninstall_Feedback extends Abstract_Module {
display: block;
}
- tr[data-plugin^="product->get_slug(); ?>"] .deactivate {
+ tr[data-plugin^="product->get_slug() ); ?>"] .deactivate {
position: relative;
}
@@ -469,20 +475,20 @@ class Uninstall_Feedback extends Abstract_Module {
var radio = $(this);
if (radio.parent().find('textarea').length > 0 &&
radio.parent().find('textarea').val().length === 0) {
- $('#ti-deactivate-yes').attr('disabled', 'disabled');
+ $('#ti-deactivate-yes').attr('disabled', 'disabled');
radio.parent().find('textarea').on('keyup', function (e) {
if ($(this).val().length === 0) {
- $('#ti-deactivate-yes').attr('disabled', 'disabled');
+ $('#ti-deactivate-yes').attr('disabled', 'disabled');
} else {
- $('#ti-deactivate-yes').removeAttr('disabled');
+ $('#ti-deactivate-yes').removeAttr('disabled');
}
});
} else {
- $('#ti-deactivate-yes').removeAttr('disabled');
+ $('#ti-deactivate-yes').removeAttr('disabled');
}
});
- $('#ti-deactivate-yes').on('click', function (e) {
+ $('#ti-deactivate-yes').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
@@ -490,7 +496,7 @@ class Uninstall_Feedback extends Abstract_Module {
'.ti-theme-uninstall-feedback-drawer input[name="ti-deactivate-option"]:checked');
$.post(ajaxurl, {
'action': '',
- 'nonce': '',
+ 'nonce': '',
'id': selectedOption.parent().attr('ti-option-id'),
'msg': selectedOption.parent().find('textarea').val(),
'type': 'theme',
@@ -523,12 +529,12 @@ class Uninstall_Feedback extends Abstract_Module {
';
+ echo '';
}
?>
@@ -561,13 +567,13 @@ class Uninstall_Feedback extends Abstract_Module {
echo wp_kses_post( $info_disclosure_link );
echo wp_kses_post( $this->get_disclosure_labels() );
echo '
';
- echo get_submit_button(
+ echo get_submit_button( //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, Function internals are escaped.
$button_cancel,
'secondary',
$this->product->get_key() . 'ti-deactivate-no',
false
);
- echo get_submit_button(
+ echo get_submit_button( //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, Function internals are escaped.
$button_submit,
'primary',
$this->product->get_key() . 'ti-deactivate-yes',
@@ -596,7 +602,7 @@ class Uninstall_Feedback extends Abstract_Module {