本文整理汇总了PHP中WP_List_Table::current_action方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_List_Table::current_action方法的具体用法?PHP WP_List_Table::current_action怎么用?PHP WP_List_Table::current_action使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_List_Table
的用法示例。
在下文中一共展示了WP_List_Table::current_action方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function current_action()
{
if (isset($_REQUEST['action']) && isset($_REQUEST['delete_tags']) && ('delete' == $_REQUEST['action'] || 'delete' == $_REQUEST['action2'])) {
return 'bulk-delete';
}
return parent::current_action();
}
开发者ID:Esleelkartea,项目名称:herramienta_para_autodiagnostico_ADEADA,代码行数:7,代码来源:class-wp-terms-list-table.php
示例2:
function current_action()
{
if (isset($_REQUEST['action']) && ('hide' == $_REQUEST['action'] || 'hide' == $_REQUEST['action2'])) {
return 'bulk-hide';
}
return parent::current_action();
}
示例3:
function current_action()
{
if (isset($_REQUEST['changeit']) && !empty($_REQUEST['new_role'])) {
return 'promote';
}
return parent::current_action();
}
示例4: current_action
/**
*
* @return string
*/
public function current_action()
{
if (isset($_REQUEST['found_post_id']) && isset($_REQUEST['media'])) {
return 'attach';
}
if (isset($_REQUEST['parent_post_id']) && isset($_REQUEST['media'])) {
return 'detach';
}
if (isset($_REQUEST['delete_all']) || isset($_REQUEST['delete_all2'])) {
return 'delete_all';
}
return parent::current_action();
}
示例5: current_action
/**
* Get the current action selected from the bulk actions dropdown, verifying
* that it's a valid action to perform
*
* @see WP_List_Table::current_action()
* @since 1.0
* @return string|bool The action name or False if no action was selected
*/
public function current_action()
{
$current_action = parent::current_action();
if ($current_action && !array_key_exists($current_action, $this->get_bulk_actions())) {
return false;
}
return $current_action;
}
开发者ID:chhavinav,项目名称:fr.ilovejuice,代码行数:16,代码来源:class-wc-points-rewards-manage-points-list-table.php
示例6:
function current_action()
{
return parent::current_action();
}
示例7:
/**
* Clear the recently activated snippets list if we've clicked the button
* @return string The action to execute
*/
function current_action()
{
if (isset($_POST['clear-recent-list'])) {
$action = 'clear-recent-list';
} else {
$action = parent::current_action();
}
return apply_filters('code_snippets/list_table/current_action', $action);
}
示例8: current_action
/**
* Render current trggier bulk action
*
* @since 1.0
*
* @return string [type of filter]
*/
public function current_action()
{
if (isset($_REQUEST['filter_customer'])) {
return 'filter_life_stage';
}
if (isset($_REQUEST['customer_search'])) {
return 'customer_search';
}
return parent::current_action();
}
示例9: current_action
public function current_action()
{
if (isset($_POST['clear-recent-list'])) {
return 'clear-recent-list';
}
return parent::current_action();
}
示例10: current_action
/**
* Get the current action selected from the bulk actions dropdown.
* Return the action name or FALSE if no action was selected.
*
* @brief Action
* @since 1.5.1
* @deprecated - not used
*
* @return string|bool
*/
public function current_action()
{
return isset($_REQUEST['_action']) ? $_REQUEST['_action'] : parent::current_action();
}
示例11: current_action
public function current_action()
{
if (isset($_REQUEST['filter_employee'])) {
return 'filter_employee';
}
if (isset($_REQUEST['employee_search'])) {
return 'employee_search';
}
return parent::current_action();
}
示例12: current_action
/**
* Get current action
*
* @since 0.6
* @return string|boolean
*/
public function current_action()
{
if (isset($_REQUEST['add_users']) && isset($_REQUEST["users"])) {
return 'add_users';
}
return parent::current_action();
}
示例13: current_action
/**
* Trigger currenct bulk action
*
* @since 1.0
*
* @return string
*/
public function current_action()
{
if (isset($_REQUEST['filter_group'])) {
return 'filter_group';
}
return parent::current_action();
}
示例14: current_action
/**
*
* @return string
*/
public function current_action()
{
$action = wp_validate_action();
if ($action && isset($_REQUEST['delete_tags']) && ('delete' == $action || 'delete' == $_REQUEST['action2'])) {
return 'bulk-delete';
}
return parent::current_action();
}
示例15: activity_process_bulk_action
public function activity_process_bulk_action()
{
$wp_list_table = new WP_List_Table();
$action = $wp_list_table->current_action();
if ($action === false) {
return;
}
switch ($action) {
case 'trash':
if (!empty($_REQUEST['log'])) {
$ids = $_REQUEST['log'];
self::move_to_trash_activity($ids);
}
break;
case 'untrash':
if (!empty($_REQUEST['log'])) {
$ids = $_REQUEST['log'];
self::untrash_data_activity($ids);
}
break;
case 'delete':
if (!empty($_REQUEST['log'])) {
$ids = $_REQUEST['log'];
self::delete_data_activity($ids);
}
break;
}
}