本文整理汇总了PHP中TGM_Plugin_Activation::get_tgmpa_status_url方法的典型用法代码示例。如果您正苦于以下问题:PHP TGM_Plugin_Activation::get_tgmpa_status_url方法的具体用法?PHP TGM_Plugin_Activation::get_tgmpa_status_url怎么用?PHP TGM_Plugin_Activation::get_tgmpa_status_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TGM_Plugin_Activation
的用法示例。
在下文中一共展示了TGM_Plugin_Activation::get_tgmpa_status_url方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_views
/**
* Get an associative array ( id => link ) of the views available on this table.
*
* @since 2.5.0
*
* @return array
*/
public function get_views()
{
$status_links = array();
foreach ($this->view_totals as $type => $count) {
if ($count < 1) {
continue;
}
switch ($type) {
case 'all':
$text = wp_kses(_nx('All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'sociallyviral'), array('span'));
break;
case 'install':
$text = wp_kses(_n('To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'sociallyviral'), array('span'));
break;
case 'update':
$text = wp_kses(_n('Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'sociallyviral'), array('span'));
break;
case 'activate':
$text = wp_kses(_n('To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'sociallyviral'), array('span'));
break;
default:
$text = '';
break;
}
if (!empty($text)) {
$status_links[$type] = sprintf('<a href="%s"%s>%s</a>', esc_url($this->tgmpa->get_tgmpa_status_url($type)), $type === $this->view_context ? ' class="current"' : '', sprintf($text, number_format_i18n($count)));
}
}
return $status_links;
}