Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ot_recognized_typography_fields filter causes "ot_validate_setting was called incorrectly." #724

Open
anteksiler opened this issue Mar 10, 2020 · 0 comments

Comments

@anteksiler
Copy link

Removing any of the fields using the filter:

function thb_filter_typography_fields( $array, $field_id ) {

if ( in_array( $field_id, array(  'primary_font' ), true ) ) {
		$array = array(
			'font-family',
			'font-size',
			'font-style',
			'font-variant',
			'font-weight',
			'letter-spacing',
			'line-height',
		);
	}
	return $array;
}
add_filter( 'ot_recognized_typography_fields', 'thb_filter_typography_fields', 1, 2 );

causes:

Notice: ot_validate_setting was called incorrectly. All stored data must be filtered through ot_validate_setting_input_safe, the typography option type is not using this filter. This is required since version 2.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant