PHP Class AMP_Img_Sanitizer, amp-wp

Inheritance: extends AMP_Base_Sanitizer
Show file Open project: Automattic/amp-wp Class Usage Examples

Public Properties

Property Type Description
$tag

Public Methods

Method Description
get_scripts ( )
sanitize ( )

Private Methods

Method Description
adjust_and_replace_node ( DOMNode $node ) Make final modifications to DOMNode
adjust_and_replace_nodes_in_array_map ( array $node_lists ) Now that all images have width and height attributes, make final tweaks and replace original image nodes
determine_dimensions ( array $need_dimensions ) Figure out width and height attribute values for images that don't have them by attempting to determine actual dimensions and setting reasonable defaults otherwise.
filter_attributes ( $attributes )
is_gif_url ( $url )

Method Details

get_scripts() public method

public get_scripts ( )

sanitize() public method

public sanitize ( )

Property Details

$tag public static property

public static $tag