本文整理汇总了PHP中WP_List_Table::bulk_actions方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::bulk_actions方法的具体用法?PHP WP_List_Table::bulk_actions怎么用?PHP WP_List_Table::bulk_actions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_List_Table
的用法示例。
在下文中一共展示了WP_List_Table::bulk_actions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bulk_actions
/**
* @global string $status
* @param string $which
* @return null
*/
public function bulk_actions($which = '')
{
global $status;
if (in_array($status, array('mustuse', 'dropins'))) {
return;
}
parent::bulk_actions($which);
}
示例2:
function bulk_actions($which = false)
{
global $status;
if (func_num_args()) {
parent::bulk_actions($which);
} else {
parent::bulk_actions();
}
}
示例3:
function bulk_actions($which)
{
global $status;
parent::bulk_actions($which);
}
示例4: confirm
/**
* Displays the bulk actions.
*
* @param string $which
*/
function bulk_actions($which = '')
{
parent::bulk_actions($which);
$filter = $this->filter;
if (in_array($filter, array('trash', 'spam'))) {
$message = $filter == 'trash' ? esc_html__("WARNING! This operation cannot be undone. Empty trash? 'Ok' to empty trash. 'Cancel' to abort.", 'gravityforms') : esc_html__("WARNING! This operation cannot be undone. Permanently delete all spam? 'Ok' to delete. 'Cancel' to abort.", 'gravityforms');
$button_label = $filter == 'trash' ? __('Empty Trash', 'gravityforms') : __('Delete All Spam', 'gravityforms');
?>
<input type="submit" class="button" name="button_delete_permanently"
value="<?php
echo esc_attr($button_label);
?>
"
onclick="return confirm('<?php
echo esc_js($message);
?>
');"/>
<?php
}
}