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