.*)/' : '' ),
+ array(
+ 'methods' => 'GET',
+ 'callback' => array( $this, 'checksum' ),
+ )
+ );
+ }
+
+ /**
+ * The checksum endpoint.
+ *
+ * @param WP_REST_Request $data the request.
+ *
+ * @return WP_REST_Response Response or the error
+ */
+ function checksum( WP_REST_Request $data ) {
+ $products = self::$products;
+ if ( self::PRODUCT_SPECIFIC ) {
+ $params = $this->validate_params( $data, array( 'slug' ) );
+ foreach ( self::$products as $product ) {
+ if ( $params['slug'] === $product->get_slug() ) {
+ $products = array( $product );
+ break;
+ }
+ }
+ }
+ $response = array();
+ $custom_css = $this->has_custom_css();
+ if ( is_bool( $custom_css ) ) {
+ $response['custom_css'] = $custom_css;
+ }
+
+ $response['child_theme'] = $this->get_theme_properties();
+
+ foreach ( $products as $product ) {
+ $files = array();
+ switch ( $product->get_type() ) {
+ case 'plugin':
+ $files = array();
+ break;
+ case 'theme':
+ $files = array( 'style.css', 'functions.php' );
+ break;
+ }
+
+ $error = '';
+
+ // if any element in the $files array contains a '/', this would imply recursion is required.
+ $diff = $this->generate_diff( $product, $files, array_reduce( $files, array( $this, 'is_recursion_required' ), false ) );
+ if ( is_wp_error( $diff ) ) {
+ $error = $diff->get_error_message();
+ $diff = array();
+ }
+
+ $response['products'][] = array(
+ 'slug' => $product->get_slug(),
+ 'version' => $product->get_version(),
+ 'diffs' => $diff,
+ 'error' => $error,
+ );
+ }
+
+ return new WP_REST_Response( array( 'checksum' => $response ) );
+ }
+
+ /**
+ * Get the current theme properties.
+ *
+ * @return array Properties of the current theme.
+ */
+ function get_theme_properties() {
+ if ( ! is_child_theme() ) {
+ return false;
+ }
+
+ $properties = array();
+ $theme = wp_get_theme();
+ // @codingStandardsIgnoreStart
+ $properties['name'] = $theme->Name;
+ // @codingStandardsIgnoreEnd
+
+ // get the files in the child theme.
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
+ WP_Filesystem();
+ global $wp_filesystem;
+ $path = str_replace( ABSPATH, $wp_filesystem->abspath(), get_stylesheet_directory() );
+ $list = $wp_filesystem->dirlist( $path, false, false );
+ if ( $list ) {
+ $list = array_keys( self::flatten_dirlist( $list ) );
+ $properties['files'] = $list;
+ }
+ return $properties;
+ }
+
+ /**
+ * Check if custom css has been added to the theme.
+ *
+ * @return bool Whether custom css has been added to the theme.
+ */
+ private function has_custom_css() {
+ $query = new WP_Query(
+ array(
+ 'post_type' => 'custom_css',
+ 'post_status' => 'publish',
+ 'numberposts' => 1,
+ 'update_post_meta_cache' => false,
+ 'update_post_term_cache' => false,
+ )
+ );
+
+ if ( $query->have_posts() ) {
+ $query->the_post();
+ $content = get_the_content();
+ // if the content contains a colon, a CSS rule has been added.
+ return strpos( $content, ':' ) === false ? false : true;
+ }
+ return false;
+ }
+
+ /**
+ * Check if recursion needs to be enabled on the WP_Filesystem by reducing the array of files to a boolean.
+ *
+ * @param string $carry Value of the previous iteration.
+ * @param string $item Value of the current iteration.
+ *
+ * @return bool Whether to recurse or not.
+ */
+ function is_recursion_required( $carry, $item ) {
+ if ( ! $carry ) {
+ return ( strpos( $item, '/' ) !== false );
+ }
+ return $carry;
+ }
+
+ /**
+ * Generate the diff of the files.
+ *
+ * @param ThemeIsle_SDK_Product $product Themeisle Product.
+ * @param array $files Array of files.
+ * @param bool $recurse Whether to recurse or not.
+ *
+ * @return string
+ */
+ private function generate_diff( $product, $files, $recurse = false ) {
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
+ WP_Filesystem();
+ global $wp_filesystem;
+
+ $diff = array();
+ $path = str_replace( ABSPATH, $wp_filesystem->abspath(), plugin_dir_path( $product->get_basefile() ) );
+ $list = $wp_filesystem->dirlist( $path, false, $recurse );
+ // nothing found.
+ if ( ! $list ) {
+ return $diff;
+ }
+ $list = array_keys( self::flatten_dirlist( $list ) );
+
+ // now let's get the valid files that actually exist.
+ if ( empty( $files ) ) {
+ $files = $list;
+ } else {
+ $files = array_intersect( $files, $list );
+ }
+
+ // fetch the calculated hashes.
+ if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
+ return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) );
+ }
+
+ $hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
+ ksort( $hashes );
+
+ $diff = array();
+ foreach ( $files as $file ) {
+ // file does not exist in the hashes.
+ if ( ! array_key_exists( $file, $hashes ) ) {
+ continue;
+ }
+ $new = md5( $wp_filesystem->get_contents( $path . $file ) );
+ $old = $hashes[ $file ];
+
+ // same hash, bail.
+ if ( $new === $old ) {
+ continue;
+ }
+ $diff[] = $file;
+ }
+ return $diff;
+ }
+
+ /**
+ * Flatten the results of WP_Filesystem::dirlist() for iterating over.
+ *
+ * @access private
+ *
+ * @param array $nested_files Array of files as returned by WP_Filesystem::dirlist().
+ * @param string $path Relative path to prepend to child nodes. Optional.
+ * @return array $files A flattened array of the $nested_files specified.
+ */
+ private static function flatten_dirlist( $nested_files, $path = '' ) {
+ $files = array();
+ foreach ( $nested_files as $name => $details ) {
+ $files[ $path . $name ] = $details;
+ // Append children recursively
+ if ( ! empty( $details['files'] ) ) {
+ $children = self::flatten_dirlist( $details['files'], $path . $name . '/' );
+ // Merge keeping possible numeric keys, which array_merge() will reindex from 0..n
+ $files = $files + $children;
+ }
+ }
+ return $files;
+ }
+
+ /**
+ * Validates the parameters to the API
+ *
+ * @param WP_REST_Request $data the request.
+ * @param array $params the parameters to validate.
+ *
+ * @return array of parameter name=>value
+ */
+ private function validate_params( WP_REST_Request $data, $params ) {
+ $collect = array();
+ foreach ( $params as $param ) {
+ $value = sanitize_text_field( $data[ $param ] );
+ if ( empty( $value ) ) {
+ return new WP_Error(
+ 'themeisle_' . $param . '_invalid', sprintf( 'Invalid %', $param ), array(
+ 'status' => 403,
+ )
+ );
+ } else {
+ $collect[ $param ] = $value;
+ }
+ }
+
+ return $collect;
+ }
+
+ }
+ endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php
new file mode 100644
index 0000000000..e1b76b2643
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php
@@ -0,0 +1,556 @@
+ array(
+ 'id' => 3,
+ 'type' => 'text',
+ 'placeholder' => 'What\'s the plugin\'s name?',
+ ),
+ 'I could not get the plugin to work' => array(
+ 'id' => 4,
+ ),
+ 'I no longer need the plugin' => array(
+ 'id' => 5,
+ 'type' => 'textarea',
+ 'placeholder' => 'If you could improve one thing about our product, what would it be?',
+ ),
+ 'It\'s a temporary deactivation. I\'m just debugging an issue.' => array(
+ 'id' => 6,
+ ),
+ );
+
+ /**
+ * @var array $options_theme The main options list for themes.
+ */
+ private $options_theme = array(
+ 'I don\'t know how to make it look like demo' => array(
+ 'id' => 7,
+ ),
+ 'It lacks options' => array(
+ 'id' => 8,
+ ),
+ 'Is not working with a plugin that I need' => array(
+ 'id' => 9,
+ 'type' => 'text',
+ 'placeholder' => 'What is the name of the plugin',
+ ),
+ 'I want to try a new design, I don\'t like {theme} style' => array(
+ 'id' => 10,
+ ),
+ );
+
+ /**
+ * @var array $other The other option
+ */
+ private $other = array(
+ 'Other' => array(
+ 'id' => 999,
+ 'type' => 'textarea',
+ 'placeholder' => 'cmon cmon tell us',
+ ),
+ );
+
+ /**
+ * @var string $heading_plugin The heading of the modal
+ */
+ private $heading_plugin = 'Quick Feedback Because we care about our clients, please leave us a feedback.';
+
+ /**
+ * @var string $heading_theme The heading of the modal
+ */
+ private $heading_theme = 'Looking to change {theme} What does not work for you?';
+
+ /**
+ * @var string $button_submit_before The text of the deactivate button before an option is chosen
+ */
+ private $button_submit_before = 'Skip & Deactivate';
+
+ /**
+ * @var string $button_submit The text of the deactivate button
+ */
+ private $button_submit = 'Submit & Deactivate';
+
+ /**
+ * @var string $button_cancel The text of the cancel button
+ */
+ private $button_cancel = 'Skip & Deactivate';
+
+ /**
+ * @var int how many seconds before the deactivation window is triggered for themes
+ */
+ const AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS = 3;
+
+ /**
+ * @var int how many days before the deactivation window pops up again for the theme
+ */
+ const PAUSE_DEACTIVATE_WINDOW_DAYS = 100;
+
+ /**
+ * ThemeIsle_SDK_Feedback_Deactivate constructor.
+ *
+ * @param ThemeIsle_SDK_Product $product_object The product object.
+ */
+ public function __construct( $product_object ) {
+ parent::__construct( $product_object );
+ }
+
+ /**
+ * Registers the hooks
+ */
+ public function setup_hooks_child() {
+ global $pagenow;
+
+ if ( ( $this->product->get_type() === 'plugin' && $pagenow === 'plugins.php' ) || ( $this->product->get_type() === 'theme' && $pagenow === 'theme-install.php' ) ) {
+ add_action( 'admin_head', array( $this, 'load_resources' ) );
+ }
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'post_deactivate' ) );
+ }
+
+ /**
+ * Loads the additional resources
+ */
+ function load_resources() {
+ add_thickbox();
+
+ $id = $this->product->get_key() . '_deactivate';
+
+ $this->add_css( $this->product->get_type(), $this->product->get_key() );
+ $this->add_js( $this->product->get_type(), $this->product->get_key(), '#TB_inline?' . apply_filters( $this->product->get_key() . '_feedback_deactivate_attributes', 'width=600&height=550' ) . '&inlineId=' . $id );
+
+ echo '' . $this->get_html( $this->product->get_type(), $this->product->get_key() ) . '
';
+ }
+
+ /**
+ * Loads the css
+ *
+ * @param string $type The type of product.
+ * @param string $key The product key.
+ */
+ function add_css( $type, $key ) {
+ $suffix = 'theme' === $type ? 'theme-install-php' : 'plugins-php';
+ ?>
+
+ heading_plugin : str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
+ $heading = apply_filters( $this->product->get_key() . '_feedback_deactivate_heading', $heading );
+ ?>
+
+ options_plugin : $this->options_theme;
+ $button_submit_before = 'plugin' === $type ? $this->button_submit_before : 'Submit';
+ $button_submit = 'plugin' === $type ? $this->button_submit : 'Submit';
+ $options = $this->randomize_options( apply_filters( $this->product->get_key() . '_feedback_deactivate_options', $options ) );
+ $button_submit_before = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit_before', $button_submit_before );
+ $button_submit = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_submit', $button_submit );
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_deactivate_button_cancel', $this->button_cancel );
+
+ $options += $this->other;
+
+ $list = '';
+ foreach ( $options as $title => $attributes ) {
+ $id = $attributes['id'];
+ $list .= '';
+ if ( array_key_exists( 'type', $attributes ) ) {
+ $list .= '';
+ $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
+ switch ( $attributes['type'] ) {
+ case 'text':
+ $list .= '';
+ break;
+ case 'textarea':
+ $list .= '';
+ break;
+ }
+ $list .= '
';
+ }
+ $list .= '';
+ }
+
+ return ''
+ . '
'
+ . '
'
+ . get_submit_button(
+ $button_submit, 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
+ 'data-after-text' => $button_submit,
+ 'disabled' => true,
+ )
+ )
+ . get_submit_button( $button_cancel, 'primary', $this->product->get_key() . 'ti-deactivate-no', false )
+ . '
';
+ }
+
+ /**
+ * Called when the deactivate button is clicked
+ */
+ function post_deactivate() {
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
+
+ if ( ! empty( $_POST['id'] ) ) {
+ $this->call_api(
+ array(
+ 'type' => 'deactivate',
+ 'id' => $_POST['id'],
+ 'comment' => isset( $_POST['msg'] ) ? $_POST['msg'] : '',
+ )
+ );
+ }
+
+ $this->post_deactivate_or_cancel();
+ }
+
+ /**
+ * Called when the deactivate/cancel button is clicked
+ */
+ private function post_deactivate_or_cancel() {
+ if ( isset( $_POST['type'] ) && isset( $_POST['key'] ) && 'theme' === $_POST['type'] ) {
+ set_transient( 'ti_sdk_pause_' . $_POST['key'], true, PAUSE_DEACTIVATE_WINDOW_DAYS * DAY_IN_SECONDS );
+ }
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php
new file mode 100644
index 0000000000..b4a64376fa
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php
@@ -0,0 +1,50 @@
+_instances[ $type ] = $instance;
+ $instance->setup_hooks();
+ }
+ }
+ }
+
+ /**
+ * Get the registered instances
+ */
+ public function get_instances() {
+ return $this->_instances;
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php
new file mode 100644
index 0000000000..7ae672b78e
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php
@@ -0,0 +1,209 @@
+{product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers!
~ {developer}, developer of {product}';
+
+ /**
+ * @var string $msg The text of the modal
+ */
+ private $msg = '';
+
+ /**
+ * @var string $button_cancel The text of the cancel button
+ */
+ private $button_cancel = 'No, thanks.';
+ /**
+ * @var array Developers who work for each type of product for review purpose.
+ */
+ private $developers = array(
+ 'plugin' => array( 'Marius', 'Bogdan' ),
+ 'theme' => array( 'Rodica', 'Andrei', 'Bogdan', 'Cristi' ),
+ );
+ /**
+ * @var string $button_already The text of the already did it button
+ */
+ private $button_do = 'Ok, I will gladly help.';
+
+ /**
+ * ThemeIsle_SDK_Feedback_Deactivate constructor.
+ *
+ * @param ThemeIsle_SDK_Product $product_object The product object.
+ */
+ public function __construct( $product_object ) {
+ parent::__construct( $product_object );
+ }
+
+ /**
+ * Registers the hooks
+ */
+ public function setup_hooks_child() {
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
+ }
+
+ /**
+ * Either we can notify or not.
+ *
+ * @return bool Notification available or not.
+ */
+ public function can_notify() {
+ if ( ! $this->product->is_wordpress_available() ) {
+ $this->disable();
+
+ return false;
+ }
+ $show = get_option( $this->product->get_key() . '_review_flag', 'yes' );
+ if ( 'no' === $show ) {
+ return false;
+ }
+ $finally_show = apply_filters( $this->product->get_key() . '_feedback_review_trigger', true );
+ if ( false !== $finally_show ) {
+ if ( is_array( $finally_show ) && ! empty( $finally_show ) ) {
+ $this->heading = $finally_show['heading'];
+ $this->msg = $finally_show['msg'];
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Shows the notification
+ */
+ function show_notification() {
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
+ }
+
+ /**
+ * Shows the admin notice
+ */
+ function admin_notices() {
+ $id = $this->product->get_key() . '_review';
+
+ $this->add_css( $this->product->get_key() );
+ $this->add_js( $this->product->get_key() );
+
+ echo '' . $this->get_html( $this->product->get_key() ) . '
';
+ }
+
+ /**
+ * Loads the css
+ *
+ * @param string $key The product key.
+ */
+ function add_css( $key ) {
+ ?>
+
+
+
+ product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
+ $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
+ $heading = str_replace(
+ array( '{product}' ),
+ $this->product->get_friendly_name(), $heading
+ );
+ $heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
+
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
+ $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
+ $msg = apply_filters( $this->product->get_key() . '_feedback_review_message', $this->msg );
+
+ return ''
+ . '
' . $heading . '
'
+ . ( $msg ? '
' . $msg . '
' : '' )
+ . '
'
+ . '
' . $button_do . ''
+ . get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
+ . '
';
+ }
+
+ /**
+ * Called when the either button is clicked
+ */
+ function dismiss() {
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
+
+ $this->disable();
+ }
+
+ /**
+ * Disables the notification
+ */
+ protected function disable() {
+ update_option( $this->product->get_key() . '_review_flag', 'no' );
+ }
+
+ /**
+ * Enables the notification
+ */
+ protected function enable() {
+ update_option( $this->product->get_key() . '_review_flag', 'yes' );
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php
new file mode 100644
index 0000000000..9860f2d002
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php
@@ -0,0 +1,983 @@
+{product} into as many languages as possible is a huge project. We still need help with a lot of them, so if you are good at translating into {language}, it would be greatly appreciated.
+The process is easy, and you can join by following the link below!';
+ /**
+ * @var string $button_cancel The text of the cancel button
+ */
+ private $button_cancel = 'No, thanks.';
+ /**
+ * @var string $button_already The text of the already did it button
+ */
+ private $button_do = 'Ok, I will gladly help.';
+ /**
+ * @var array Array of available locals.
+ */
+ private $locales = array(
+ 'af' => array(
+ 'slug' => 'af',
+ 'name' => 'Afrikaans',
+ ),
+ 'ak' => array(
+ 'slug' => 'ak',
+ 'name' => 'Akan',
+ ),
+ 'am' => array(
+ 'slug' => 'am',
+ 'name' => 'Amharic',
+ ),
+ 'ar' => array(
+ 'slug' => 'ar',
+ 'name' => 'Arabic',
+ ),
+ 'arq' => array(
+ 'slug' => 'arq',
+ 'name' => 'Algerian Arabic',
+ ),
+ 'ary' => array(
+ 'slug' => 'ary',
+ 'name' => 'Moroccan Arabic',
+ ),
+ 'as' => array(
+ 'slug' => 'as',
+ 'name' => 'Assamese',
+ ),
+ 'ast' => array(
+ 'slug' => 'ast',
+ 'name' => 'Asturian',
+ ),
+ 'az' => array(
+ 'slug' => 'az',
+ 'name' => 'Azerbaijani',
+ ),
+ 'azb' => array(
+ 'slug' => 'azb',
+ 'name' => 'South Azerbaijani',
+ ),
+ 'az_TR' => array(
+ 'slug' => 'az-tr',
+ 'name' => 'Azerbaijani (Turkey)',
+ ),
+ 'ba' => array(
+ 'slug' => 'ba',
+ 'name' => 'Bashkir',
+ ),
+ 'bal' => array(
+ 'slug' => 'bal',
+ 'name' => 'Catalan (Balear)',
+ ),
+ 'bcc' => array(
+ 'slug' => 'bcc',
+ 'name' => 'Balochi Southern',
+ ),
+ 'bel' => array(
+ 'slug' => 'bel',
+ 'name' => 'Belarusian',
+ ),
+ 'bg_BG' => array(
+ 'slug' => 'bg',
+ 'name' => 'Bulgarian',
+ ),
+ 'bn_BD' => array(
+ 'slug' => 'bn',
+ 'name' => 'Bengali',
+ ),
+ 'bo' => array(
+ 'slug' => 'bo',
+ 'name' => 'Tibetan',
+ ),
+ 'bre' => array(
+ 'slug' => 'br',
+ 'name' => 'Breton',
+ ),
+ 'bs_BA' => array(
+ 'slug' => 'bs',
+ 'name' => 'Bosnian',
+ ),
+ 'ca' => array(
+ 'slug' => 'ca',
+ 'name' => 'Catalan',
+ ),
+ 'ceb' => array(
+ 'slug' => 'ceb',
+ 'name' => 'Cebuano',
+ ),
+ 'ckb' => array(
+ 'slug' => 'ckb',
+ 'name' => 'Kurdish (Sorani)',
+ ),
+ 'co' => array(
+ 'slug' => 'co',
+ 'name' => 'Corsican',
+ ),
+ 'cs_CZ' => array(
+ 'slug' => 'cs',
+ 'name' => 'Czech',
+ ),
+ 'cy' => array(
+ 'slug' => 'cy',
+ 'name' => 'Welsh',
+ ),
+ 'da_DK' => array(
+ 'slug' => 'da',
+ 'name' => 'Danish',
+ ),
+ 'de_DE' => array(
+ 'slug' => 'de',
+ 'name' => 'German',
+ ),
+ 'de_CH' => array(
+ 'slug' => 'de-ch',
+ 'name' => 'German (Switzerland)',
+ ),
+ 'dv' => array(
+ 'slug' => 'dv',
+ 'name' => 'Dhivehi',
+ ),
+ 'dzo' => array(
+ 'slug' => 'dzo',
+ 'name' => 'Dzongkha',
+ ),
+ 'el' => array(
+ 'slug' => 'el',
+ 'name' => 'Greek',
+ ),
+ 'art_xemoji' => array(
+ 'slug' => 'art-xemoji',
+ 'name' => 'Emoji',
+ ),
+ 'en_US' => array(
+ 'slug' => 'en',
+ 'name' => 'English',
+ ),
+ 'en_AU' => array(
+ 'slug' => 'en-au',
+ 'name' => 'English (Australia)',
+ ),
+ 'en_CA' => array(
+ 'slug' => 'en-ca',
+ 'name' => 'English (Canada)',
+ ),
+ 'en_GB' => array(
+ 'slug' => 'en-gb',
+ 'name' => 'English (UK)',
+ ),
+ 'en_NZ' => array(
+ 'slug' => 'en-nz',
+ 'name' => 'English (New Zealand)',
+ ),
+ 'en_ZA' => array(
+ 'slug' => 'en-za',
+ 'name' => 'English (South Africa)',
+ ),
+ 'eo' => array(
+ 'slug' => 'eo',
+ 'name' => 'Esperanto',
+ ),
+ 'es_ES' => array(
+ 'slug' => 'es',
+ 'name' => 'Spanish (Spain)',
+ ),
+ 'es_AR' => array(
+ 'slug' => 'es-ar',
+ 'name' => 'Spanish (Argentina)',
+ ),
+ 'es_CL' => array(
+ 'slug' => 'es-cl',
+ 'name' => 'Spanish (Chile)',
+ ),
+ 'es_CO' => array(
+ 'slug' => 'es-co',
+ 'name' => 'Spanish (Colombia)',
+ ),
+ 'es_CR' => array(
+ 'slug' => 'es-cr',
+ 'name' => 'Spanish (Costa Rica)',
+ ),
+ 'es_GT' => array(
+ 'slug' => 'es-gt',
+ 'name' => 'Spanish (Guatemala)',
+ ),
+ 'es_MX' => array(
+ 'slug' => 'es-mx',
+ 'name' => 'Spanish (Mexico)',
+ ),
+ 'es_PE' => array(
+ 'slug' => 'es-pe',
+ 'name' => 'Spanish (Peru)',
+ ),
+ 'es_PR' => array(
+ 'slug' => 'es-pr',
+ 'name' => 'Spanish (Puerto Rico)',
+ ),
+ 'es_VE' => array(
+ 'slug' => 'es-ve',
+ 'name' => 'Spanish (Venezuela)',
+ ),
+ 'et' => array(
+ 'slug' => 'et',
+ 'name' => 'Estonian',
+ ),
+ 'eu' => array(
+ 'slug' => 'eu',
+ 'name' => 'Basque',
+ ),
+ 'fa_IR' => array(
+ 'slug' => 'fa',
+ 'name' => 'Persian',
+ ),
+ 'fa_AF' => array(
+ 'slug' => 'fa-af',
+ 'name' => 'Persian (Afghanistan)',
+ ),
+ 'fuc' => array(
+ 'slug' => 'fuc',
+ 'name' => 'Fulah',
+ ),
+ 'fi' => array(
+ 'slug' => 'fi',
+ 'name' => 'Finnish',
+ ),
+ 'fo' => array(
+ 'slug' => 'fo',
+ 'name' => 'Faroese',
+ ),
+ 'fr_FR' => array(
+ 'slug' => 'fr',
+ 'name' => 'French (France)',
+ ),
+ 'fr_BE' => array(
+ 'slug' => 'fr-be',
+ 'name' => 'French (Belgium)',
+ ),
+ 'fr_CA' => array(
+ 'slug' => 'fr-ca',
+ 'name' => 'French (Canada)',
+ ),
+ 'frp' => array(
+ 'slug' => 'frp',
+ 'name' => 'Arpitan',
+ ),
+ 'fur' => array(
+ 'slug' => 'fur',
+ 'name' => 'Friulian',
+ ),
+ 'fy' => array(
+ 'slug' => 'fy',
+ 'name' => 'Frisian',
+ ),
+ 'ga' => array(
+ 'slug' => 'ga',
+ 'name' => 'Irish',
+ ),
+ 'gd' => array(
+ 'slug' => 'gd',
+ 'name' => 'Scottish Gaelic',
+ ),
+ 'gl_ES' => array(
+ 'slug' => 'gl',
+ 'name' => 'Galician',
+ ),
+ 'gn' => array(
+ 'slug' => 'gn',
+ 'name' => 'Guaraní',
+ ),
+ 'gsw' => array(
+ 'slug' => 'gsw',
+ 'name' => 'Swiss German',
+ ),
+ 'gu' => array(
+ 'slug' => 'gu',
+ 'name' => 'Gujarati',
+ ),
+ 'hat' => array(
+ 'slug' => 'hat',
+ 'name' => 'Haitian Creole',
+ ),
+ 'hau' => array(
+ 'slug' => 'hau',
+ 'name' => 'Hausa',
+ ),
+ 'haw_US' => array(
+ 'slug' => 'haw',
+ 'name' => 'Hawaiian',
+ ),
+ 'haz' => array(
+ 'slug' => 'haz',
+ 'name' => 'Hazaragi',
+ ),
+ 'he_IL' => array(
+ 'slug' => 'he',
+ 'name' => 'Hebrew',
+ ),
+ 'hi_IN' => array(
+ 'slug' => 'hi',
+ 'name' => 'Hindi',
+ ),
+ 'hr' => array(
+ 'slug' => 'hr',
+ 'name' => 'Croatian',
+ ),
+ 'hu_HU' => array(
+ 'slug' => 'hu',
+ 'name' => 'Hungarian',
+ ),
+ 'hy' => array(
+ 'slug' => 'hy',
+ 'name' => 'Armenian',
+ ),
+ 'id_ID' => array(
+ 'slug' => 'id',
+ 'name' => 'Indonesian',
+ ),
+ 'ido' => array(
+ 'slug' => 'ido',
+ 'name' => 'Ido',
+ ),
+ 'is_IS' => array(
+ 'slug' => 'is',
+ 'name' => 'Icelandic',
+ ),
+ 'it_IT' => array(
+ 'slug' => 'it',
+ 'name' => 'Italian',
+ ),
+ 'ja' => array(
+ 'slug' => 'ja',
+ 'name' => 'Japanese',
+ ),
+ 'jv_ID' => array(
+ 'slug' => 'jv',
+ 'name' => 'Javanese',
+ ),
+ 'ka_GE' => array(
+ 'slug' => 'ka',
+ 'name' => 'Georgian',
+ ),
+ 'kab' => array(
+ 'slug' => 'kab',
+ 'name' => 'Kabyle',
+ ),
+ 'kal' => array(
+ 'slug' => 'kal',
+ 'name' => 'Greenlandic',
+ ),
+ 'kin' => array(
+ 'slug' => 'kin',
+ 'name' => 'Kinyarwanda',
+ ),
+ 'kk' => array(
+ 'slug' => 'kk',
+ 'name' => 'Kazakh',
+ ),
+ 'km' => array(
+ 'slug' => 'km',
+ 'name' => 'Khmer',
+ ),
+ 'kn' => array(
+ 'slug' => 'kn',
+ 'name' => 'Kannada',
+ ),
+ 'ko_KR' => array(
+ 'slug' => 'ko',
+ 'name' => 'Korean',
+ ),
+ 'kir' => array(
+ 'slug' => 'kir',
+ 'name' => 'Kyrgyz',
+ ),
+ 'lb_LU' => array(
+ 'slug' => 'lb',
+ 'name' => 'Luxembourgish',
+ ),
+ 'li' => array(
+ 'slug' => 'li',
+ 'name' => 'Limburgish',
+ ),
+ 'lin' => array(
+ 'slug' => 'lin',
+ 'name' => 'Lingala',
+ ),
+ 'lo' => array(
+ 'slug' => 'lo',
+ 'name' => 'Lao',
+ ),
+ 'lt_LT' => array(
+ 'slug' => 'lt',
+ 'name' => 'Lithuanian',
+ ),
+ 'lv' => array(
+ 'slug' => 'lv',
+ 'name' => 'Latvian',
+ ),
+ 'me_ME' => array(
+ 'slug' => 'me',
+ 'name' => 'Montenegrin',
+ ),
+ 'mg_MG' => array(
+ 'slug' => 'mg',
+ 'name' => 'Malagasy',
+ ),
+ 'mk_MK' => array(
+ 'slug' => 'mk',
+ 'name' => 'Macedonian',
+ ),
+ 'ml_IN' => array(
+ 'slug' => 'ml',
+ 'name' => 'Malayalam',
+ ),
+ 'mlt' => array(
+ 'slug' => 'mlt',
+ 'name' => 'Maltese',
+ ),
+ 'mn' => array(
+ 'slug' => 'mn',
+ 'name' => 'Mongolian',
+ ),
+ 'mr' => array(
+ 'slug' => 'mr',
+ 'name' => 'Marathi',
+ ),
+ 'mri' => array(
+ 'slug' => 'mri',
+ 'name' => 'Maori',
+ ),
+ 'ms_MY' => array(
+ 'slug' => 'ms',
+ 'name' => 'Malay',
+ ),
+ 'my_MM' => array(
+ 'slug' => 'mya',
+ 'name' => 'Myanmar (Burmese)',
+ ),
+ 'ne_NP' => array(
+ 'slug' => 'ne',
+ 'name' => 'Nepali',
+ ),
+ 'nb_NO' => array(
+ 'slug' => 'nb',
+ 'name' => 'Norwegian (Bokmål)',
+ ),
+ 'nl_NL' => array(
+ 'slug' => 'nl',
+ 'name' => 'Dutch',
+ ),
+ 'nl_BE' => array(
+ 'slug' => 'nl-be',
+ 'name' => 'Dutch (Belgium)',
+ ),
+ 'nn_NO' => array(
+ 'slug' => 'nn',
+ 'name' => 'Norwegian (Nynorsk)',
+ ),
+ 'oci' => array(
+ 'slug' => 'oci',
+ 'name' => 'Occitan',
+ ),
+ 'ory' => array(
+ 'slug' => 'ory',
+ 'name' => 'Oriya',
+ ),
+ 'os' => array(
+ 'slug' => 'os',
+ 'name' => 'Ossetic',
+ ),
+ 'pa_IN' => array(
+ 'slug' => 'pa',
+ 'name' => 'Punjabi',
+ ),
+ 'pl_PL' => array(
+ 'slug' => 'pl',
+ 'name' => 'Polish',
+ ),
+ 'pt_BR' => array(
+ 'slug' => 'pt-br',
+ 'name' => 'Portuguese (Brazil)',
+ ),
+ 'pt_PT' => array(
+ 'slug' => 'pt',
+ 'name' => 'Portuguese (Portugal)',
+ ),
+ 'ps' => array(
+ 'slug' => 'ps',
+ 'name' => 'Pashto',
+ ),
+ 'rhg' => array(
+ 'slug' => 'rhg',
+ 'name' => 'Rohingya',
+ ),
+ 'ro_RO' => array(
+ 'slug' => 'ro',
+ 'name' => 'Romanian',
+ ),
+ 'roh' => array(
+ 'slug' => 'roh',
+ 'name' => 'Romansh',
+ ),
+ 'ru_RU' => array(
+ 'slug' => 'ru',
+ 'name' => 'Russian',
+ ),
+ 'rue' => array(
+ 'slug' => 'rue',
+ 'name' => 'Rusyn',
+ ),
+ 'rup_MK' => array(
+ 'slug' => 'rup',
+ 'name' => 'Aromanian',
+ ),
+ 'sah' => array(
+ 'slug' => 'sah',
+ 'name' => 'Sakha',
+ ),
+ 'sa_IN' => array(
+ 'slug' => 'sa-in',
+ 'name' => 'Sanskrit',
+ ),
+ 'scn' => array(
+ 'slug' => 'scn',
+ 'name' => 'Sicilian',
+ ),
+ 'si_LK' => array(
+ 'slug' => 'si',
+ 'name' => 'Sinhala',
+ ),
+ 'sk_SK' => array(
+ 'slug' => 'sk',
+ 'name' => 'Slovak',
+ ),
+ 'sl_SI' => array(
+ 'slug' => 'sl',
+ 'name' => 'Slovenian',
+ ),
+ 'sna' => array(
+ 'slug' => 'sna',
+ 'name' => 'Shona',
+ ),
+ 'snd' => array(
+ 'slug' => 'snd',
+ 'name' => 'Sindhi',
+ ),
+ 'so_SO' => array(
+ 'slug' => 'so',
+ 'name' => 'Somali',
+ ),
+ 'sq' => array(
+ 'slug' => 'sq',
+ 'name' => 'Albanian',
+ ),
+ 'sq_XK' => array(
+ 'slug' => 'sq-xk',
+ 'name' => 'Shqip (Kosovo)',
+ ),
+ 'sr_RS' => array(
+ 'slug' => 'sr',
+ 'name' => 'Serbian',
+ ),
+ 'srd' => array(
+ 'slug' => 'srd',
+ 'name' => 'Sardinian',
+ ),
+ 'su_ID' => array(
+ 'slug' => 'su',
+ 'name' => 'Sundanese',
+ ),
+ 'sv_SE' => array(
+ 'slug' => 'sv',
+ 'name' => 'Swedish',
+ ),
+ 'sw' => array(
+ 'slug' => 'sw',
+ 'name' => 'Swahili',
+ ),
+ 'syr' => array(
+ 'slug' => 'syr',
+ 'name' => 'Syriac',
+ ),
+ 'szl' => array(
+ 'slug' => 'szl',
+ 'name' => 'Silesian',
+ ),
+ 'ta_IN' => array(
+ 'slug' => 'ta',
+ 'name' => 'Tamil',
+ ),
+ 'ta_LK' => array(
+ 'slug' => 'ta-lk',
+ 'name' => 'Tamil (Sri Lanka)',
+ ),
+ 'tah' => array(
+ 'slug' => 'tah',
+ 'name' => 'Tahitian',
+ ),
+ 'te' => array(
+ 'slug' => 'te',
+ 'name' => 'Telugu',
+ ),
+ 'tg' => array(
+ 'slug' => 'tg',
+ 'name' => 'Tajik',
+ ),
+ 'th' => array(
+ 'slug' => 'th',
+ 'name' => 'Thai',
+ ),
+ 'tir' => array(
+ 'slug' => 'tir',
+ 'name' => 'Tigrinya',
+ ),
+ 'tl' => array(
+ 'slug' => 'tl',
+ 'name' => 'Tagalog',
+ ),
+ 'tr_TR' => array(
+ 'slug' => 'tr',
+ 'name' => 'Turkish',
+ ),
+ 'tt_RU' => array(
+ 'slug' => 'tt',
+ 'name' => 'Tatar',
+ ),
+ 'tuk' => array(
+ 'slug' => 'tuk',
+ 'name' => 'Turkmen',
+ ),
+ 'twd' => array(
+ 'slug' => 'twd',
+ 'name' => 'Tweants',
+ ),
+ 'tzm' => array(
+ 'slug' => 'tzm',
+ 'name' => 'Tamazight (Central Atlas)',
+ ),
+ 'ug_CN' => array(
+ 'slug' => 'ug',
+ 'name' => 'Uighur',
+ ),
+ 'uk' => array(
+ 'slug' => 'uk',
+ 'name' => 'Ukrainian',
+ ),
+ 'ur' => array(
+ 'slug' => 'ur',
+ 'name' => 'Urdu',
+ ),
+ 'uz_UZ' => array(
+ 'slug' => 'uz',
+ 'name' => 'Uzbek',
+ ),
+ 'vi' => array(
+ 'slug' => 'vi',
+ 'name' => 'Vietnamese',
+ ),
+ 'wa' => array(
+ 'slug' => 'wa',
+ 'name' => 'Walloon',
+ ),
+ 'xho' => array(
+ 'slug' => 'xho',
+ 'name' => 'Xhosa',
+ ),
+ 'xmf' => array(
+ 'slug' => 'xmf',
+ 'name' => 'Mingrelian',
+ ),
+ 'yor' => array(
+ 'slug' => 'yor',
+ 'name' => 'Yoruba',
+ ),
+ 'zh_CN' => array(
+ 'slug' => 'zh-cn',
+ 'name' => 'Chinese (China)',
+ ),
+ 'zh_HK' => array(
+ 'slug' => 'zh-hk',
+ 'name' => 'Chinese (Hong Kong)',
+ ),
+ 'zh_TW' => array(
+ 'slug' => 'zh-tw',
+ 'name' => 'Chinese (Taiwan)',
+ ),
+ 'de_DE_formal' => array(
+ 'slug' => 'de/formal',
+ 'name' => 'German (Formal)',
+ ),
+ 'nl_NL_formal' => array(
+ 'slug' => 'nl/formal',
+ 'name' => 'Dutch (Formal)',
+ ),
+ 'de_CH_informal' => array(
+ 'slug' => 'de-ch/informal',
+ 'name' => 'Chinese (Taiwan)',
+ ),
+ 'pt_PT_ao90' => array(
+ 'slug' => 'pt/ao90',
+ 'name' => 'Portuguese (Portugal, AO90)',
+ ),
+ );
+
+ /**
+ * ThemeIsle_SDK_Feedback_Translate constructor.
+ *
+ * @param ThemeIsle_SDK_Product $product_object The product object.
+ */
+ public function __construct( $product_object ) {
+ parent::__construct( $product_object );
+ }
+
+ /**
+ * Return the locale path.
+ *
+ * @param string $locale Locale code.
+ *
+ * @return string Locale path.
+ */
+ private function get_locale_paths( $locale ) {
+ if ( empty( $locale ) ) {
+ return '';
+ }
+
+ $slug = isset( $this->locales[ $locale ] ) ? $this->locales[ $locale ]['slug'] : '';
+ if ( empty( $slug ) ) {
+ return '';
+ }
+ if ( strpos( $slug, '/' ) === false ) {
+ $slug .= '/default';
+ }
+ $url = 'https://translate.wordpress.org/projects/wp-' . $this->product->get_type() . 's/' . $this->product->get_slug() . '/' . ( $this->product->get_type() === 'plugin' ? 'dev/' : '' ) . $slug . '?filters%5Bstatus%5D=untranslated&sort%5Bby%5D=random';
+
+ return $url;
+ }
+
+ /**
+ * Registers the hooks
+ */
+ public function setup_hooks_child() {
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
+ }
+
+ /**
+ * Either we should show the notification or not.
+ *
+ * @return bool Valid notification.
+ */
+ function can_notify() {
+ if ( ! $this->product->is_wordpress_available() ) {
+ $this->disable();
+ return false;
+ }
+ $show = get_option( $this->product->get_key() . '_translate_flag', 'yes' );
+ if ( 'no' === $show ) {
+ return false;
+ }
+ $lang = $this->get_user_locale();
+ if ( 'en_US' === $lang ) {
+ return false;
+ }
+ $languages = $this->get_translations();
+ if ( ! is_array( $languages ) ) {
+ return false;
+ }
+ if ( ! isset( $languages['translations'] ) ) {
+ return false;
+ }
+
+ $languages = $languages['translations'];
+ $available = wp_list_pluck( $languages, 'language' );
+ if ( in_array( $lang, $available ) ) {
+ return false;
+ }
+ if ( ! isset( $this->locales[ $lang ] ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Get the user's locale.
+ */
+ private function get_user_locale() {
+ global $wp_version;
+ if ( version_compare( $wp_version, '4.7.0', '>=' ) ) {
+ return get_user_locale();
+ }
+ $user = wp_get_current_user();
+ if ( $user ) {
+ $locale = $user->locale;
+ }
+ return $locale ? $locale : get_locale();
+ }
+
+ /**
+ * Shows the notification
+ */
+ function show_notification() {
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
+ }
+
+ /**
+ * Shows the admin notice
+ */
+ function admin_notices() {
+ $id = $this->product->get_key() . '_translate';
+
+ $this->add_css( $this->product->get_key() );
+ $this->add_js( $this->product->get_key() );
+ $html = $this->get_html( $this->product->get_key() );
+
+ if ( $html ) {
+ echo '';
+ }
+ }
+
+ /**
+ * Loads the css
+ *
+ * @param string $key The product key.
+ */
+ function add_css( $key ) {
+ ?>
+
+
+
+ product->get_key() . '_all_languages';
+ $translations = get_transient( $cache_key );
+
+ if ( $translations === false ) {
+ require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
+ $translations = translations_api(
+ $this->product->get_type() . 's',
+ array(
+ 'slug' => $this->product->get_slug(),
+ 'version' => $this->product->get_version(),
+ )
+ );
+ set_transient( $cache_key, $translations, WEEK_IN_SECONDS );
+ }
+
+ return $translations;
+
+ }
+
+ /**
+ * Generates the HTML
+ *
+ * @param string $key The product key.
+ *
+ * @return void|string Html code of the notification.
+ */
+ function get_html( $key ) {
+ $lang = $this->get_user_locale();
+ $link = $this->get_locale_paths( $lang );
+ $heading = apply_filters( $this->product->get_key() . '_feedback_translate_heading', $this->heading );
+ $product = $this->product->get_friendly_name();
+ $heading = str_replace(
+ array( '{product}' ),
+ $product, $heading
+ );
+
+ $message = apply_filters( $this->product->get_key() . '_feedback_translation', $this->msg );
+ $language_meta = $this->locales[ $lang ];
+ $message = str_replace( '{language}', $language_meta['name'], $message );
+ $message = str_replace( '{product}', $product, $message );
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_translate_button_cancel', $this->button_cancel );
+ $button_do = apply_filters( $this->product->get_key() . '_feedback_translate_button_do', $this->button_do );
+
+ return ''
+ . '
' . $heading . '
'
+ . '
' . $message . '
'
+ . '
'
+ . '
' . $button_do . ' '
+ . get_submit_button( $button_cancel, 'translate-dismiss ' . $this->product->get_key() . '-ti-translate', $this->product->get_key() . 'ti-translate-no', false )
+ . '
';
+ }
+
+ /**
+ * Called when the either button is clicked
+ */
+ function dismiss() {
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
+
+ $this->disable();
+ }
+
+ /**
+ * Disables the notification
+ */
+ protected function disable() {
+
+ update_option( $this->product->get_key() . '_translate_flag', 'no' );
+ }
+
+ /**
+ * Enables the notification
+ */
+ protected function enable() {
+ update_option( $this->product->get_key() . '_translate_flag', 'yes' );
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
new file mode 100644
index 0000000000..8630319f38
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php
@@ -0,0 +1,90 @@
+product = $product_object;
+ }
+ $this->setup_hooks();
+ }
+
+ /**
+ * Registers the hooks and then delegates to the child
+ */
+ public function setup_hooks() {
+ $this->setup_hooks_child();
+ }
+
+ /**
+ * Calls the API
+ *
+ * @param string $attributes The attributes of the post body.
+ */
+ protected function call_api( $attributes ) {
+ $slug = $this->product->get_slug();
+ $version = $this->product->get_version();
+ $attributes['slug'] = $slug;
+ $attributes['version'] = $version;
+
+ $response = wp_remote_post(
+ $this->feedback_url, array(
+ 'body' => $attributes,
+ )
+ );
+ }
+
+ /**
+ * Randomizes the options array
+ *
+ * @param array $options The options array.
+ */
+ function randomize_options( $options ) {
+ $new = array();
+ $keys = array_keys( $options );
+ shuffle( $keys );
+
+ foreach ( $keys as $key ) {
+ $new[ $key ] = $options[ $key ];
+ }
+
+ return $new;
+ }
+
+ /**
+ * Abstract function for delegating to the child
+ */
+ protected abstract function setup_hooks_child();
+
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php
new file mode 100644
index 0000000000..30b6e8c37b
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php
@@ -0,0 +1,686 @@
+product = $product;
+
+ $this->product_key = $this->product->get_key() . '-update-response';
+ if ( ! $this->product->requires_license() ) {
+ $this->license_key = 'free';
+ } else {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ $this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
+ if ( $license_data !== '' ) {
+ $this->license_key = isset( $license_data->key ) ? $license_data->key : get_option( $this->product->get_key() . '_license', '' );
+ } else {
+ $this->license_key = get_option( $this->product->get_key() . '_license', '' );
+ }
+ $this->register_license_hooks();
+ }
+ }
+
+ /**
+ * Register license hooks for the themeisle products
+ */
+ public function register_license_hooks() {
+ add_action( 'admin_init', array( $this, 'register_settings' ) );
+ add_action( 'admin_init', array( $this, 'activate_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' ) );
+ }
+
+ /**
+ * @param string $r Update payload.
+ * @param string $url The api url.
+ *
+ * @return mixed List of themes to check for update.
+ */
+ function disable_wporg_update( $r, $url ) {
+
+ if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
+ return $r;
+ }
+
+ // Decode the JSON response
+ $themes = json_decode( $r['body']['themes'] );
+
+ unset( $themes->themes->{$this->product->get_slug()} );
+
+ // Encode the updated JSON response
+ $r['body']['themes'] = json_encode( $themes );
+
+ return $r;
+ }
+
+ /**
+ * Register the setting for the license of the product
+ *
+ * @return bool
+ */
+ public function register_settings() {
+ if ( ! is_admin() ) {
+ return false;
+ }
+ add_settings_field(
+ $this->product->get_key() . '_license',
+ $this->product->get_name() . ' license',
+ array( $this, 'license_view' ),
+ 'general'
+ );
+ }
+
+ /**
+ * The license view field
+ */
+ public function license_view() {
+ $status = $this->get_license_status();
+ $value = $this->license_key;
+
+ $activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', 'Activate' );
+ $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', 'Deactivate' );
+ $valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' );
+ $invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' );
+ $license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' );
+
+ echo '' . $valid_string ) : ( 'style="color:#fff;background: #dd3d36; display: inline-block;text-decoration: none;font-size: 13px;line-height: 26px;height: 26px; margin-left:5px; padding: 0 10px 1px; -webkit-border-radius: 3px;border-radius: 3px; ">' . $invalid_string ) ) . '
' . sprintf( $license_message, '' . $this->product->get_store_name() . ' ', $this->product->get_type() ) . '
';
+
+ }
+
+ /**
+ * Return the license status.
+ *
+ * @return string The License status.
+ */
+ public function get_license_status() {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( $license_data !== '' ) {
+ return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
+ } else {
+ return get_option( $this->product->get_key() . '_license_status', 'not_active' );
+ }
+
+ }
+
+ /**
+ * Check if the license is active or not
+ *
+ * @return bool
+ */
+ public function check_activation() {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( $license_data !== '' ) {
+ return isset( $license_data->error ) ? ( $license_data->error == 'no_activations_left' ) : false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Check if the license is about to expire in the next month
+ *
+ * @return bool
+ */
+ function check_expiration() {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( $license_data !== '' ) {
+ if ( isset( $license_data->expires ) ) {
+ if ( strtotime( $license_data->expires ) - time() < 30 * 24 * 3600 ) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Return the renew url from the store used
+ *
+ * @return string The renew url.
+ */
+ function renew_url() {
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( $license_data !== '' ) {
+ if ( isset( $license_data->download_id ) && isset( $license_data->key ) ) {
+ return $this->product->get_store_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
+ }
+ }
+
+ return $this->product->get_store_url();
+ }
+
+ /**
+ * Check if we hide the notificatin nag or not
+ *
+ * @param string $hide The notification to hide.
+ *
+ * @return bool Either hide them or not.
+ */
+ function check_hide( $hide ) {
+ return true;
+ }
+
+ /**
+ * Show the admin notice regarding the license status
+ *
+ * @return bool
+ */
+ function show_notice() {
+ if ( ! is_admin() ) {
+ return false;
+ }
+ $status = $this->get_license_status();
+ $no_activations_string = apply_filters(
+ $this->product->get_key() . '_lc_no_activations_string', 'No activations left for %s !!!. You need to
+ upgrade your plan in order to use %s on more
+ websites. Please ask the %s
+ Staff for more details.'
+ );
+ $no_valid_string = apply_filters(
+ $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add
+ your license code from your purchase history and validate it here. '
+ );
+ $expiration_string = apply_filters(
+ $this->product->get_key() . '_lc_expiration_string', 'Your license is about to expire
+ for %s. You can go to %s and renew it '
+ );
+ if ( $status != 'valid' ) {
+ if ( $this->check_activation() ) {
+ if ( $this->check_hide( 'activation' ) ) {
+ ?>
+
+
+ check_hide( 'valid' ) ) : ?>
+
+
+ product->get_name() . ' ' . $this->product->get_type(), $this->product->get_store_url(), admin_url( 'options-general.php' ) . '#' . $this->product->get_key() ); ?>
+
+
+
+ check_expiration() ) {
+ if ( $this->check_hide( 'expiration' ) ) {
+ ?>
+
+ product->get_key() . '_license_data' ) ) ) {
+ $license = $this->check_license();
+ set_transient( $this->product->get_key() . '_license_data', $license, 12 * HOUR_IN_SECONDS );
+ update_option( $this->product->get_key() . '_license_data', $license );
+ }
+
+ }
+
+ /**
+ * 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 );
+ }
+
+ /**
+ * Check the license status
+ *
+ * @return object The license data.
+ */
+ public function check_license() {
+ $status = $this->get_license_status();
+ if ( $status == 'not_active' ) {
+ $license_data = new stdClass();
+ $license_data->license = 'not_active';
+
+ return $license_data;
+ }
+ $license = trim( $this->license_key );
+ $api_params = array(
+ 'edd_action' => 'check_license',
+ 'license' => $license,
+ 'item_name' => rawurlencode( $this->product->get_name() ),
+ 'url' => rawurlencode( home_url() ),
+ );
+ // Call the custom API.
+ $response = wp_remote_get(
+ add_query_arg( $api_params, $this->product->get_store_url() ), array(
+ 'timeout' => 15,
+ 'sslverify' => false,
+ )
+ );
+ if ( is_wp_error( $response ) ) {
+ $license_data = new stdClass();
+ $license_data->license = 'valid';
+
+ } else {
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
+ if ( ! is_object( $license_data ) ) {
+ $license_data = new stdClass();
+ $license_data->license = 'valid';
+ }
+ }
+ $license_old = get_option( $this->product->get_key() . '_license_data', '' );
+ if ( $license_old->license == 'valid' && ( $license_data->license != $license_old->license ) ) {
+ $this->increment_failed_checks();
+ } else {
+ $this->reset_failed_checks();
+ }
+
+ if ( $this->failed_checks <= self::$max_failed ) {
+ return $license_old;
+ }
+
+ if ( isset( $license_old->hide_valid ) ) {
+ $license_data->hide_valid = true;
+ }
+
+ if ( ! isset( $license_data->key ) ) {
+ $license_data->key = isset( $license_old->key ) ? $license_old->key : '';
+ }
+
+ if ( isset( $license_old->hide_expiration ) ) {
+ $license_data->hide_expiration = true;
+ }
+
+ if ( isset( $license_old->hide_activation ) ) {
+ $license_data->hide_activation = true;
+ }
+
+ return $license_data;
+
+ }
+
+ /**
+ * Activate the license remotely
+ */
+ function activate_license() {
+ // listen for our activate button to be clicked
+ if ( isset( $_POST[ $this->product->get_key() . '_btn_trigger' ] ) ) {
+ $status = $this->get_license_status();
+ // retrieve the license from the database
+ $license = $_POST[ $this->product->get_key() . '_license' ];
+ $api_params = array(
+ 'license' => $license,
+ 'item_name' => rawurlencode( $this->product->get_name() ),
+ 'url' => rawurlencode( home_url() ),
+ );
+ if ( $status != 'valid' ) {
+ // data to send in our API request
+ $api_params['edd_action'] = 'activate_license';
+ } else {
+ $api_params['edd_action'] = 'deactivate_license';
+ }
+ // Call the custom API.
+ $response = wp_remote_get( add_query_arg( $api_params, $this->product->get_store_url() ) );
+ // make sure the response came back okay
+ if ( is_wp_error( $response ) ) {
+ $license_data = new stdClass();
+ $license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
+
+ } else {
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
+ if ( ! is_object( $license_data ) ) {
+ $license_data = new stdClass();
+ $license_data->license = ( $status != 'valid' ) ? 'valid' : 'invalid';
+ }
+ }
+ if ( ! isset( $license_data->key ) ) {
+ $license_data->key = $license;
+ }
+ if ( $license_data->license == 'valid' ) {
+ $this->reset_failed_checks();
+ }
+
+ if ( isset( $license_data->plan ) ) {
+ update_option( $this->product->get_key() . '_license_plan', $license_data->plan );
+ }
+
+ update_option( $this->product->get_key() . '_license_data', $license_data );
+ delete_transient( $this->product->get_key() . '_license_data' );
+ set_transient( $this->product->get_key() . '_license_data', $license_data, 12 * HOUR_IN_SECONDS );
+
+ }
+ }
+
+ /**
+ * Enable the license system
+ */
+ public function enable() {
+ if ( $this->product->get_type() == 'plugin' ) {
+ add_filter(
+ 'pre_set_site_transient_update_plugins', array(
+ $this,
+ 'pre_set_site_transient_update_plugins_filter',
+ )
+ );
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
+ add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
+ }
+ if ( $this->product->get_type() == '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( '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 );
+
+ }
+
+ }
+
+ /**
+ * Load the Themes screen
+ */
+ function load_themes_screen() {
+ add_thickbox();
+ add_action( 'admin_notices', array( &$this, 'update_nag' ) );
+ }
+
+ /**
+ * Alter the nag for themes update
+ */
+ function update_nag() {
+ $theme = wp_get_theme( $this->product->get_slug() );
+ $api_response = get_transient( $this->product_key );
+ if ( false === $api_response ) {
+ return;
+ }
+ $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
+ $update_message = apply_filters( 'themeisle_sdk_license_update_message', 'Updating this theme will lose any customizations you have made. Cancel to stop, OK to update.' );
+ $update_onclick = ' onclick="if ( confirm(\'' . esc_js( $update_message ) . '\') ) {return true;}return false;"';
+ if ( version_compare( $this->product->get_version(), $api_response->new_version, '<' ) ) {
+ echo '';
+ printf(
+ '
%1$s %2$s is available.
Check out what\'s new or
update now.',
+ $theme->get( 'Name' ),
+ $api_response->new_version,
+ '#TB_inline?width=640&inlineId=' . $this->product->get_version() . '_changelog',
+ $theme->get( 'Name' ),
+ $update_url,
+ $update_onclick
+ );
+ echo '
';
+ echo '';
+ echo wpautop( $api_response->sections['changelog'] );
+ echo '
';
+ }
+ }
+
+ /**
+ * @param mixed $value The transient data.
+ *
+ * @return mixed
+ */
+ function theme_update_transient( $value ) {
+ $update_data = $this->check_for_update();
+ if ( $update_data ) {
+ $value->response[ $this->product->get_slug() ] = $update_data;
+ }
+
+ return $value;
+ }
+
+ /**
+ * Delete the update transient
+ */
+ function delete_theme_update_transient() {
+ delete_transient( $this->product_key );
+ }
+
+ /**
+ * Check remote api for latest version.
+ *
+ * @return bool|mixed Update api response.
+ */
+ private function get_version_data() {
+ $api_params = array(
+ 'edd_action' => 'get_version',
+ 'version' => $this->product->get_version(),
+ 'license' => $this->license_key,
+ 'name' => $this->product->get_name(),
+ 'slug' => $this->product->get_slug(),
+ 'author' => $this->product->get_store_name(),
+ 'url' => rawurlencode( home_url() ),
+ );
+ $response = wp_remote_post(
+ $this->product->get_store_url(), array(
+ 'timeout' => 15,
+ 'sslverify' => false,
+ 'body' => $api_params,
+ )
+ );
+ if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
+ return false;
+ }
+ $update_data = json_decode( wp_remote_retrieve_body( $response ) );
+ if ( ! is_object( $update_data ) ) {
+ return false;
+ }
+
+ return $update_data;
+ }
+
+ /**
+ * Check for updates
+ *
+ * @return array|bool Either the update data or false in case of failure
+ */
+ function check_for_update() {
+ $theme = wp_get_theme( $this->product->get_slug() );
+ $update_data = get_transient( $this->product_key );
+
+ if ( false === $update_data ) {
+ $failed = false;
+
+ $update_data = $this->get_version_data();
+ if ( empty( $update_data ) ) {
+ $failed = true;
+ }
+ // If the response failed, try again in 30 minutes.
+ if ( $failed ) {
+ $data = new stdClass;
+ $data->new_version = $this->product->get_version();
+ set_transient( $this->product_key, $data, strtotime( '+30 minutes' ) );
+
+ return false;
+ } else {
+ $update_data->sections = maybe_unserialize( $update_data->sections );
+ set_transient( $this->product_key, $update_data, strtotime( '+12 hours' ) );
+ }
+ }
+ if ( ! isset( $update_data->new_version ) ) {
+ return false;
+ }
+ if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
+ return false;
+ }
+
+ return (array) $update_data;
+ }
+
+ /**
+ * Check for Updates at the defined API endpoint and modify the update array.
+ *
+ * This function dives into the update API just when WordPress creates its update array,
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
+ * It is reassembled from parts of the native WordPress plugin update code.
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
+ *
+ * @uses api_request()
+ *
+ * @param array $_transient_data Update array build by WordPress.
+ *
+ * @return array Modified update array with custom plugin data.
+ */
+ public function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
+ if ( empty( $_transient_data ) || ! $this->do_check ) {
+ $this->do_check = true;
+
+ return $_transient_data;
+ }
+ $api_response = $this->api_request();
+ 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;
+ }
+ }
+
+ return $_transient_data;
+ }
+
+ /**
+ * Calls the API and, if successfull, returns the object delivered by the API.
+ *
+ * @uses get_bloginfo()
+ * @uses wp_remote_post()
+ * @uses is_wp_error()
+ *
+ * @param string $_action The requested action.
+ * @param array $_data Parameters for the API action.
+ *
+ * @return false||object
+ */
+ private function api_request( $_action = '', $_data = '' ) {
+ $update_data = $this->get_version_data();
+ if ( empty( $update_data ) ) {
+ return false;
+ }
+ if ( $update_data && isset( $update_data->sections ) ) {
+ $update_data->sections = maybe_unserialize( $update_data->sections );
+ }
+ return $update_data;
+ }
+
+ /**
+ * Updates information on the "View version x.x details" page with custom data.
+ *
+ * @uses api_request()
+ *
+ * @param mixed $_data Plugin data.
+ * @param string $_action Action to send.
+ * @param object $_args Arguments to use.
+ *
+ * @return object $_data
+ */
+ public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
+ if ( ( $_action != 'plugin_information' ) || ! isset( $_args->slug ) || ( $_args->slug != $this->product->get_slug() ) ) {
+ return $_data;
+ }
+ $api_response = $this->api_request();
+ if ( false !== $api_response ) {
+ $_data = $api_response;
+ }
+
+ return $_data;
+ }
+
+ /**
+ * Disable SSL verification in order to prevent download update failures
+ *
+ * @param array $args Http args.
+ * @param string $url Url to check.
+ *
+ * @return object $array
+ */
+ 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;
+ }
+
+ return $args;
+ }
+
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
new file mode 100644
index 0000000000..b719853c26
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php
@@ -0,0 +1,96 @@
+get_slug() ] = $product_object;
+
+ $notifications = array();
+ // Based on the WordPress Available file header we enable the logger or not.
+ if ( ! $product_object->is_wordpress_available() && apply_filters( $product_object->get_key() . '_enable_licenser', true ) === true ) {
+ $licenser = new ThemeIsle_SDK_Licenser( $product_object );
+ $licenser->enable();
+ }
+
+ $logger = new ThemeIsle_SDK_Logger( $product_object );
+ if ( $product_object->is_logger_active() ) {
+ $logger->enable();
+ } else {
+ $notifications[] = $logger;
+ }
+
+ $feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
+
+ $instances = $feedback->get_instances();
+ if ( array_key_exists( 'review', $instances ) ) {
+ $notifications[] = $instances['review'];
+ }
+ if ( array_key_exists( 'translate', $instances ) ) {
+ $notifications[] = $instances['translate'];
+ }
+ new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
+ if ( ! $product_object->is_external_author() ) {
+ new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
+ }
+ if ( ! $product_object->is_external_author() ) {
+ new ThemeIsle_SDK_Rollback( $product_object );
+ }
+
+ new ThemeIsle_SDK_Endpoints( $product_object );
+
+ return self::$instance;
+ }
+
+ /**
+ * Get all products using the SDK.
+ *
+ * @return array Products available.
+ */
+ public static function get_products() {
+ return self::$products;
+ }
+
+
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php
new file mode 100644
index 0000000000..45f17a96f2
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php
@@ -0,0 +1,227 @@
+{product}? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
+
+ /**
+ * @var string $button_submit The text of the submit button
+ */
+ private $button_submit = 'Sure, I would love to help.';
+
+ /**
+ * @var string $button_cancel The text of the cancel button
+ */
+ private $button_cancel = 'No, thanks.';
+
+ /**
+ * ThemeIsle_SDK_Logger constructor.
+ *
+ * @param ThemeIsle_SDK_Product $product_object Product Object.
+ */
+ public function __construct( $product_object ) {
+ if ( $product_object instanceof ThemeIsle_SDK_Product ) {
+ $this->product = $product_object;
+ $this->product_cron = $product_object->get_key() . '_log_activity';
+ }
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
+ }
+
+
+ /**
+ * Start the cron to send the log. It will randomize the interval in order to not send all the logs at the same time.
+ */
+ public function enable() {
+ if ( ! wp_next_scheduled( $this->product_cron ) ) {
+ wp_schedule_single_event( time() + ( rand( 15, 24 ) * 3600 ), $this->product_cron );
+ }
+ add_action( $this->product_cron, array( $this, 'send_log' ) );
+ }
+
+ /**
+ * Send the statistics to the api endpoint
+ */
+ public function send_log() {
+ $environment = array();
+ $theme = wp_get_theme();
+ $environment['theme'] = array();
+ $environment['theme']['name'] = $theme->get( 'Name' );
+ $environment['theme']['author'] = $theme->get( 'Author' );
+ $environment['plugins'] = get_option( 'active_plugins' );
+
+ wp_remote_post(
+ $this->logging_url, array(
+ 'method' => 'POST',
+ 'timeout' => 3,
+ 'redirection' => 5,
+ 'headers' => array(
+ 'X-ThemeIsle-Event' => 'log_site',
+ ),
+ 'body' => array(
+ 'site' => get_site_url(),
+ 'slug' => $this->product->get_slug(),
+ 'version' => $this->product->get_version(),
+ 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
+ 'environment' => $environment,
+ 'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
+ ),
+ )
+ );
+ }
+
+ /**
+ * Dismiss the notification
+ */
+ function dismiss() {
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
+
+ $flag = intval( $_POST['enable'] ) === 1;
+ update_option( $this->product->logger_option, ( $flag ? 'yes' : 'no' ) );
+
+ if ( true === $flag ) {
+ $this->enable();
+ }
+ }
+
+ /**
+ * Either we should show the notification or not.
+ *
+ * @return bool Valida notification.
+ */
+ function can_notify() {
+ $show = $this->product->is_logger_active();
+ $checked = get_option( $this->product->logger_option, '' );
+ if ( ! $show && $checked == '' ) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Shows the notification
+ */
+ function show_notification() {
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
+ }
+
+ /**
+ * Shows the admin notice
+ */
+ function admin_notices() {
+ $id = $this->product->get_key() . '_logger';
+
+ $this->add_media( $this->product->get_key() );
+
+ echo '' . $this->get_html( $this->product->get_key() ) . '
';
+ }
+
+ /**
+ * Generates the HTML
+ *
+ * @param string $key The product key.
+ */
+ function get_html( $key ) {
+ $heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
+ $heading = str_replace(
+ array( '{product}' ), array(
+ trim( str_replace( 'Lite', '', $this->product->get_name() ) ),
+ ),
+ $heading
+ );
+ $button_submit = apply_filters( $this->product->get_key() . '_logger_button_submit', $this->button_submit );
+ $button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', $this->button_cancel );
+
+ return ''
+ . '
' . $heading . '
'
+ . '
'
+ . get_submit_button(
+ $button_submit, 'primary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-yes', false, array(
+ 'data-ti-log-enable' => 1,
+ )
+ )
+ . get_submit_button(
+ $button_cancel, 'secondary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-no', false, array(
+ 'data-ti-log-enable' => 0,
+ )
+ )
+ . '
';
+ }
+
+ /**
+ * Loads the js
+ *
+ * @param string $key The product key.
+ */
+ function add_media( $key ) {
+ ?>
+
+
+ product = $product_object;
+ $this->callbacks = $callbacks;
+ $this->setup_hooks();
+ }
+
+ /**
+ * Setup the notifications.
+ */
+ function setup_notifications() {
+ if ( ! current_user_can( 'manage_options' ) ) {
+ return;
+ }
+ // Load the notifications only if we have it installed after the required interval.
+ if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
+ if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
+ foreach ( $this->callbacks as $instance ) {
+ self::$notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
+ }
+ }
+ }
+ }
+
+ /**
+ * Setup the internal hooks
+ */
+ private function setup_hooks() {
+ add_action( 'admin_head', array( $this, 'show_notification' ) );
+ add_action( 'admin_init', array( $this, 'setup_notifications' ) );
+ }
+
+ /**
+ * Shows the notification
+ */
+ function show_notification() {
+ $instances = self::$notifications;
+ if ( empty( $instances ) ) {
+ return;
+ }
+
+ $available = array_keys( $instances );
+ $active = get_option( 'themeisle_sdk_active_notification', array() );
+
+ foreach ( $available as $key ) {
+ $instance = $instances[ $key ];
+ if ( $instance->can_notify() ) {
+
+ // Detect notification switch.
+ if ( empty( $active['key'] ) || ( $active['key'] != $key ) ) {
+ $active['key'] = $key;
+ $active['time'] = time();
+ update_option( 'themeisle_sdk_active_notification', $active );
+ }
+ if ( ( time() - $active['time'] ) > ( self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) ) {
+ $instance->show_notification();
+ }
+ break;
+ }
+ }
+
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
new file mode 100644
index 0000000000..b852681014
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
@@ -0,0 +1,635 @@
+basefile = $basefile;
+ $this->setup_from_path();
+ $this->setup_from_fileheaders();
+ }
+ }
+ $install = get_option( $this->get_key() . '_install', 0 );
+ if ( $install === 0 ) {
+ $install = time();
+ update_option( $this->get_key() . '_install', time() );
+ }
+ $this->install = $install;
+
+ $this->logger_option = $this->get_key() . '_logger_flag';
+
+ }
+
+ /**
+ * Setup props from fileheaders.
+ */
+ public function setup_from_fileheaders() {
+ $file_headers = array(
+ 'Requires License' => 'Requires License',
+ 'WordPress Available' => 'WordPress Available',
+ 'Pro Slug' => 'Pro Slug',
+ 'Version' => 'Version',
+ );
+ if ( $this->type == 'plugin' ) {
+ $file_headers['Name'] = 'Plugin Name';
+ $file_headers['AuthorName'] = 'Author';
+ $file_headers['AuthorURI'] = 'Author URI';
+ }
+ if ( $this->type == 'theme' ) {
+ $file_headers['Name'] = 'Theme Name';
+ $file_headers['AuthorName'] = 'Author';
+ $file_headers['AuthorURI'] = 'Author URI';
+ }
+ $file_headers = get_file_data( $this->basefile, $file_headers );
+
+ $this->name = $file_headers['Name'];
+ $this->store_name = $file_headers['AuthorName'];
+ $this->author_url = $file_headers['AuthorURI'];
+ $this->store_url = $file_headers['AuthorURI'];
+ if ( $this->is_external_author() ) {
+ $this->store_url = 'https://themeisle.com';
+ $this->store_name = 'ThemeIsle';
+ }
+ $this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
+ $this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
+ $this->pro_slug = ! empty( $file_headers['Pro Slug'] ) ? $file_headers['Pro Slug'] : '';
+ $this->version = $file_headers['Version'];
+ if ( $this->require_uninstall_feedback() ) {
+ $this->feedback_types[] = 'deactivate';
+ }
+ if ( $this->is_wordpress_available() ) {
+ $this->feedback_types[] = 'review';
+ $this->feedback_types[] = 'translate';
+ }
+ }
+
+ /**
+ * Check if the product is by external author or not.
+ *
+ * @return bool Either is external author or no.
+ */
+ public function is_external_author() {
+ foreach ( $this->allowed_authors as $author ) {
+ if ( strpos( $this->author_url, $author ) !== false ) {
+ return true;
+ }
+ if ( in_array( $this->get_slug(), $this->allowed_products ) ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * The magic var_dump info method.
+ *
+ * @return array Debug info.
+ */
+ public function __debugInfo() {
+ return array(
+ 'name' => $this->name,
+ 'slug' => $this->slug,
+ 'version' => $this->version,
+ 'basefile' => $this->basefile,
+ 'key' => $this->key,
+ 'type' => $this->type,
+ 'store_name' => $this->store_name,
+ 'store_url' => $this->store_url,
+ 'wordpress_available' => $this->wordpress_available,
+ 'requires_license' => $this->requires_license,
+ );
+
+ }
+
+ /**
+ * Setup props from path.
+ */
+ public function setup_from_path() {
+ $this->file = basename( $this->basefile );
+ $dir = dirname( $this->basefile );
+ $this->slug = basename( $dir );
+ $exts = explode( '.', $this->basefile );
+ $ext = $exts[ count( $exts ) - 1 ];
+ if ( $ext == 'css' ) {
+ $this->type = 'theme';
+ }
+ if ( $ext == 'php' ) {
+ $this->type = 'plugin';
+ }
+ $this->key = self::key_ready_name( $this->slug );
+ }
+
+ /**
+ * @param string $string the String to be normalized for cron handler.
+ *
+ * @return string $name The normalized string.
+ */
+ static function key_ready_name( $string ) {
+ return str_replace( '-', '_', strtolower( trim( $string ) ) );
+ }
+
+ /**
+ * Getter for product name.
+ *
+ * @return string The product name.
+ */
+ public function get_name() {
+ return $this->name;
+ }
+
+ /**
+ * Getter for product version.
+ *
+ * @return string The product version.
+ */
+ public function get_version() {
+ return $this->version;
+ }
+
+ /**
+ * If product is available on wordpress.org or not.
+ *
+ * @return bool Either is wp available or not.
+ */
+ public function is_wordpress_available() {
+ return $this->wordpress_available;
+ }
+
+ /**
+ * @return array Array of available versions.
+ */
+ private function get_plugin_versions() {
+
+ $url = sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->get_slug() );
+ $response = wp_remote_get( $url );
+ if ( is_wp_error( $response ) ) {
+ return array();
+ }
+ $response = wp_remote_retrieve_body( $response );
+ $response = maybe_unserialize( $response );
+
+ if ( ! is_object( $response ) ) {
+ return array();
+ }
+ if ( ! isset( $response->versions ) ) {
+ return array();
+ }
+ $versions = array();
+ foreach ( $response->versions as $version => $zip ) {
+ $versions[] = array(
+ 'version' => $version,
+ 'url' => $zip,
+ );
+ }
+
+ return $versions;
+ }
+
+ /**
+ * @return string Return license key, if available.
+ */
+ private function get_license() {
+ $license_data = get_option( $this->get_key() . '_license_data', '' );
+
+ if ( empty( $license_data ) ) {
+ return '';
+ }
+ if ( ! isset( $license_data->key ) ) {
+ return '';
+ }
+
+ return $license_data->key;
+ }
+
+ /**
+ * @return array Array of available versions.
+ */
+ private function get_pro_versions() {
+ $license = $this->get_license();
+ $store_url = trailingslashit( $this->store_url );
+ $url = sprintf( '%s?edd_action=get_versions&name=%s&url=%s&license=%s', $store_url, urlencode( $this->get_name() ), urlencode( get_site_url() ), $license );
+ $response = wp_remote_get( $url );
+ if ( is_wp_error( $response ) ) {
+ return array();
+ }
+ $response = wp_remote_retrieve_body( $response );
+ $response = json_decode( $response );
+ if ( ! is_object( $response ) ) {
+ return array();
+ }
+ if ( ! isset( $response->versions ) ) {
+ return array();
+ }
+ $versions = array();
+ foreach ( $response->versions as $key => $version ) {
+ $versions[] = array(
+ 'version' => $version->version,
+ 'url' => $version->file,
+ );
+ }
+
+ return $versions;
+ }
+
+ /**
+ * Return theme versions.
+ *
+ * @return array Theme versions array.
+ */
+ public function get_theme_versions() {
+ $url = sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->get_slug() );
+ $response = wp_remote_get( $url );
+ if ( is_wp_error( $response ) ) {
+ return array();
+ }
+ $response = wp_remote_retrieve_body( $response );
+ $response = json_decode( $response );
+
+ if ( ! is_object( $response ) ) {
+ return array();
+ }
+ if ( ! isset( $response->versions ) ) {
+ return array();
+ }
+ $versions = array();
+ foreach ( $response->versions as $version => $zip ) {
+ $versions[] = array(
+ 'version' => $version,
+ 'url' => $zip,
+ );
+ }
+
+ return $versions;
+ }
+
+ /**
+ * Get versions array from wp.org
+ *
+ * @return array Array of versions.
+ */
+ private function get_api_versions() {
+
+ $cache_key = $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions';
+ $cache_versions = get_transient( $cache_key );
+ if ( false === $cache_versions ) {
+ $versions = array();
+ if ( ! $this->is_wordpress_available() ) {
+ $versions = $this->get_pro_versions();
+ } else {
+ if ( $this->get_type() === 'plugin' ) {
+ $versions = $this->get_plugin_versions();
+ }
+ if ( $this->get_type() === 'theme' ) {
+ $versions = $this->get_theme_versions();
+ }
+ }
+ set_transient( $cache_key, $versions, 5 * DAY_IN_SECONDS );
+ } else {
+ $versions = is_array( $cache_versions ) ? $cache_versions : array();
+ }
+
+ return $versions;
+ }
+
+ /**
+ * Get the last rollback for this product.
+ *
+ * @return array The rollback version.
+ */
+ public function get_rollback() {
+ $rollback = array();
+ $versions = $this->get_api_versions();
+ $versions = apply_filters( $this->get_key() . '_rollbacks', $versions );
+
+ if ( $versions ) {
+ usort( $versions, array( $this, 'sort_rollback_array' ) );
+ foreach ( $versions as $version ) {
+ if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->version, $version['version'], '>' ) ) {
+ $rollback = $version;
+ break;
+ }
+ }
+ }
+
+ return $rollback;
+ }
+
+ /**
+ * Sort the rollbacks array in descending order.
+ */
+ public function sort_rollback_array( $a, $b ) {
+ return version_compare( $a['version'], $b['version'], '<' ) > 0;
+ }
+
+ /**
+ * If product can be rolled back.
+ *
+ * @return bool Can the product be rolled back or not.
+ */
+ public function can_rollback() {
+ if ( $this->get_type() === 'theme' ) {
+ if ( ! current_user_can( 'switch_themes' ) ) {
+ return false;
+ }
+ }
+ if ( $this->get_type() === 'plugin' ) {
+ if ( ! current_user_can( 'install_plugins' ) ) {
+ return false;
+ }
+ }
+ $rollback = $this->get_rollback();
+
+ return ! empty( $rollback );
+ }
+
+ /**
+ * Return the product key.
+ *
+ * @return string The product key.
+ */
+ public function get_key() {
+ return $this->key;
+ }
+
+ /**
+ * Return friendly name.
+ *
+ * @return string Friendly name.
+ */
+ public function get_friendly_name() {
+ $name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
+ $name = rtrim( $name, '- ' );
+
+ return $name;
+ }
+
+ /**
+ * Either the product requires license or not.
+ *
+ * @return bool Either requires license or not.
+ */
+ public function requires_license() {
+ return $this->requires_license;
+ }
+
+ /**
+ * Check if the product is either theme or plugin.
+ *
+ * @return string Product type.
+ */
+ public function get_type() {
+ return $this->type;
+ }
+
+ /**
+ * Returns the Store name.
+ *
+ * @return string Store name.
+ */
+ public function get_store_name() {
+ return $this->store_name;
+ }
+
+ /**
+ * Returns the store url.
+ *
+ * @return string The store url.
+ */
+ public function get_store_url() {
+ return $this->store_url;
+ }
+
+ /**
+ * Returns the product slug.
+ *
+ * @return string The product slug.
+ */
+ public function get_slug() {
+ return $this->slug;
+ }
+
+ /**
+ * Returns product basefile, which holds the metaheaders.
+ *
+ * @return string The product basefile.
+ */
+ public function get_basefile() {
+ return $this->basefile;
+ }
+
+ /**
+ * Returns product filename.
+ *
+ * @return string The product filename.
+ */
+ public function get_file() {
+ return $this->file;
+ }
+
+ /**
+ * Returns feedback types
+ *
+ * @return array The feedback types.
+ */
+ public function get_feedback_types() {
+ return apply_filters( $this->get_key() . '_feedback_types', $this->feedback_types );
+ }
+
+ /**
+ * Returns widget types
+ *
+ * @return array The widget types.
+ */
+ public function get_widget_types() {
+ return apply_filters( $this->get_key() . '_widget_types', $this->widget_types );
+ }
+
+ /**
+ * We log the user website and product version.
+ *
+ * @return bool Either we log the data or not.
+ */
+ public function is_logger_active() {
+ // If is not available on WordPress log this automatically.
+ if ( ! $this->is_wordpress_available() ) {
+ return true;
+ } else {
+ $pro_slug = $this->get_pro_slug();
+ if ( ! empty( $pro_slug ) ) {
+
+ $all_products = ThemeIsle_SDK_Loader::get_products();
+ if ( isset( $all_products[ $pro_slug ] ) ) {
+ return true;
+ }
+ }
+
+ return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
+
+ }
+ }
+
+ /**
+ * Returns the pro slug, if available.
+ *
+ * @return string The pro slug.
+ */
+ public function get_pro_slug() {
+ return $this->pro_slug;
+ }
+
+ /**
+ * Return the install timestamp.
+ *
+ * @return int The install timestamp.
+ */
+ public function get_install_time() {
+ return $this->install;
+ }
+
+ /**
+ * We require feedback on uninstall.
+ *
+ * @return bool Either we should require feedback on uninstall or not.
+ */
+ public function require_uninstall_feedback() {
+ if ( $this->get_type() == 'theme' && ! $this->is_external_author() ) {
+ return ! get_transient( 'ti_sdk_pause_' . $this->get_key(), false );
+ }
+
+ if ( $this->get_type() == 'plugin' ) {
+
+ return true;
+ }
+
+ return false;
+ }
+
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php
new file mode 100644
index 0000000000..2ec15b1130
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php
@@ -0,0 +1,223 @@
+product = $product_object;
+ }
+ if ( $this->product->can_rollback() ) {
+ $this->show_link();
+ $this->add_hooks();
+
+ }
+ }
+
+ /**
+ * Add js scripts for themes rollback.
+ */
+ public function add_footer() {
+ $screen = get_current_screen();
+ if ( ! isset( $screen->parent_file ) ) {
+ return;
+ }
+ if ( $screen->parent_file !== 'themes.php' ) {
+ return;
+ }
+ if ( $this->product->get_type() === 'plugin' ) {
+ return;
+ }
+
+ $version = $this->product->get_rollback();
+ ?>
+
+ product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
+ add_action( 'admin_footer', array( $this, 'add_footer' ) );
+ }
+
+ /**
+ * If product can be rolled back, show the link to rollback.
+ */
+ private function show_link() {
+ add_filter(
+ 'plugin_action_links_' . plugin_basename( $this->product->get_basefile() ), array(
+ $this,
+ 'add_rollback_link',
+ )
+ );
+ }
+
+ /**
+ * Show the rollback links in the plugin page.
+ *
+ * @return array The links.
+ */
+ public function add_rollback_link( $links ) {
+ $version = $this->product->get_rollback();
+ $links[] = '' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '';
+
+ return $links;
+ }
+
+ /**
+ * Start the rollback operation.
+ */
+ public function start_rollback() {
+ if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
+ wp_nonce_ays( '' );
+ }
+
+ if ( $this->product->get_type() === 'plugin' ) {
+ $this->start_rollback_plugin();
+ } elseif ( $this->product->get_type() === 'theme' ) {
+ $this->start_rollback_theme();
+ }
+ }
+
+ /**
+ * Alter links and remove duplicate customize message.
+ *
+ * @param array $links Array of old links.
+ *
+ * @return mixed Array of links.
+ */
+ public function alter_links_theme_upgrade( $links ) {
+ if ( isset( $links['preview'] ) ) {
+ $links['preview'] = str_replace( 'Customize', '', $links['preview'] );
+ }
+
+ return $links;
+ }
+
+ /**
+ * Start the rollback operation for the theme.
+ */
+ private function start_rollback_theme() {
+ add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
+ $rollback = $this->product->get_rollback();
+ $transient = get_site_transient( 'update_themes' );
+ $folder = $this->product->get_slug();
+ $version = $rollback['version'];
+ $temp_array = array(
+ 'new_version' => $version,
+ 'package' => $rollback['url'],
+ );
+
+ $transient->response[ $folder . '/style.css' ] = $temp_array;
+ set_site_transient( 'update_themes', $transient );
+
+ $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
+
+ if ( false === $transient ) {
+ set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
+ 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;
+ $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
+
+ $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
+ $upgrader->upgrade( $theme );
+ delete_transient( $this->product->get_key() . '_warning_rollback' );
+ wp_die(
+ '', $title, array(
+ 'response' => 200,
+ )
+ );
+ }
+ }
+
+ /**
+ * Start the rollback operation for the plugin.
+ */
+ private function start_rollback_plugin() {
+ $rollback = $this->product->get_rollback();
+ $plugin_transient = get_site_transient( 'update_plugins' );
+ $plugin_folder = $this->product->get_slug();
+ $plugin_file = $this->product->get_file();
+ $version = $rollback['version'];
+ $temp_array = array(
+ 'slug' => $plugin_folder,
+ 'new_version' => $version,
+ 'package' => $rollback['url'],
+ );
+
+ $temp_object = (object) $temp_array;
+ $plugin_transient->response[ $plugin_folder . '/' . $plugin_file ] = $temp_object;
+ set_site_transient( 'update_plugins', $plugin_transient );
+
+ $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
+
+ if ( false === $transient ) {
+ set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
+ 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;
+ $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
+ $upgrader_skin = new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) );
+ $upgrader = new Plugin_Upgrader( $upgrader_skin );
+ $upgrader->upgrade( $plugin );
+ delete_transient( $this->product->get_key() . '_warning_rollback' );
+ wp_die(
+ '', $title, array(
+ 'response' => 200,
+ )
+ );
+ }
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php
new file mode 100644
index 0000000000..dc9d2ebb80
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php
@@ -0,0 +1,412 @@
+product = $product_object;
+ parent::__construct( $product_object );
+ }
+
+ /**
+ * Registers the hooks
+ */
+ public function setup_hooks_child() {
+ $this->setup_vars();
+ add_action( 'wp_dashboard_setup', array( &$this, 'add_widget' ) );
+ add_action( 'wp_network_dashboard_setup', array( &$this, 'add_widget' ) );
+ add_filter( 'themeisle_sdk_recommend_plugin_or_theme', array( &$this, 'recommend_plugin_or_theme' ) );
+ }
+
+ /**
+ * Setup class variables
+ */
+ function setup_vars() {
+ $this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' );
+ $this->feeds = apply_filters(
+ 'themeisle_sdk_dashboard_widget_feeds', array(
+ 'https://themeisle.com/blog/feed',
+ )
+ );
+ }
+
+ /**
+ * Add widget to the dashboard
+ *
+ * @return string|void
+ */
+ function add_widget() {
+ global $wp_meta_boxes;
+ if ( isset( $wp_meta_boxes['dashboard']['normal']['core']['themeisle'] ) ) {
+ return;
+ }
+ wp_add_dashboard_widget(
+ 'themeisle', $this->dashboard_name, array(
+ &$this,
+ 'render_dashboard_widget',
+ )
+ );
+ }
+
+ /**
+ * Setup feed items.
+ */
+ private function setup_feeds() {
+ $items_normalized = array();
+ if ( false === ( $items_normalized = get_transient( 'themeisle_sdk_feed_items' ) ) ) {
+ // Load SimplePie Instance
+ $feed = fetch_feed( $this->feeds );
+ // TODO report error when is an error loading the feed
+ if ( is_wp_error( $feed ) ) {
+ return;
+ }
+
+ $items = $feed->get_items( 0, 5 );
+ foreach ( (array) $items as $item ) {
+ $items_normalized[] = array(
+ 'title' => $item->get_title(),
+ 'date' => $item->get_date( 'U' ),
+ 'link' => $item->get_permalink(),
+ );
+ }
+ set_transient( 'themeisle_sdk_feed_items', $items_normalized, 48 * HOUR_IN_SECONDS );
+ }
+ $this->items = $items_normalized;
+ }
+
+ /**
+ * Render widget content
+ */
+ function render_dashboard_widget() {
+ $this->setup_feeds();
+ if ( empty( $this->items ) || ! is_array( $this->items ) ) {
+ return;
+ }
+ ?>
+
+
+ items as $item ) {
+ ?>
+ -
+
+
+
+
+
+
+ $recommend['slug'],
+ ), network_admin_url( 'theme-install.php' )
+ );
+
+ if ( 'plugin' === $type ) {
+
+ $url = add_query_arg(
+ array(
+ 'tab' => 'plugin-information',
+ 'plugin' => $recommend['slug'],
+ ), network_admin_url( 'plugin-install.php' )
+ );
+ }
+ ?>
+
+
+
+
+ exists();
+ } else {
+ $all_plugins = array_keys( get_plugins() );
+ foreach ( $all_plugins as $slug ) {
+ if ( strpos( $slug, $val['slug'] ) !== false ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Fetch themes from wporg api.
+ *
+ * @param string $author The author name.
+ *
+ * @return array The list of themes.
+ */
+ function get_themes_from_wporg( $author ) {
+ $products = wp_remote_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 ) );
+ if ( is_object( $products ) ) {
+ $products = isset( $products->themes ) ? $products->themes : array();
+ } else {
+ $products = array();
+ }
+
+ return $products;
+ }
+
+ /**
+ * Fetch plugin from wporg api.
+ *
+ * @param string $author The author slug.
+ *
+ * @return array The list of plugins for the selected author.
+ */
+ function get_plugins_from_wporg( $author ) {
+ $products = wp_remote_get(
+ 'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[author]=' . $author . '&request[author]=codeinwp&request[per_page]=20&request[fields][active_installs]=true'
+ );
+ $products = json_decode( wp_remote_retrieve_body( $products ) );
+ if ( is_object( $products ) ) {
+ $products = isset( $products->plugins ) ? $products->plugins : array();
+ } else {
+ $products = array();
+ }
+
+ return $products;
+ }
+
+ /**
+ * Fetch products from the recomended section.
+ *
+ * @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' ) ) ) {
+ $products = array();
+ $themeisle_themes = $this->get_themes_from_wporg( 'themeisle' );
+ $codeinwp_themes = $this->get_themes_from_wporg( 'codeinwp' );
+
+ $themeisle_plugins = $this->get_plugins_from_wporg( 'themeisle' );
+ $codeinwp_plugins = $this->get_plugins_from_wporg( 'codeinwp' );
+
+ $all_themes = array_merge( $themeisle_themes, $codeinwp_themes );
+ foreach ( $all_themes as $theme ) {
+ if ( $theme->active_installs < 4999 ) {
+ continue;
+ }
+ $products[] = array(
+ 'name' => $theme->name,
+ 'type' => 'theme',
+ 'slug' => $theme->slug,
+ 'installs' => $theme->active_installs,
+ );
+ }
+ $all_plugins = array_merge( $themeisle_plugins, $codeinwp_plugins );
+ foreach ( $all_plugins as $plugin ) {
+ if ( $plugin->active_installs < 5999 ) {
+ continue;
+ }
+ $products[] = array(
+ 'name' => $plugin->name,
+ 'type' => 'plugin',
+ 'slug' => $plugin->slug,
+ 'installs' => $plugin->active_installs,
+ );
+ }
+ set_transient( 'themeisle_sdk_products', $products, 6 * HOUR_IN_SECONDS );
+ }
+
+ return $products;
+ }
+
+ /**
+ * Contact the API and fetch the recommended plugins/themes
+ */
+ function recommend_plugin_or_theme() {
+ $products = $this->get_product_from_api();
+ if ( ! is_array( $products ) ) {
+ $products = array();
+ }
+ $products = array_filter( $products, array( $this, 'remove_current_products' ) );
+ $products = array_merge( $products );
+ if ( count( $products ) > 1 ) {
+ shuffle( $products );
+ $products = array_slice( $products, 0, 1 );
+ }
+ $to_recommend = isset( $products[0] ) ? $products[0] : $products;
+
+ return $to_recommend;
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php
new file mode 100644
index 0000000000..7f27379f83
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php
@@ -0,0 +1,50 @@
+product = $product_object;
+ }
+ $this->setup_hooks();
+ }
+
+ /**
+ * Registers the hooks and then delegates to the child
+ */
+ public function setup_hooks() {
+ $this->setup_hooks_child();
+ }
+
+ /**
+ * Abstract function for delegating to the child
+ */
+ protected abstract function setup_hooks_child();
+
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php
new file mode 100644
index 0000000000..81a57bcd12
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php
@@ -0,0 +1,37 @@
+setup_hooks();
+ }
+ }
+ }
+ }
+endif;
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/composer.json b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/composer.json
new file mode 100644
index 0000000000..09cffcf8e9
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/composer.json
@@ -0,0 +1,24 @@
+{
+ "name": "codeinwp/themeisle-sdk",
+ "description": "ThemeIsle SDK ",
+ "keywords": [
+ "wordpress"
+ ],
+ "homepage": "https://github.com/Codeinwp/themeisle-sdk",
+ "license": "GPL-2.0+",
+ "authors": [
+ {
+ "name": "ThemeIsle team",
+ "email": "friends@themeisle.com",
+ "homepage": "https://themeisle.com"
+ }
+ ],
+ "autoload": {
+ "files": [
+ "load.php"
+ ]
+ },
+ "support": {
+ "issues": "https://github.com/Codeinwp/themeisle-sdk/issues"
+ }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/index.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/index.php
new file mode 100644
index 0000000000..94b4ee26f1
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/index.php
@@ -0,0 +1,5 @@
+= 0 ) {
+ $themeisle_sdk_max_version = $themeisle_sdk_version;
+ $themeisle_sdk_max_path = $themeisle_sdk_path;
+}
+
+// load the latest sdk version from the active Themeisle products
+if ( ! function_exists( 'themeisle_sdk_load_latest' ) ) :
+ /**
+ * Always load the latest sdk version.
+ */
+ function themeisle_sdk_load_latest() {
+ global $themeisle_sdk_max_path;
+ require_once $themeisle_sdk_max_path . '/start.php';
+ }
+endif;
+add_action( 'init', 'themeisle_sdk_load_latest' );
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php
new file mode 100644
index 0000000000..11cac46939
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php
@@ -0,0 +1,38 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier
+ * @author Jordi Boggiano
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ // PSR-4
+ private $prefixLengthsPsr4 = array();
+ private $prefixDirsPsr4 = array();
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ private $prefixesPsr0 = array();
+ private $fallbackDirsPsr0 = array();
+
+ private $useIncludePath = false;
+ private $classMap = array();
+
+ private $classMapAuthoritative = false;
+
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
+ }
+
+ return array();
+ }
+
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ (array) $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ (array) $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 base directories
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return bool|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ includeFile($file);
+
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
+
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative) {
+ return false;
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if ($file === null && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if ($file === null) {
+ // Remember that this class does not exist.
+ return $this->classMap[$class] = false;
+ }
+
+ return $file;
+ }
+
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+ }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/wp-content/plugins/menu-icons/vendor/composer/LICENSE b/wp-content/plugins/menu-icons/vendor/composer/LICENSE
new file mode 100644
index 0000000000..1a28124886
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) 2016 Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_classmap.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000000..7a91153b0d
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_classmap.php
@@ -0,0 +1,9 @@
+ $vendorDir . '/codeinwp/themeisle-sdk/load.php',
+ '0498965e576e4ec1efaedeccfee8b5f0' => $vendorDir . '/codeinwp/menu-item-custom-fields/menu-item-custom-fields.php',
+ '347e48cf03d89942a6ddafc17d247b11' => $vendorDir . '/codeinwp/icon-picker/icon-picker.php',
+ '5a095c604245b0e67e4573f0a3b240cd' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
+);
diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_namespaces.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_namespaces.php
new file mode 100644
index 0000000000..b7fc0125db
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+ $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+
+ $loader->register(true);
+
+ $includeFiles = require __DIR__ . '/autoload_files.php';
+ foreach ($includeFiles as $fileIdentifier => $file) {
+ composerRequire13eb48706f29258ff3a0d5c6cbadd39c($fileIdentifier, $file);
+ }
+
+ return $loader;
+ }
+}
+
+function composerRequire13eb48706f29258ff3a0d5c6cbadd39c($fileIdentifier, $file)
+{
+ if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
+ require $file;
+
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+ }
+}
diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.json b/wp-content/plugins/menu-icons/vendor/composer/installed.json
new file mode 100644
index 0000000000..e181e5377f
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/composer/installed.json
@@ -0,0 +1,120 @@
+[
+ {
+ "name": "codeinwp/themeisle-sdk",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Codeinwp/themeisle-sdk.git",
+ "reference": "951cde6e799e00d46a52416b62221fd771ddc326"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/951cde6e799e00d46a52416b62221fd771ddc326",
+ "reference": "951cde6e799e00d46a52416b62221fd771ddc326",
+ "shasum": ""
+ },
+ "time": "2018-11-26 14:24:47",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "load.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0+"
+ ],
+ "authors": [
+ {
+ "name": "ThemeIsle team",
+ "email": "friends@themeisle.com",
+ "homepage": "https://themeisle.com"
+ }
+ ],
+ "description": "ThemeIsle SDK ",
+ "homepage": "https://github.com/Codeinwp/themeisle-sdk",
+ "keywords": [
+ "wordpress"
+ ]
+ },
+ {
+ "name": "codeinwp/icon-picker",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Codeinwp/icon-picker.git",
+ "reference": "cbd7250116379254674c752b9a197e0a377a7580"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Codeinwp/icon-picker/zipball/cbd7250116379254674c752b9a197e0a377a7580",
+ "reference": "cbd7250116379254674c752b9a197e0a377a7580",
+ "shasum": ""
+ },
+ "require": {
+ "composer/installers": "~1.0"
+ },
+ "require-dev": {
+ "wp-coding-standards/wpcs": "^0.10.0"
+ },
+ "time": "2018-12-10 16:06:38",
+ "type": "wordpress-plugin",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0"
+ ],
+ "description": "Pick an icon of your choice.",
+ "homepage": "https://github.com/codeinwp/icon-picker",
+ "keywords": [
+ "dashicons",
+ "elusive",
+ "font-awesome",
+ "foundation-icons",
+ "genericons",
+ "icons",
+ "plugin",
+ "wordpress"
+ ]
+ },
+ {
+ "name": "codeinwp/menu-item-custom-fields",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Codeinwp/menu-item-custom-fields.git",
+ "reference": "0155ce0f0a959d6f227edcff7d16e2a326d9269b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Codeinwp/menu-item-custom-fields/zipball/0155ce0f0a959d6f227edcff7d16e2a326d9269b",
+ "reference": "0155ce0f0a959d6f227edcff7d16e2a326d9269b",
+ "shasum": ""
+ },
+ "require": {
+ "composer/installers": "~1.0"
+ },
+ "require-dev": {
+ "wp-coding-standards/wpcs": "^0.10.0"
+ },
+ "time": "2018-12-10 16:01:32",
+ "type": "wordpress-plugin",
+ "installation-source": "dist",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0"
+ ],
+ "description": "Easily add custom fields to nav menu items.",
+ "homepage": "https://github.com/Codeinwp/wp-menu-item-custom-fields",
+ "keywords": [
+ "custom-fields",
+ "menu",
+ "plugin",
+ "wordpress"
+ ]
+ }
+]
diff --git a/wp-content/themes/accelerate-theme-child/archive-case_studies.php b/wp-content/themes/accelerate-theme-child/archive-case_studies.php
new file mode 100644
index 0000000000..381438b694
--- /dev/null
+++ b/wp-content/themes/accelerate-theme-child/archive-case_studies.php
@@ -0,0 +1,49 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/accelerate-theme-child/footer.php b/wp-content/themes/accelerate-theme-child/footer.php
new file mode 100644
index 0000000000..514f43e6b3
--- /dev/null
+++ b/wp-content/themes/accelerate-theme-child/footer.php
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+