mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge pull request #1190 from ultimatemember/feature/sorting_data_type
Sorting data type and order
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
<?php
|
||||
namespace um\admin;
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
|
||||
|
||||
/**
|
||||
* Class Admin
|
||||
* @package um\admin
|
||||
*/
|
||||
class Admin extends Admin_Functions {
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@@ -389,6 +386,12 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
'_um_sortby_custom_label' => array(
|
||||
'sanitize' => 'text',
|
||||
),
|
||||
'_um_sortby_custom_type' => array(
|
||||
'sanitize' => 'text',
|
||||
),
|
||||
'_um_sortby_custom_order' => array(
|
||||
'sanitize' => 'text',
|
||||
),
|
||||
'_um_enable_sorting' => array(
|
||||
'sanitize' => 'bool',
|
||||
),
|
||||
@@ -867,6 +870,12 @@ if ( ! class_exists( 'um\admin\Admin' ) ) {
|
||||
if ( isset( $item['label'] ) ) {
|
||||
$item['label'] = sanitize_text_field( $item['label'] );
|
||||
}
|
||||
if ( isset( $item['order'] ) ) {
|
||||
$item['order'] = sanitize_text_field( $item['order'] );
|
||||
}
|
||||
if ( isset( $item['data_type'] ) ) {
|
||||
$item['data_type'] = sanitize_text_field( $item['data_type'] );
|
||||
}
|
||||
|
||||
return $item;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user