wp_kses_post_deep example

if ( $meta[ $key ] && ! seems_utf8( $meta[ $key ] ) ) {
            $meta[ $key ] = utf8_encode( $meta[ $key ] );
        }
    }

    foreach ( $meta['keywords'] as $key => $keyword ) {
        if ( ! seems_utf8( $keyword ) ) {
            $meta['keywords'][ $key ] = utf8_encode( $keyword );
        }
    }

    $meta = wp_kses_post_deep( $meta );

    /** * Filters the array of meta data read from an image's exif data. * * @since 2.5.0 * @since 4.4.0 The `$iptc` parameter was added. * @since 5.0.0 The `$exif` parameter was added. * * @param array $meta Image meta data. * @param string $file Path to image file. * @param int $image_type Type of image, one of the `IMAGETYPE_XXX` constants. * @param array $iptc IPTC data. * @param array $exif EXIF data. */
Home | Imprint | This part of the site doesn't use cookies.