Plugin Planet

Premium WordPress Plugins

By default, USP Pro restricts the names of Custom Fields to alphanumeric, numbers, underscores, and dashes. This tutorial explains how to add support for any/all other characters as well. For example, if you want to add custom fields using names/keys in other languages, this tutorial can help make it happen.

Solution

USP Pro version 2.7 and better provide a filter hook for custom-field names:

usp_custom_field_regex

Using this hook, we can modify the regular expression used to limit custom field names:

function usp_pro_custom_field_regex($value) {
	
	return '(.+)';
	
}
add_filter('usp_custom_field_regex', 'usp_pro_custom_field_regex');

As written, that function allows any/all characters for custom field names. So you can roll with it, or modify the regex (.+) to whatever is required.

Related