Function Reference: geodir_package_add_custom_sort_options

Summary

Add the featured option in the sorting fields options.

Parameters

$fields
(array) (required) Custom field sorting fields.

Default: None
$post_type
(string) (required) The post type.

Default: None

Return Values

(Fields)
  • array.

Change Log

Since: 1.0.0

Source Code

function geodir_package_add_custom_sort_options($fields, $post_type) {
	
	$fields[] = array(
										'post_type' => $post_type,
										'data_type' => '',
										'field_type' => 'enum',
										'site_title' => 'Featured',
										'htmlvar_name' => 'is_featured'
								);
	
	return $fields;
}