Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-includes/ID3/mailchimp-for-wp.zip
Назад
PK �(,]���� config/default-form-content.phpnu ��� <?php $email_label = esc_html__('Email address', 'mailchimp-for-wp'); $email_placeholder_attr = esc_attr__('Your email address', 'mailchimp-for-wp'); $signup_button_value = esc_attr__('Sign up', 'mailchimp-for-wp'); $content = "<p>\n\t<label for=\"email\">{$email_label}: \n"; $content .= "\t\t<input type=\"email\" id=\"email\" name=\"EMAIL\" placeholder=\"{$email_placeholder_attr}\" required>\n\t</label>\n</p>\n\n"; $content .= "<p>\n\t<input type=\"submit\" value=\"{$signup_button_value}\">\n</p>"; return $content; PK �(,]�E/�q q config/default-form-settings.phpnu ��� <?php return [ 'css' => 0, 'double_optin' => 1, 'hide_after_success' => 0, 'lists' => [], 'redirect' => '', 'replace_interests' => 1, 'required_fields' => '', 'update_existing' => 0, 'subscriber_tags' => '', 'remove_subscriber_tags' => '', 'email_typo_check' => 0, ]; PK �(,]:�ăz z config/default-settings.phpnu ��� <?php return [ 'api_key' => '', 'debug_log_level' => 'warning', 'email_on_error' => '', ]; PK �(,]��� � config/default-form-messages.phpnu ��� <?php return [ 'subscribed' => [ 'type' => 'success', 'text' => esc_html__('Thank you, your sign-up request was successful! Please check your email inbox to confirm.', 'mailchimp-for-wp'), ], 'updated' => [ 'type' => 'success', 'text' => esc_html__('Thank you, your records have been updated!', 'mailchimp-for-wp'), ], 'unsubscribed' => [ 'type' => 'success', 'text' => esc_html__('You were successfully unsubscribed.', 'mailchimp-for-wp'), ], 'not_subscribed' => [ 'type' => 'notice', 'text' => esc_html__('Given email address is not subscribed.', 'mailchimp-for-wp'), ], 'error' => [ 'type' => 'error', 'text' => esc_html__('Oops. Something went wrong. Please try again later.', 'mailchimp-for-wp'), ], 'invalid_email' => [ 'type' => 'error', 'text' => esc_html__('Please provide a valid email address.', 'mailchimp-for-wp'), ], 'already_subscribed' => [ 'type' => 'notice', 'text' => esc_html__('Given email address is already subscribed, thank you!', 'mailchimp-for-wp'), ], 'required_field_missing' => [ 'type' => 'error', 'text' => esc_html__('Please fill in the required fields.', 'mailchimp-for-wp'), ], 'no_lists_selected' => [ 'type' => 'error', 'text' => esc_html__('Please select at least one list.', 'mailchimp-for-wp'), ], 'spam' => [ 'type' => 'error', 'text' => esc_html__('Your submission was marked as spam.', 'mailchimp-for-wp'), ], ]; PK �(,]��� � SECURITY.mdnu ��� # Security Policy The Mailchimp for WordPress team and community take potential security issues in our software seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. ## Reporting a Vulnerability To report a security issue, please email us at support@mc4wp.com or use the GitHub Security Advisory "[Report a Vulnerability](https://github.com/ibericode/mailchimp-for-wordpress/security/advisories/new)" tab. PK �(,]3e�+[ [ # includes/class-list-data-mapper.phpnu ��� <?php /** * Class MC4WP_Field_Map * * @access private * @since 4.0 * @ignore */ class MC4WP_List_Data_Mapper { /** * @var array */ private $data = []; /** * @var array */ private $list_ids = []; /** * @var MC4WP_Field_Formatter */ private $formatter; /** * @var MC4WP_MailChimp */ private $mailchimp; /** * @param array $data * @param array $list_ids */ public function __construct(array $data, array $list_ids) { $this->data = array_change_key_case($data, CASE_UPPER); if (! isset($this->data['EMAIL'])) { throw new InvalidArgumentException('Data needs at least an EMAIL key.'); } $this->list_ids = $list_ids; $this->formatter = new MC4WP_Field_Formatter(); $this->mailchimp = new MC4WP_MailChimp(); } /** * @return MC4WP_MailChimp_Subscriber[] */ public function map() { $map = []; foreach ($this->list_ids as $list_id) { $map[ "$list_id" ] = $this->map_list($list_id); } return $map; } /** * @param string $list_id * @return MC4WP_MailChimp_Subscriber * @throws Exception */ protected function map_list($list_id) { $subscriber = new MC4WP_MailChimp_Subscriber(); $subscriber->email_address = $this->data['EMAIL']; // find merge fields $merge_fields = $this->mailchimp->get_list_merge_fields($list_id); foreach ($merge_fields as $merge_field) { // skip EMAIL field as that is handled separately (see above) if ($merge_field->tag === 'EMAIL') { continue; } // use empty() here to skip empty field values if (empty($this->data[ $merge_field->tag ])) { continue; } // format field value $value = $this->data[ $merge_field->tag ]; $value = $this->format_merge_field_value($merge_field, $value); // add to map $subscriber->merge_fields[ $merge_field->tag ] = $value; } // find interest categories if (! empty($this->data['INTERESTS'])) { $interest_categories = $this->mailchimp->get_list_interest_categories($list_id); foreach ($interest_categories as $interest_category) { foreach ($interest_category->interests as $interest_id => $interest_name) { // straight lookup by ID as key with value copy. if (isset($this->data['INTERESTS'][ $interest_id ])) { $subscriber->interests[ $interest_id ] = $this->formatter->boolean($this->data['INTERESTS'][ $interest_id ]); } // straight lookup by ID as top-level value if (in_array($interest_id, $this->data['INTERESTS'], false)) { $subscriber->interests[ $interest_id ] = true; } // look in array with category ID as key. if (isset($this->data['INTERESTS'][ $interest_category->id ])) { $value = $this->data['INTERESTS'][ $interest_category->id ]; $values = is_array($value) ? $value : array_map('trim', explode('|', $value)); // find by category ID + interest ID if (in_array($interest_id, $values, false)) { $subscriber->interests[ $interest_id ] = true; } // find by category ID + interest name if (in_array($interest_name, $values, true)) { $subscriber->interests[ $interest_id ] = true; } } } } } // add GDPR marketing permissions if (! empty($this->data['MARKETING_PERMISSIONS'])) { $values = $this->data['MARKETING_PERMISSIONS']; $values = is_array($values) ? $values : explode(',', $values); $values = array_map('trim', $values); $marketing_permissions = $this->mailchimp->get_list_marketing_permissions($list_id); foreach ($marketing_permissions as $mp) { if (in_array($mp->marketing_permission_id, $values, true) || in_array($mp->text, $values, true)) { $subscriber->marketing_permissions[] = (object) [ 'marketing_permission_id' => $mp->marketing_permission_id, 'enabled' => true, ]; } } } // find language /* @see http://kb.mailchimp.com/lists/managing-subscribers/view-and-edit-subscriber-languages?utm_source=mc-api&utm_medium=docs&utm_campaign=apidocs&_ga=1.211519638.2083589671.1469697070 */ if (! empty($this->data['MC_LANGUAGE'])) { $subscriber->language = $this->formatter->language($this->data['MC_LANGUAGE']); } return $subscriber; } /** * @param object $merge_field * @param string $value * * @return mixed */ private function format_merge_field_value($merge_field, $value) { $field_type = strtolower($merge_field->type); // Convert arrays to comma-separated strings for all non-address fields if (is_array($value) && $field_type == 'text') { $value = join(', ', $value); } if (method_exists($this->formatter, $field_type)) { $value = call_user_func([ $this->formatter, $field_type ], $value, $merge_field->options); } /** * Filters the value of a field after it is formatted. * * Use this to format a field value according to the field type (in Mailchimp). * * @since 3.0 * @param string $value The value * @param string $field_type The type of the field (in Mailchimp) */ $value = apply_filters('mc4wp_format_field_value', $value, $field_type); return $value; } } PK �(,]X� � � includes/class-field-guesser.phpnu ��� <?php /** * Class MC4WP_Field_Guesser * * @access private * @ignore */ class MC4WP_Field_Guesser { /** * @var array */ protected $fields; /** * @param array $fields */ public function __construct(array $fields) { $fields = array_change_key_case($fields, CASE_UPPER); $this->fields = $fields; } /** * Get all data which is namespaced with a given namespace * * @param string $namespace * * @return array */ public function namespaced($namespace = 'mc4wp-') { $prefix = strtoupper($namespace); $return = []; $length = strlen($prefix); foreach ($this->fields as $key => $value) { if (strpos($key, $prefix) === 0) { $new_key = substr($key, $length); $return[ $new_key ] = $value; } } return $return; } /** * Guess values for the following fields * - EMAIL * - NAME * - FNAME * - LNAME * * @return array */ public function guessed() { $guessed = []; foreach ($this->fields as $field => $value) { // transform value into array to support 1-level arrays $sub_fields = is_array($value) ? $value : [ $value ]; foreach ($sub_fields as $sub_field_value) { // poor man's urldecode, to get Enfold theme's contact element to work. $sub_field_value = str_replace('%40', '@', $sub_field_value); // is this an email value? if so, assume it's the EMAIL field if (empty($guessed['EMAIL']) && is_string($sub_field_value) && is_email($sub_field_value)) { $guessed['EMAIL'] = $sub_field_value; continue 2; } // remove special characters from field name $simple_key = str_replace([ '-', '_', ' ' ], '', $field); if (empty($guessed['FNAME']) && $this->string_contains($simple_key, [ 'FIRSTNAME', 'FNAME', 'GIVENNAME', 'FORENAME' ])) { // find first name field $guessed['FNAME'] = $sub_field_value; } elseif (empty($guessed['LNAME']) && $this->string_contains($simple_key, [ 'LASTNAME', 'LNAME', 'SURNAME', 'FAMILYNAME' ])) { // find last name field $guessed['LNAME'] = $sub_field_value; } elseif (empty($guessed['NAME']) && $this->string_contains($simple_key, 'NAME')) { // find name field $guessed['NAME'] = $sub_field_value; } } } return $guessed; } /** * @param $methods * * @return array */ public function combine(array $methods) { $combined = []; foreach ($methods as $method) { if (method_exists($this, $method)) { $combined = array_merge($combined, call_user_func([ $this, $method ])); } } return $combined; } /** * @param string $haystack * @param string|array $needles * * @return bool */ private function string_contains($haystack, $needles) { if (! is_array($needles)) { $needles = [ $needles ]; } foreach ($needles as $needle) { if (strpos($haystack, $needle) !== false) { return true; } } return false; } } PK �(,]�/y includes/class-queue-job.phpnu ��� <?php /** * Class MC4WP_Queue_Job * * @ignore */ class MC4WP_Queue_Job { /** * @var string */ public $id; /** * @var mixed */ public $data; /** * @var int */ public $max_attempts = 1; /** * @var int */ public $attempts = 0; /** * MC4WP_Queue_Job constructor. * * @param mixed $data */ public function __construct($data) { $this->id = (string) microtime(true) . rand(1, 10000); $this->data = $data; } } PK �(,]^6e%K K "