Developer Guide
Developer Guide
Filters to add or remove items from dropdown
There are no options to include new fields in the below mentioned fields from Theme Settings, however you can use filter in child theme to include new items in these fields.
- Project Type [Filter] : workreap_filters_job_type
- Project Duration [Filter] : worktic_filters_duration_list
This will required changes at code level to add or delete items from them. We have used filter to add or remove settings
For example if you would like to add or remove items in project level then below filter can be used to override in child theme functions.php
Projects Type
if (!function_exists('workreap_filters_job_type')) {
add_filter('workreap_filters_job_type', 'workreap_filters_job_type', 1);
function workreap_filters_job_type($list){
//fw_print($list); //display all list
unset( $list['fixed'] ); //remove
$list['new_item'] = esc_html__('New Job Type','workreap-child'); //add new
return $list;
}
}
same for above other filters
Remove Payouts methods( PayPal or Bank Transfer )
add_filter('workreap_filter_payouts_lists','workreap_filter_payouts_lists',10,1);
function workreap_filter_payouts_lists($list){
unset($list['paypal']);
//unset($list['bacs']);
return $list;
}
Filter Employees list
add_filter('worktic_set_employees_list','worktic_set_employees_list',10,1);
function worktic_set_employees_list($list){
unset($list['1']);
$list['new_item_key'] = array(
'title' => esc_html__('3 Employees', 'workreap'),
'search_title' => esc_html__('3 Employees', 'workreap'),
'value' => 3,
);
return $list;
}
Filter payouts list
add_filter('workreap_filter_payouts_lists','workreap_filter_payouts_lists');
function workreap_filter_payouts_lists($list){
unset($list['bacs']); //remove Bank Transfer( key : bacs ) or PayPal( key : paypal )
return $list;
}
Change Hourly Rate Filter
add_filter('worktic_set_hourly_rate_list','worktic_set_hourly_rate_list');
function worktic_set_hourly_rate_list($list){
unset($list['0-5']); //remove first item
$list['0-7'] = esc_html__('$5 And Below', 'workreap'); //add new item
return $list;
}
Reset/Edit/Remove/Add User Menu through child theme
add_filter('workreap_filter_dashboard_menu','workreap_filter_dashboard_menu',10,1);
function workreap_filter_dashboard_menu($list){
$list_new = array();
$list_new['insights'] = $list['insights'];
$list_new['chat'] = $list['chat'];
$list_new['manage-projects'] = $list['manage-projects']; //Freelancer
$list_new['manage-jobs'] = $list['manage-jobs']; //Employer
$list_new['manage-services'] = $list['manage-services']; //Freelancer
$list_new['manage-service'] = $list['manage-service']; //Employer
$list_new['saved'] = $list['saved'];
$list_new['invoices'] = $list['invoices'];
$list_new['disputes'] = $list['disputes'];
$list_new['help'] = $list['help'];
$list_new['preview'] = $list['preview'];
$list_new['profile-settings'] = $list['profile-settings'];
$list_new['account-settings'] = $list['account-settings'];
$list_new['payouts-settings'] = $list['payouts-settings'];
$list_new['switch-account'] = $list['switch-account'];
$list_new['logout'] = $list['logout'];
return $list_new;
}