$value ) { if ( ! in_array( $attribute, $omit, true ) && ! empty( $value ) ) { return true; } } return false; } /** * Adds email schema attributes. * * @param array $attr Array containing the email block attributes. * @param string $content String containing the email block content. * * @return string */ public static function render_email( $attr, $content ) { $content = self::has_attributes( $attr, array( 'className' ) ) ? str_replace( 'href="mailto:', 'itemprop="email" href="mailto:', $content ) : ''; return $content; } /** * Adds phone schema attributes. * * @param array $attr Array containing the phone block attributes. * @param string $content String containing the phone block content. * * @return string */ public static function render_phone( $attr, $content ) { $content = self::has_attributes( $attr, array( 'className' ) ) ? str_replace( 'href="tel:', 'itemprop="telephone" href="tel:', $content ) : ''; return $content; } }