Editing Meta field labels and attributes on new & edit listing page
EPL provide super flexibility to WordPress developers for addition, deletion and modification of meta fields & sections via huge set of pre-defined filters.
Example : changing default label of meta fields
Here we in this example we are going to change "Lease Period" label to "Lease Type"
looking at meta-boxes-init.php
array( 'name' => 'property_com_rent_period', 'label' => __('Lease Period', 'epl'), 'type' => 'select', 'opts' => epl_listing_load_meta_commercial_rent_period() ),
we can see that name of the field is 'property_com_rent_period' .
EPL provides filter for every field with this syntax :
apply_filters('epl_meta_'.$field['name'], $field_defaults);
Rename a field
So to modify label "Lease Period" to "Lease Type" we need to add filter & modify label as follows :
function my_edited_property_com_rent_period($field) { $field['label'] = __('Lease Type','epl'); return $field; } add_filter('epl_meta_property_com_rent_period','my_edited_property_com_rent_period');
Using same filter we can modify every attribute of field like input type options defaults etc .