Файловый менеджер - Редактировать - /home/goldin10/public_html/getoutyourbox.com/wp-content/plugins/cf-mailchimp-1.4.0/includes/config.php
Error occurred
Назад
<?php /** * MailChimp processor Config template * * @package Caldera_Forms_MailChimp */ ?><div class="caldera-config-group"> <label for="cf-mailchimp-api-key-{{_id}}"> <?php esc_html_e('API Key', 'cf-mailchimp'); ?> </label> <div class="caldera-config-field"> <input id="cf-mailchimp-api-key-{{_id}}" type="text" class="block-input field-config required ajax-trigger" data-load-element="#load_status_{{_id}}" data-target="#list_{{_id}}-wrap" data-fid="{{_id}}" data-action="cf_mailchimp_getlists" data-event="change" name="{{_name}}[apikey]" value="{{apikey}}" data-nonce="<?php echo wp_create_nonce( 'cf_mailchimp_getlists' ); ?>"> </div> </div> <div id="list_{{_id}}-wrap"> {{#if lists}} <div class="caldera-config-group"> <label for="list_{{_id}}" > <?php esc_html_e('List', 'cf-mailchimp'); ?> </label> <div class="caldera-config-field"> <select id="list_{{_id}}" name="{{_name}}[list_id]" data-default="{{list_id}}" data-load-element="#load_status_{{_id}}" data-action="cf_mailchimp_getlist_vars" data-target="#list_vars_{{_id}}" data-event="change" data-fid="{{_id}}" data-apikey="{{apikey}}" data-callback="rebuild_field_binding" class="mc_list_selector block-input field-config required ajax-trigger" data-before="before" data-nonce="<?php echo wp_create_nonce( 'cf_mailchimp_getlist_vars' ); ?>"> {{#each lists}} <option value="{{@key}}">{{this}}</option> {{/each}} </select> </div> </div> {{#each lists}} <input type="hidden" value="{{this}}" name="{{../_name}}[lists][{{@key}}]"> {{/each}} {{/if}} {{#if segments}} <div class="caldera-config-group" id="list_segments_{{_id}}_wcf-mailchimp-api-key-{{_id}}rap"> <label for="list_segments_{{_id}}" > <?php esc_html_e('Segment', 'cf-mailchimp'); ?> </label> <div class="caldera-config-field"> <select id="list_segments_{{_id}}" name="{{_name}}[segment_id]" data-default="{{segment_id}}" class="mc_segment_selector block-input field-config ajax-trigger"> <option value=""></option> {{#each segments}} <option value="{{@key}}">{{this}}</option> {{/each}} </select> </div> </div> {{#each segments}} <input type="hidden" value="{{this}}" name="{{../_name}}[segments][{{@key}}]"> {{/each}} {{/if}} <div class="caldera-config-group" id="cf-mailchimp-groups-{{_id}}-wrap"> {{#if groups}} <?php echo cf_mailchimp_groups_ui_tmpl( true ); ?> {{/if}} </div> {{#if groups}} {{#each groups}} <input type="hidden" value="{{this}}" data-fid="{{../../_id}}" class="cf-mailchimp-groups-hidden"> {{/each}} {{/if}} {{#if lists}} <button id="{{_id}}-get-groups" class="cf-mailchimp-update-groups button" data-fid="{{_id}}" data-nonce="<?php echo wp_create_nonce( 'cf_mailchimp_get_groups' ); ?>" onclick="cfMailChimpUpdateGroups(event)" data-apikey="{{apikey}}"> <?php esc_html_e( 'Show Groups', 'cf-mailchimp' ); ?> </button> {{/if}} <div id="list_vars_{{_id}}"> {{#each vars}} <div class="caldera-config-group"> <label for="fp_{{../_id}}_{{@key}}"> {{name}} </label> <div class="caldera-config-field"> <select id="fp_{{../_id}}_{{@key}}" data-type="{{type}}" data-default="{{field}}" name="{{../_name}}[vars][{{@key}}][field]" aria-describedby="fp_{{../_id}}_{{@key}}-desc" class="block-input caldera-field-bind {{#if req}}required{{/if}}"> </select> {{#if optionFGs}} <span class="description" id="fp_{{../_id}}_{{@key}}-desc">{{options}}</span> <input type="hidden" value="{{options}}" name="{{../_name}}[vars][{{@key}}][options]"> {{/if}} <input type="hidden" value="{{name}}" name="{{../_name}}[vars][{{@key}}][name]"> <input type="hidden" value="{{type}}" name="{{../_name}}[vars][{{@key}}][type]"> {{#if req}}<input type="hidden" value="1" name="{{../_name}}[vars][{{@key}}][req]">{{/if}} </div> </div> {{/each}} </div> <div class="caldera-config-group"> <label for="{{_id}}-status"> <?php esc_html_e( 'Subscriber Status', 'cf-mailchimp' ); ?> </label> <div class="caldera-config-field"> <select id="{{_id}}-status" name="{{_name}}[status]" aria-describedby="{{_id}}-status-desc" class="block-input"> <option value="subscribed" {{#is status value="subscribed" }}selected="selected" {{/is}}> <?php esc_html_e( 'Subscribed', 'cf-mailchimp' ); ?> </option> <option value="pending" {{#is status value="pending" }}selected="selected" {{/is}}> <?php esc_html_e( 'Pending', 'cf-mailchimp' ); ?> </option> <option value="unsubscribed" {{#is status value="unsubscribed" }}selected="selected" {{/is}}> <?php esc_html_e( 'Unsubscribed', 'cf-mailchimp' ); ?> </option> </select> </div> <p class="description" id="{{_id}}-status-desc"> <?php esc_html_e( 'Use "Subscribe" to skip double opt-in, "Pending" to require double optt-in and "Unsubscribed" to remove the subscriber from your list.', 'cf-mailchimp' ); ?> </p> </div> </div> <script type="text/javascript"> /** * Set list selector * * @since unknown */ jQuery('.mc_list_selector').each(function(k,v){ var list = jQuery(this); list.val(list.data('default')); }); /** * Set segment selector * * @since 1.3.0 */ jQuery('.mc_segment_selector').each(function(k,v){ var seg = jQuery(this); seg.val(seg.data('default')); }); /** * Reset groups on list change * * @since 1.4.0 */ function resetGroups(el) { var $el = jQuery(el), fId = $el.data('fid'), $seg = jQuery('#list_segments_' + fId), $btn = jQuery(fId + '-get-groups'); $seg.find('option:selected').removeAttr('selected'); jQuery('#cf-mailchimp-groups-' + fId + '-wrap').empty(); if ( $btn.length ) { cfMailChimpUpdateGroups(null, $btn); } return fId; } /** * Runs before list change * * @since unknown * * @param el */ function before(el){ jQuery( '#list_segments_' + fId ).remove(); var fId = resetGroups(el); } /** * Handle groups * * @since 1.3.0 * * @param event * @param $_this */ function cfMailChimpUpdateGroups(event, $_this ) { if ( null !== event ) { event.preventDefault(); } var $this; if( undefined != $_this &&$_this.length ){ $this = $_this; }else{ $this = jQuery(event.srcElement); } var fId = $this.data( 'fid' ), nonce = $this.data( 'nonce' ), apiKey = jQuery( '#cf-mailchimp-api-key-' + fId ).val(), listId = jQuery( '#list_' + fId ).val(); jQuery.ajax({ url: cfAdminAJAX, data:{ action: 'cf_mailchimp_get_groups', nonce: nonce, fid: fId, apikey: apiKey, list: listId }, success: function (r) { var source = jQuery("#cf-mailchimp-groups-tmpl" ).html(), template = Handlebars.compile(source), fId = r.data[ '_id' ], el = document.getElementById( 'cf-mailchimp-groups-' + fId + '-wrap' ), $groups = jQuery('.cf-mc-group-' + fId ); if ( null != el ) { el.innerHTML = template(r.data); } var groups = []; if ($groups.length) { $groups.each( function (i,el) { groups.push( jQuery(el).data( 'group-id' ) ); }); if ( null != el ) { el.innerHTML = template(r.data); //don't use $groups it changed var val, $el; jQuery('.cf-mc-group-' + fId ).each(function (i,el) { $el = jQuery( el ); val = $el.val(); if( -1 != groups.indexOf( val ) ){ $el.prop( 'checked', true ); } } ); } } $this.html( "<?php esc_html_e( 'Refresh Groups List', 'cf-mailchimp' ); ?>").attr( 'data-mc-group-init', 'true'); } }); } </script>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Генерация страницы: 0.06 |
proxy
|
phpinfo
|
Настройка