set_output_encoding example

/** * Fires just before processing the SimplePie feed object. * * @since 3.0.0 * * @param SimplePie $feed SimplePie feed object (passed by reference). * @param string|string[] $url URL of feed or array of URLs of feeds to retrieve. */
    do_action_ref_array( 'wp_feed_options', array( &$feed$url ) );

    $feed->init();
    $feed->set_output_encoding( get_option( 'blog_charset' ) );

    if ( $feed->error() ) {
        return new WP_Error( 'simplepie-error', $feed->error() );
    }

    return $feed;
}

    public function set_output_encoding($encoding = 'UTF-8')
    {
        $this->sanitize->set_output_encoding($encoding);
    }

    public function strip_comments($strip = false)
    {
        $this->sanitize->strip_comments($strip);
    }

    /** * Set element/attribute key/value pairs of HTML attributes * containing URLs that need to be resolved relative to the feed * * Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite, * |form|@action, |img|@longdesc, |img|@src, |input|@src, |ins|@cite, * |q|@cite * * @since 1.0 * @param array|null $element_attribute Element/attribute key/value pairs, null for default */
Home | Imprint | This part of the site doesn't use cookies.