apply_filters( 'safe_style_css', string[] $attr )

Filters the list of allowed CSS attributes.


Parameters

$attr string[]
Array of allowed CSS attributes.

Top ↑

Source

File: wp-includes/kses.php. View all references

$allowed_attr = apply_filters(
	'safe_style_css',
	array(
		'background',
		'background-color',
		'background-image',
		'background-position',
		'background-size',
		'background-attachment',
		'background-blend-mode',

		'border',
		'border-radius',
		'border-width',
		'border-color',
		'border-style',
		'border-right',
		'border-right-color',
		'border-right-style',
		'border-right-width',
		'border-bottom',
		'border-bottom-color',
		'border-bottom-left-radius',
		'border-bottom-right-radius',
		'border-bottom-style',
		'border-bottom-width',
		'border-bottom-right-radius',
		'border-bottom-left-radius',
		'border-left',
		'border-left-color',
		'border-left-style',
		'border-left-width',
		'border-top',
		'border-top-color',
		'border-top-left-radius',
		'border-top-right-radius',
		'border-top-style',
		'border-top-width',
		'border-top-left-radius',
		'border-top-right-radius',

		'border-spacing',
		'border-collapse',
		'caption-side',

		'columns',
		'column-count',
		'column-fill',
		'column-gap',
		'column-rule',
		'column-span',
		'column-width',

		'color',
		'filter',
		'font',
		'font-family',
		'font-size',
		'font-style',
		'font-variant',
		'font-weight',
		'letter-spacing',
		'line-height',
		'text-align',
		'text-decoration',
		'text-indent',
		'text-transform',

		'height',
		'min-height',
		'max-height',

		'width',
		'min-width',
		'max-width',

		'margin',
		'margin-right',
		'margin-bottom',
		'margin-left',
		'margin-top',

		'padding',
		'padding-right',
		'padding-bottom',
		'padding-left',
		'padding-top',

		'flex',
		'flex-basis',
		'flex-direction',
		'flex-flow',
		'flex-grow',
		'flex-shrink',

		'grid-template-columns',
		'grid-auto-columns',
		'grid-column-start',
		'grid-column-end',
		'grid-column-gap',
		'grid-template-rows',
		'grid-auto-rows',
		'grid-row-start',
		'grid-row-end',
		'grid-row-gap',
		'grid-gap',

		'justify-content',
		'justify-items',
		'justify-self',
		'align-content',
		'align-items',
		'align-self',

		'clear',
		'cursor',
		'direction',
		'float',
		'list-style-type',
		'object-position',
		'overflow',
		'vertical-align',
	)
);


Top ↑

Changelog

Changelog
Version Description
2.8.1 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.