本文整理匯總了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;
}