Function Reference: geodir_manage_location_get_list
Summary
Get location list for manager location page.
Package
GeoDirectory_Location_Manager
Parameters
- $args
- (array) (required) Location list query arags.
- Default: None
Return Values
- (array)
- Location array.
Change Log
Since: 1.0.0
Source File
geodir_manage_location_get_list() is located in geodir_location_manager/geodir_location_functions.php [Line: 2892]
Source Code
function geodir_manage_location_get_list( $args = array() ) {
$per_page = isset( $_REQUEST['per_page'] ) ? absint( $_REQUEST['per_page'] ) : 0;
$search = isset( $_REQUEST['s'] ) ? wp_unslash( trim( $_REQUEST['s'] ) ) : '';
$country = isset( $_REQUEST['country'] ) ? wp_unslash( trim( $_REQUEST['country'] ) ) : '';
$per_page = $per_page > 0 ? $per_page : 20;
$pagination_args = wp_parse_args(
$args,
array(
'per_page' => $per_page,
'search' => $search,
'country' => $country,
)
);
$rows = geodir_location_list( $pagination_args );
return $rows;
}