Validate::pre_content( array $matches )

Description #

Callback for replacing contents inside <pre> tag.

Parameters #

  • $matches
    array (Required) Matches.

Source #

File: lib/class-validate.php

	private static function pre_content( $matches ) {
		preg_match( '/aplang\=\\"([A-Za-z0-9 _]*)\\"/', $matches[1], $lang );
		$lang = empty( $lang ) ? 'text' : esc_attr( $lang[1] );

		return '<pre>' . esc_html( $matches[2] ) . '</pre>';
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment