Skip to content

Commit

Permalink
Improve information displayed on Post small Meta box; See: wpsharks/c…
Browse files Browse the repository at this point in the history
  • Loading branch information
kristineds committed Feb 25, 2016
1 parent 433c3ac commit 7be923a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/includes/classes/PostSmallMetaBox.php
Expand Up @@ -54,16 +54,17 @@ protected function display()
$total_subs,
[
'subscriptions' => true,
'style' => 'display:block; font-size:1.5em;',
'style' => 'display:block; font-size:1.1em; background:#2EA2CC;',
]
);
echo '<div class="'.esc_attr(SLUG_TD.'-menu-page-area').'">'.

' '.$total_subs_bubble.// In block format; i.e. 100% width.

' <h4 style="margin:1em 0 .25em 0;">'.__('Most Recent Subscriptions', SLUG_TD).'</h4>'.

' '.$this->plugin->utils_markup->lastXSubs(5, $this->post->ID, ['group_by_email' => true]).

' '.$total_subs_bubble.// In block format; i.e. 100% width.

'</div>';

if ($post_comment_status !== 'open' && !$this->post->comment_count) {
Expand Down
2 changes: 1 addition & 1 deletion src/includes/classes/UtilsI18n.php
Expand Up @@ -352,7 +352,7 @@ public function subscriptions($counter)
{
$counter = (integer) $counter; // Force integer.

return sprintf(_n('%1$s subscription', '%1$s subscriptions', $counter, SLUG_TD), $counter);
return sprintf(_n('%1$s Subscription Total (View)', '%1$s Subscriptions Total (View All)', $counter, SLUG_TD), $counter);
}

/**
Expand Down
9 changes: 5 additions & 4 deletions src/includes/classes/UtilsMarkup.php
Expand Up @@ -105,7 +105,8 @@ public function nameEmail($name = '', $email = '', array $args = [])

($name ? $name_span_tag : '').
($name && $email ? $separator : '').
($email ? '&lt;'.($anchor && $anchor_tag ? $anchor_tag : esc_html($email_clip)).'&gt;' : '').
($email ? '&lt;'.esc_html($email_clip).'&gt;' : '').
($email ? '&lsqb;'.($anchor && $anchor_tag ? $anchor_tag : 'view').'&rsqb;' : '').

($span_title ? '</span>' : '');
}
Expand Down Expand Up @@ -169,7 +170,7 @@ public function subsCount($post_id, $post_total_subs, array $args = [])
$post_total_subs_label = $subscriptions // What should label contain?
? $this->plugin->utils_i18n->subscriptions($post_total_subs) : $post_total_subs;

$post_total_subs_desc = sprintf(_n('%1$s Subscription', '%1$s Subscriptions', $post_total_subs, SLUG_TD), esc_html($post_total_subs));
$post_total_subs_desc = sprintf(_n('%1$s Subscription Total (View)', '%1$s Subscriptions Total (View All)', $post_total_subs, SLUG_TD), esc_html($post_total_subs));
$post_edit_subs_url = $this->plugin->utils_url->postEditSubsShort($post_id);

return '<a href="'.esc_attr($post_edit_subs_url).'" class="pmp-post-sub-count" style="'.esc_attr($style).'" title="'.esc_attr($post_total_subs_desc).'">'.
Expand Down Expand Up @@ -208,8 +209,8 @@ public function lastXSubs($x = 0, $post_id = null, array $args = [])
'group_by_email' => false,
'no_cache' => false,

'show_fname' => false,
'show_lname' => false,
'show_fname' => true,
'show_lname' => true,
'name_email_args' => ['anchor_to' => 'search'],
'list_style' => 'margin:0;',
];
Expand Down

0 comments on commit 7be923a

Please sign in to comment.