first commit
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
defined('ABSPATH') or exit;
|
||||
?>
|
||||
|
||||
|
||||
<div id="mc4wp-admin" class="wrap mc4wp-settings">
|
||||
<style type="text/css" scoped>
|
||||
h4{ margin-bottom: 2px; }
|
||||
h4 + p { margin-top: 0; }
|
||||
</style>
|
||||
|
||||
<h1 class="page-title">Mailchimp for WordPress: Add-on plugins</h1>
|
||||
|
||||
<div class="medium-margin" style="font-size: 120%">
|
||||
<h2><span style="color: #c44;">Mailchimp for WordPress Premium</span>, take your newsletter to the next level!</h2>
|
||||
<ul class="ul-square">
|
||||
<li><strong>Better forms</strong> — unlimited, AJAX powered forms with detailed statistics.</li>
|
||||
<li><strong>E-Commerce integration</strong> — tightly integrate your WooCommerce store with Mailchimp.</li>
|
||||
<li><strong>Form designer</strong> — make your forms look pretty without having to know or write a single line of CSS.</li>
|
||||
<li><strong>Append form to posts</strong> — automatically add a certain form to all posts (in a certain category)</li>
|
||||
<li><strong>Priority support</strong> — gain access to our 24/7 support team.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="https://mc4wp.com/pricing/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=extensions-page" class="button" style="background: #c44; border: #c44; color: white; padding: 6px 12px; height: auto; font-weight: bold;">Buy Mailchimp for WordPress Premium</a>
|
||||
<a href="https://mc4wp.com/premium-features/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=extensions-page"><span style="text-decoration: none; vertical-align: middle; margin-right: 6px;" class="dashicons dashicons-info"> </span>More information</a>
|
||||
</p>
|
||||
|
||||
<p><em>Comes with <a href="https://mc4wp.com/refund-policy/">our 30-day no questions asked money back guarantee</a>.</em>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="medium-margin">
|
||||
<p>The following (free) add-on plugins are available for Mailchimp for WordPress.</p>
|
||||
|
||||
<div>
|
||||
<h4><a href="https://wordpress.org/plugins/mailchimp-top-bar/">Mailchimp Top Bar</a></h4>
|
||||
<p>Adds a sign-up bar to the top or bottom of your site. A sure fire way to grow your lists.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><a href="https://wordpress.org/plugins/mc4wp-activity/">Mailchimp Activity</a></h4>
|
||||
<p>Adds an overview of Mailchimp list metrics to your WordPress dashboard.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><a href="https://wordpress.org/plugins/mc4wp-wpml/">WPML Integration</a></h4>
|
||||
<p>Improved Mailchimp integration for multilingual sites using WPML.</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4><a href="https://wordpress.org/plugins/mailchimp-top-bar/">Boxzilla Pop-ups</a></h4>
|
||||
<p>Pop-ups for your sign-up forms.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
defined('ABSPATH') or exit;
|
||||
?>
|
||||
<div id="mc4wp-admin" class="wrap mc4wp-settings">
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<span class="prefix"><?php echo __('You are here: ', 'mailchimp-for-wp'); ?></span>
|
||||
<span class="current-crumb"><strong>Mailchimp for WordPress</strong></span>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="main-content col col-4">
|
||||
|
||||
<h1 class="page-title">
|
||||
Mailchimp for WordPress: <?php _e('API Settings', 'mailchimp-for-wp'); ?>
|
||||
</h1>
|
||||
|
||||
<h2 style="display: none;"></h2>
|
||||
<?php
|
||||
settings_errors();
|
||||
$this->messages->show();
|
||||
?>
|
||||
|
||||
<form action="<?php echo admin_url('options.php'); ?>" method="post">
|
||||
<?php settings_fields('mc4wp_settings'); ?>
|
||||
|
||||
<table class="form-table">
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row">
|
||||
<?php _e('Status', 'mailchimp-for-wp'); ?>
|
||||
</th>
|
||||
<td>
|
||||
<?php if ($connected) {
|
||||
?>
|
||||
<span class="status positive"><?php _e('CONNECTED', 'mailchimp-for-wp'); ?></span>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<span class="status neutral"><?php _e('NOT CONNECTED', 'mailchimp-for-wp'); ?></span>
|
||||
<?php
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><label for="mailchimp_api_key"><?php _e('API Key', 'mailchimp-for-wp'); ?></label></th>
|
||||
<td>
|
||||
<input type="text" class="widefat" placeholder="<?php _e('Your Mailchimp API key', 'mailchimp-for-wp'); ?>" id="mailchimp_api_key" name="mc4wp[api_key]" value="<?php echo esc_attr($obfuscated_api_key); ?>" <?php echo defined('MC4WP_API_KEY') ? 'readonly="readonly"' : ''; ?> />
|
||||
<p class="help">
|
||||
<?php _e('The API key for connecting with your Mailchimp account.', 'mailchimp-for-wp'); ?>
|
||||
<a target="_blank" href="https://admin.mailchimp.com/account/api"><?php _e('Get your API key here.', 'mailchimp-for-wp'); ?></a>
|
||||
</p>
|
||||
|
||||
<?php if (defined('MC4WP_API_KEY')) {
|
||||
echo '<p class="help">'. __('You defined your Mailchimp API key using the <code>MC4WP_API_KEY</code> constant.', 'mailchimp-for-wp') . '</p>';
|
||||
} ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<?php submit_button(); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Runs right after general settings are outputted in admin.
|
||||
*
|
||||
* @since 3.0
|
||||
* @ignore
|
||||
*/
|
||||
do_action('mc4wp_admin_after_general_settings');
|
||||
|
||||
if (! empty($opts['api_key'])) {
|
||||
echo '<hr />';
|
||||
include dirname(__FILE__) . '/parts/lists-overview.php';
|
||||
}
|
||||
|
||||
include dirname(__FILE__) . '/parts/admin-footer.php';
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar col col-2">
|
||||
<?php include dirname(__FILE__) . '/parts/admin-sidebar.php'; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
defined('ABSPATH') or exit;
|
||||
|
||||
/** @var MC4WP_Debug_Log $log */
|
||||
/** @var MC4WP_Debug_Log_Reader $log_reader */
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
* @param array $opts
|
||||
*/
|
||||
function _mc4wp_usage_tracking_setting($opts)
|
||||
{
|
||||
?>
|
||||
<div class="medium-margin" >
|
||||
<h3><?php _e('Miscellaneous settings', 'mailchimp-for-wp'); ?></h3>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><?php _e('Usage Tracking', 'mailchimp-for-wp'); ?></th>
|
||||
<td>
|
||||
<label>
|
||||
<input type="radio" name="mc4wp[allow_usage_tracking]" value="1" <?php checked($opts['allow_usage_tracking'], 1); ?> />
|
||||
<?php _e('Yes'); ?>
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="mc4wp[allow_usage_tracking]" value="0" <?php checked($opts['allow_usage_tracking'], 0); ?> />
|
||||
<?php _e('No'); ?>
|
||||
</label>
|
||||
|
||||
<p class="help">
|
||||
<?php echo __('Allow us to anonymously track how this plugin is used to help us make it better fit your needs.', 'mailchimp-for-wp'); ?>
|
||||
<a href="https://kb.mc4wp.com/what-is-usage-tracking/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=settings-page" target="_blank">
|
||||
<?php _e('This is what we track.', 'mailchimp-for-wp'); ?>
|
||||
</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php _e('Logging', 'mailchimp-for-wp'); ?></th>
|
||||
<td>
|
||||
<select name="mc4wp[debug_log_level]">
|
||||
<option value="warning" <?php selected('warning', $opts['debug_log_level']); ?>><?php _e('Errors & warnings only', 'mailchimp-for-wp'); ?></option>
|
||||
<option value="debug" <?php selected('debug', $opts['debug_log_level']); ?>><?php _e('Everything', 'mailchimp-for-wp'); ?></option>
|
||||
</select>
|
||||
<p class="help">
|
||||
<?php printf(__('Determines what events should be written to <a href="%s">the debug log</a> (see below).', 'mailchimp-for-wp'), 'https://kb.mc4wp.com/how-to-enable-log-debugging/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=settings-page'); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('mc4wp_admin_other_settings', '_mc4wp_usage_tracking_setting', 70);
|
||||
?>
|
||||
<div id="mc4wp-admin" class="wrap mc4wp-settings">
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<span class="prefix"><?php echo __('You are here: ', 'mailchimp-for-wp'); ?></span>
|
||||
<a href="<?php echo admin_url('admin.php?page=mailchimp-for-wp'); ?>">Mailchimp for WordPress</a> ›
|
||||
<span class="current-crumb"><strong><?php _e('Other Settings', 'mailchimp-for-wp'); ?></strong></span>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="main-content col col-4">
|
||||
|
||||
<h1 class="page-title">
|
||||
<?php _e('Other Settings', 'mailchimp-for-wp'); ?>
|
||||
</h1>
|
||||
|
||||
<h2 style="display: none;"></h2>
|
||||
<?php settings_errors(); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
do_action('mc4wp_admin_before_other_settings', $opts);
|
||||
?>
|
||||
|
||||
<!-- Settings -->
|
||||
<form action="<?php echo admin_url('options.php'); ?>" method="post">
|
||||
<?php settings_fields('mc4wp_settings'); ?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
do_action('mc4wp_admin_other_settings', $opts);
|
||||
?>
|
||||
|
||||
<div style="margin-top: -20px;"><?php submit_button(); ?></div>
|
||||
</form>
|
||||
|
||||
<!-- Debug Log -->
|
||||
<div class="medium-margin">
|
||||
<h3><?php _e('Debug Log', 'mailchimp-for-wp'); ?> <input type="text" id="debug-log-filter" class="alignright regular-text" placeholder="<?php esc_attr_e('Filter..', 'mailchimp-for-wp'); ?>" /></h3>
|
||||
|
||||
<?php
|
||||
if (! $log->test()) {
|
||||
echo '<p>';
|
||||
echo __('Log file is not writable.', 'mailchimp-for-wp') . ' ';
|
||||
echo sprintf(__('Please ensure %s has the proper <a href="%s">file permissions</a>.', 'mailchimp-for-wp'), '<code>' . $log->file . '</code>', 'https://codex.wordpress.org/Changing_File_Permissions');
|
||||
echo '</p>';
|
||||
|
||||
// hack to hide filter input
|
||||
echo '<style type="text/css">#debug-log-filter { display: none; }</style>';
|
||||
} else {
|
||||
?>
|
||||
<div id="debug-log" class="mc4wp-log widefat">
|
||||
<?php
|
||||
$line = $log_reader->read_as_html();
|
||||
|
||||
if (!empty($line)) {
|
||||
while (is_string($line)) {
|
||||
if (! empty($line)) {
|
||||
echo '<div class="debug-log-line">' . $line . '</div>';
|
||||
}
|
||||
|
||||
$line = $log_reader->read_as_html();
|
||||
}
|
||||
} else {
|
||||
echo '<div class="debug-log-empty">';
|
||||
echo '-- ' . __('Nothing here. Which means there are no errors!', 'mailchimp-for-wp');
|
||||
echo '</div>';
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="_mc4wp_action" value="empty_debug_log">
|
||||
<p>
|
||||
<input type="submit" class="button"
|
||||
value="<?php esc_attr_e('Empty Log', 'mailchimp-for-wp'); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
} // end if is writable
|
||||
|
||||
if ($log->level >= 300) {
|
||||
echo '<p>';
|
||||
echo __('Right now, the plugin is configured to only log errors and warnings.', 'mailchimp-for-wp');
|
||||
echo '</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
// scroll to bottom of log
|
||||
var log = document.getElementById("debug-log"),
|
||||
logItems;
|
||||
log.scrollTop = log.scrollHeight;
|
||||
log.style.minHeight = '';
|
||||
log.style.maxHeight = '';
|
||||
log.style.height = log.clientHeight + "px";
|
||||
|
||||
// add filter
|
||||
var logFilter = document.getElementById('debug-log-filter');
|
||||
logFilter.addEventListener('keydown', function(e) {
|
||||
if(e.keyCode == 13 ) {
|
||||
searchLog(e.target.value.trim());
|
||||
}
|
||||
});
|
||||
|
||||
// search log for query
|
||||
function searchLog(query) {
|
||||
if( ! logItems ) {
|
||||
logItems = [].map.call(log.children, function(node) {
|
||||
return node.cloneNode(true);
|
||||
})
|
||||
}
|
||||
|
||||
var ri = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), 'i');
|
||||
var newLog = log.cloneNode();
|
||||
logItems.forEach(function(node) {
|
||||
if( ! node.textContent ) { return ; }
|
||||
if( ! query.length || ri.test(node.textContent) ) {
|
||||
newLog.appendChild(node);
|
||||
}
|
||||
});
|
||||
|
||||
log.parentNode.replaceChild(newLog,log);
|
||||
log = newLog;
|
||||
log.scrollTop = log.scrollHeight;
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
<!-- / Debug Log -->
|
||||
|
||||
|
||||
|
||||
<?php include dirname(__FILE__) . '/parts/admin-footer.php'; ?>
|
||||
</div>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar col col-2">
|
||||
<?php include dirname(__FILE__) . '/parts/admin-sidebar.php'; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php defined('ABSPATH') or exit;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _mc4wp_admin_translation_notice()
|
||||
{
|
||||
|
||||
// show for every language other than the default
|
||||
if (stripos(get_locale(), 'en_us') === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Check translation progress from Transifex here. Only show when < 100.
|
||||
|
||||
echo '<p class="help">' . sprintf(__('Mailchimp for WordPress is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to <a href="%s">the translation project and click "help translate"</a>.', 'mailchimp-for-wp'), 'https://www.transifex.com/projects/p/mailchimp-for-wordpress/') . '</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _mc4wp_admin_github_notice()
|
||||
{
|
||||
if (strpos($_SERVER['HTTP_HOST'], 'local') !== 0 && ! WP_DEBUG) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<p class="help">Developer? Follow <a href="https://github.com/ibericode/mailchimp-for-wordpress">Mailchimp for WordPress on GitHub</a> or have a look at our repository of <a href="https://github.com/ibericode/mc4wp-snippets">sample code snippets</a>.</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _mc4wp_admin_disclaimer_notice()
|
||||
{
|
||||
echo '<p class="help">' . __('This plugin is not developed by or affiliated with Mailchimp in any way.', 'mailchimp-for-wp') . '</p>';
|
||||
}
|
||||
|
||||
add_action('mc4wp_admin_footer', '_mc4wp_admin_translation_notice', 20);
|
||||
add_action('mc4wp_admin_footer', '_mc4wp_admin_github_notice', 50);
|
||||
add_action('mc4wp_admin_footer', '_mc4wp_admin_disclaimer_notice', 80);
|
||||
?>
|
||||
|
||||
<div class="big-margin">
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Runs while printing the footer of every Mailchimp for WordPress settings page.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
do_action('mc4wp_admin_footer'); ?>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
defined('ABSPATH') or exit;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _mc4wp_admin_sidebar_support_notice()
|
||||
{
|
||||
?>
|
||||
<div class="mc4wp-box">
|
||||
<h4 class="mc4wp-title"><?php echo esc_html__('Looking for help?', 'mailchimp-for-wp'); ?></h4>
|
||||
<p><?php echo __('We have some resources available to help you in the right direction.', 'mailchimp-for-wp'); ?></p>
|
||||
<ul class="ul-square">
|
||||
<li><a href="https://kb.mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=sidebar"><?php echo esc_html__('Knowledge Base', 'mailchimp-for-wp'); ?></a></li>
|
||||
<li><a href="https://wordpress.org/plugins/mailchimp-for-wp/faq/"><?php echo esc_html__('Frequently Asked Questions', 'mailchimp-for-wp'); ?></a></li>
|
||||
</ul>
|
||||
<p><?php echo sprintf(__('If your answer can not be found in the resources listed above, please use the <a href="%s">support forums on WordPress.org</a>.'), 'https://wordpress.org/support/plugin/mailchimp-for-wp'); ?></p>
|
||||
<p><?php echo sprintf(__('Found a bug? Please <a href="%s">open an issue on GitHub</a>.'), 'https://github.com/ibericode/mailchimp-for-wordpress/issues'); ?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function _mc4wp_admin_sidebar_other_plugins()
|
||||
{
|
||||
echo '<div class="mc4wp-box">';
|
||||
echo '<h4 class="mc4wp-title">' . __('Other plugins by ibericode', 'mailchimp-for-wp') . '</h4>';
|
||||
|
||||
echo '<ul style="margin-bottom: 0;">';
|
||||
|
||||
// Boxzilla
|
||||
echo '<li>';
|
||||
echo sprintf('<strong><a href="%s">Boxzilla Pop-ups</a></strong><br />', 'https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=sidebar');
|
||||
echo __('Pop-ups or boxes that slide-in with a newsletter sign-up form. A sure-fire way to grow your email lists.', 'mailchimp-for-wp');
|
||||
echo '</li>';
|
||||
|
||||
// HTML Forms
|
||||
echo '<li>';
|
||||
echo sprintf('<strong><a href="%s">HTML Forms</a></strong><br />', 'https://www.htmlforms.io/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=sidebar');
|
||||
echo __('Super flexible forms using native HTML. Just like with Mailchimp for WordPress forms but for other purposes, like a contact form.', 'mailchimp-for-wp');
|
||||
echo '</li>';
|
||||
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
add_action('mc4wp_admin_sidebar', '_mc4wp_admin_sidebar_other_plugins', 40);
|
||||
add_action('mc4wp_admin_sidebar', '_mc4wp_admin_sidebar_support_notice', 50);
|
||||
|
||||
/**
|
||||
* Runs when the sidebar is outputted on Mailchimp for WordPress settings pages.
|
||||
*
|
||||
* Please note that not all pages have a sidebar.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
do_action('mc4wp_admin_sidebar');
|
||||
@@ -0,0 +1,57 @@
|
||||
<h3><?php _e('Your Mailchimp Account', 'mailchimp-for-wp'); ?></h3>
|
||||
<p><?php _e('The table below shows your Mailchimp lists and their details. If you just applied changes to your Mailchimp lists, please use the following button to renew the cached lists configuration.', 'mailchimp-for-wp'); ?></p>
|
||||
|
||||
|
||||
<div id="mc4wp-list-fetcher">
|
||||
<form method="post" action="">
|
||||
<input type="hidden" name="_mc4wp_action" value="empty_lists_cache" />
|
||||
|
||||
<p>
|
||||
<input type="submit" value="<?php _e('Renew Mailchimp lists', 'mailchimp-for-wp'); ?>" class="button" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="mc4wp-lists-overview">
|
||||
<?php if (empty($lists)) {
|
||||
?>
|
||||
<p><?php _e('No lists were found in your Mailchimp account', 'mailchimp-for-wp'); ?>.</p>
|
||||
<?php
|
||||
} else {
|
||||
printf('<p>' . __('A total of %d lists were found in your Mailchimp account.', 'mailchimp-for-wp') . '</p>', count($lists));
|
||||
|
||||
echo '<table class="widefat striped" id="mc4wp-mailchimp-lists-overview">';
|
||||
|
||||
$headings = array(
|
||||
__('List Name', 'mailchimp-for-wp'),
|
||||
__('ID', 'mailchimp-for-wp'),
|
||||
__('Subscribers', 'mailchimp-for-wp')
|
||||
);
|
||||
|
||||
echo '<thead>';
|
||||
echo '<tr>';
|
||||
foreach ($headings as $heading) {
|
||||
echo sprintf('<th>%s</th>', $heading);
|
||||
}
|
||||
echo '</tr>';
|
||||
echo '</thead>';
|
||||
|
||||
foreach ($lists as $list) {
|
||||
echo '<tr>';
|
||||
echo sprintf('<td><a href="#" class="mc4wp-mailchimp-list" data-list-id="%s">%s</a><span class="row-actions alignright"></span></td>', esc_attr($list->id), esc_html($list->name));
|
||||
echo sprintf('<td><code>%s</code></td>', esc_html($list->id));
|
||||
echo sprintf('<td>%s</td>', esc_html($list->stats->member_count));
|
||||
echo '</tr>';
|
||||
|
||||
echo sprintf('<tr class="list-details list-%s-details" style="display: none;">', $list->id);
|
||||
echo '<td colspan="3" style="padding: 0 20px 40px;">';
|
||||
|
||||
echo sprintf('<p class="alignright" style="margin: 20px 0;"><a href="https://admin.mailchimp.com/lists/members/?id=%s" target="_blank"><span class="dashicons dashicons-edit"></span> ' . __('Edit this list in Mailchimp', 'mailchimp-for-wp') . '</a></p>', $list->web_id);
|
||||
echo '<div><div>' . __('Loading... Please wait.', 'mailchimp-for-wp') . '</div></div>';
|
||||
echo '</td>';
|
||||
echo '</tr>'; ?>
|
||||
<?php
|
||||
} // end foreach $lists
|
||||
echo '</table>';
|
||||
} // end if empty?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user