mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added ability to use metatable;
This commit is contained in:
@@ -12,36 +12,6 @@ global $post_id; ?>
|
||||
$_um_roles_filter_value = get_post_meta( $post_id, '_um_roles_can_filter', true );
|
||||
$_um_roles_filter_value = empty( $_um_roles_filter_value ) ? array() : $_um_roles_filter_value;
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
*
|
||||
* @type filter
|
||||
* @title um_admin_custom_search_filters
|
||||
* @description Custom Search Filters
|
||||
* @input_vars
|
||||
* [{"var":"$custom_search","type":"array","desc":"Filters"}]
|
||||
* @change_log
|
||||
* ["Since: 2.0"]
|
||||
* @usage
|
||||
* <?php add_filter( 'um_admin_custom_search_filters', 'function_name', 10, 1 ); ?>
|
||||
* @example
|
||||
* <?php
|
||||
* add_filter( 'um_admin_custom_search_filters', 'my_admin_custom_search_filters', 10, 1 );
|
||||
* function my_upload_file_name( $custom_search ) {
|
||||
* // your code here
|
||||
* return $custom_search;
|
||||
* }
|
||||
* ?>
|
||||
*/
|
||||
$custom_search = apply_filters( 'um_admin_custom_search_filters', array() );
|
||||
$searchable_fields = UM()->builtin()->all_user_fields( 'date,time,url' );
|
||||
$searchable_fields = $searchable_fields + $custom_search;
|
||||
$user_fields = array();
|
||||
foreach ( $searchable_fields as $key => $arr ) {
|
||||
$user_fields[ $key ] = isset( $arr['title'] ) ? $arr['title'] : '';
|
||||
}
|
||||
|
||||
//$post_id = get_the_ID();
|
||||
$_um_search_fields = get_post_meta( $post_id, '_um_search_fields', true );
|
||||
$_um_search_filters = get_post_meta( $post_id, '_um_search_filters', true );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user