/** * WP_oEmbed_Controller class, used to provide an oEmbed endpoint. * * @package WordPress * @subpackage Embeds * @since 4.4.0 */ /** * oEmbed API endpoint controller. * * Registers the API route and delivers the response data. * The output format (XML or JSON) is handled by the REST API. * * @since 4.4.0 */ final class WP_oEmbed_Controller { /** * Register the oEmbed REST API route. * * @since 4.4.0 * @access public */ public function register_routes() { /** * Filters the maxwidth oEmbed parameter. * * @since 4.4.0 * * @param int $maxwidth Maximum allowed width. Default 600. */ $maxwidth = apply_filters( 'oembed_default_width', 600 ); register_rest_route( 'oembed/1.0', '/embed', array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_item' ), 'args' => array( 'url' => array( 'required' => true, 'sanitize_callback' => 'esc_url_raw', ), 'format' => array( 'default' => 'json', 'sanitize_callback' => 'wp_oembed_ensure_format', ), 'maxwidth' => array( 'default' => $maxwidth, 'sanitize_callback' => 'absint', ), ), ), ) ); } /** * Callback for the API endpoint. * * Returns the JSON object for the post. * * @since 4.4.0 * @access public * * @param WP_REST_Request $request Full data about the request. * @return WP_Error|array oEmbed response data or WP_Error on failure. */ public function get_item( $request ) { $post_id = url_to_postid( $request['url'] ); /** * Filters the determined post ID. * * @since 4.4.0 * * @param int $post_id The post ID. * @param string $url The requested URL. */ $post_id = apply_filters( 'oembed_request_post_id', $post_id, $request['url'] ); $data = get_oembed_response_data( $post_id, $request['maxwidth'] ); if ( ! $data ) { return new WP_Error( 'oembed_invalid_url', get_status_header_desc( 404 ), array( 'status' => 404 ) ); } return $data; } } Blog - Charmoné Shoes
Your cart is empty!
View Cart Checkout
Cart subtotal: $0.00

Blog

Spring is in the air- and winter is on sale!

Design Inspiration, Ethical Fashion

Page Not Found

The page you were looking for could not be found.

Check the URL for errors.

Spring has sprung at Charmone, making us feel both dreamy and romantic while inspired and excited. We have new sandals which will be posted soon! In the meantime, take 20% off already-marked-down winter styles with coupon code “green”…

Dream closet: January 29, 2016

Dream closet

In the mood for some chocolate…and carmel – https://charmone.com/product/libra-boot-in-carmel/

Share the love: Alternative Apparel

People we love

As they say, “sharing is caring”. We would like to share with everyone Alternative Apparel. Alternative Apparel is a great source for sustainability products. They believe in social change through responsible business practices that respect people and the…

Dream Closet: January 22, 2016

Dream closet

Present yourself confidently – https://charmone.com/product/sagittarius-in-platinum-2/

Spread the word: Adore, reflect, sustain

People we love

Spreading the word, Charmone would like to give a shout out to Adore, reflect, sustain. Emma Wraight is a university researcher and ethical fashion advocate with a keen interest in consumption and sustainability. Adore, reflect, sustain started as…