WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/get image tag class

Description

This filter allows you to edit the classes that are automatically applied to images that are inserted into the TinyMCE editor via the Add Media button.

Usage

The filter function takes a $classes variable (string) and returns another string.

function my_image_class_filter($classes) {
	return $classes . ' another-image-class';
}
add_filter('get_image_tag_class', 'my_image_class_filter');
This page is marked as incomplete. You can help Codex by expanding it.