WPCasa: Add custom details
<?php
/**
* Add custom detail
*
* @see wp-content/plugins/wpcasa/includes/class-wpsight-general.php
*/
add_filter( 'wpsight_details', 'custom_details', 50 );
function custom_details( $details ) {
$details['details_9'] = array(
'id' => 'details_9',
'label' => __( 'Custom Detail #9 (Input)', 'wpcasa' ),
'unit' => '',
'data' => false,
'description' => '',
'query_var' => 'details_9',
'data_compare' => '>=',
'data_type' => 'numeric',
'dashboard' => true,
'position' => 90
);
$details['details_10'] = array(
'id' => 'details_10',
'label' => __( 'Custom Detail #10 (Select)', 'wpcasa' ),
'unit' => '',
'data' => array( '' => __( 'n/d', 'wpcasa' ), '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10' ),
'description' => '',
'query_var' => 'details_10',
'data_compare' => '>=',
'data_type' => 'numeric',
'dashboard' => true,
'position' => 100
);
return $details;
}