Skip to content

Commit

Permalink
Improve links section on plugin options page.
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Feb 21, 2016
1 parent f97a00d commit cfb534d
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/client-s/css/menu-pages.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/client-s/css/menu-pages.min.css.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/client-s/css/menu-pages/_heading.scss
Expand Up @@ -25,11 +25,12 @@
display: inline-block;
}
}
.plugin-menu-page-support-links {
.plugin-menu-page-support-links,
.plugin-menu-page-mailing-list-links {
float: right;
clear: right;
text-align: right;
max-width: 350px;
max-width: 400px;
margin: .5em 0 0;

a {
Expand Down
13 changes: 10 additions & 3 deletions src/includes/classes/MenuPageOptions.php
Expand Up @@ -48,13 +48,13 @@ public function __construct()
echo ' <div class="plugin-menu-page-upsells">'."\n";
if (IS_PRO && current_user_can($this->plugin->update_cap)) {
echo '<a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS.'-pro-updater')), self_admin_url('/admin.php'))).'"><i class="si si-magic"></i> '.__('Pro Updater', SLUG_TD).'</a>'."\n";
echo '<a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo '<a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
}
if (!IS_PRO) {
echo ' <a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS, GLOBAL_NS.'_pro_preview' => '1')), self_admin_url('/admin.php'))).'"><i class="si si-eye"></i> '.__('Preview Pro Features', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/prices/').'" target="_blank"><i class="si si-heart-o"></i> '.__('Pro Upgrade', SLUG_TD).'</a>'."\n";
}
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";

echo ' <div class="plugin-menu-page-support-links">'."\n";
Expand All @@ -68,6 +68,13 @@ public function __construct()
echo ' <a href="'.esc_attr('http://zencache.com/blog/').'" target="_blank"><i class="si si-rss-square"></i> '.__('Blog', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";

if (!IS_PRO) { // We show these with the Pro Updater above in the Pro version
echo ' <div class="plugin-menu-page-mailing-list-links">'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";
}

if (IS_PRO) {
echo '<div class="plugin-menu-page-version">'."\n";
echo ' '.sprintf(__('%1$s&trade; Pro v%2$s', SLUG_TD), esc_html(NAME), esc_html(VERSION))."\n";
Expand All @@ -90,7 +97,7 @@ public function __construct()
echo '</div>'."\n";
}
echo ' <img src="'.$this->plugin->url('/src/client-s/images/options-'.(IS_PRO ? 'pro' : 'lite').'.png').'" alt="'.esc_attr(__('Plugin Options', SLUG_TD)).'" />'."\n";

echo '<div style="clear:both;"></div>'."\n";
echo '</div>'."\n";

echo '<div class="plugin-menu-page-notice warning"><p>'.sprintf(__('<strong>Important %1$s Announcement:</strong> %1$s is changing its name to <a href="https://cometcache.com/r/announcing-comet-cache-formerly-zencache/" target="_blank"><strong>Comet Cache</a></strong>! Learn more about this upcoming change <a href="https://cometcache.com/r/announcing-comet-cache-formerly-zencache/" target="_blank">here</a>.', SLUG_TD), esc_html(NAME)).'</p></div>'."\n";
Expand Down
14 changes: 11 additions & 3 deletions src/includes/classes/MenuPageProUpdater.php
Expand Up @@ -35,9 +35,9 @@ public function __construct()
echo ' <div class="plugin-menu-page-upsells">'."\n";
if (current_user_can($this->plugin->cap)) {
echo ' <a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS)), self_admin_url('/admin.php'))).'"><i class="si si-cogs"></i> '.__('Options', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
}
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";
echo ' <div class="plugin-menu-page-support-links">'."\n";
if (IS_PRO) {
Expand All @@ -49,6 +49,14 @@ public function __construct()
echo ' <a href="'.esc_attr('http://zencache.com/kb/').'" target="_blank"><i class="si si-book"></i> '.__('Knowledge Base', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/blog/').'" target="_blank"><i class="si si-rss-square"></i> '.__('Blog', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";

if (!IS_PRO) { // We show these with the Options link above in the Pro version
echo ' <div class="plugin-menu-page-mailing-list-links">'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";
}

if (IS_PRO) {
echo '<div class="plugin-menu-page-version">'."\n";
echo ' '.sprintf(__('%1$s&trade; Pro v%2$s', SLUG_TD), esc_html(NAME), esc_html(VERSION))."\n";
Expand All @@ -61,7 +69,7 @@ public function __construct()
echo '</div>'."\n";
}
echo ' <img src="'.$this->plugin->url('/src/client-s/images/pro-updater.png').'" alt="'.esc_attr(__('Pro Plugin Updater', SLUG_TD)).'" />'."\n";

echo '<div style="clear:both;"></div>'."\n";
echo '</div>'."\n";

/* ----------------------------------------------------------------------------------------- */
Expand Down
17 changes: 14 additions & 3 deletions src/includes/classes/MenuPageStats.php
Expand Up @@ -29,8 +29,11 @@ public function __construct()
'</button>'."\n";

echo ' <div class="plugin-menu-page-upsells">'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
if (current_user_can($this->plugin->cap)) {
echo ' <a href="'.esc_attr(add_query_arg(urlencode_deep(array('page' => GLOBAL_NS)), self_admin_url('/admin.php'))).'"><i class="si si-cogs"></i> '.__('Options', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
}
echo ' </div>'."\n";
echo ' <div class="plugin-menu-page-support-links">'."\n";
if (IS_PRO) {
Expand All @@ -42,6 +45,14 @@ public function __construct()
echo ' <a href="'.esc_attr('http://zencache.com/kb/').'" target="_blank"><i class="si si-book"></i> '.__('Knowledge Base', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/blog/').'" target="_blank"><i class="si si-rss-square"></i> '.__('Blog', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";

if (!IS_PRO) { // We show these with the Options link above in the Pro version
echo ' <div class="plugin-menu-page-mailing-list-links">'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-subscribe/').'" target="_blank"><i class="si si-envelope"></i> '.__('Newsletter', SLUG_TD).'</a>'."\n";
echo ' <a href="'.esc_attr('http://zencache.com/r/zencache-beta-testers-list/').'" target="_blank"><i class="si si-envelope"></i> '.__('Beta Testers', SLUG_TD).'</a>'."\n";
echo ' </div>'."\n";
}

if (IS_PRO) {
echo '<div class="plugin-menu-page-version">'."\n";
echo ' '.sprintf(__('%1$s&trade; Pro v%2$s', SLUG_TD), esc_html(NAME), esc_html(VERSION))."\n";
Expand All @@ -54,7 +65,7 @@ public function __construct()
echo '</div>'."\n";
}
echo ' <img src="'.$this->plugin->url('/src/client-s/images/stats.png').'" alt="'.esc_attr(__('Statistics', SLUG_TD)).'" />'."\n";

echo '<div style="clear:both;"></div>'."\n";
echo '</div>'."\n";

/* ----------------------------------------------------------------------------------------- */
Expand Down

0 comments on commit cfb534d

Please sign in to comment.