jetpack_embed_medium_embed_html

The Jetpack by WordPress.com jetpack embed medium html function.

Description

jetpack_embed_medium_embed_html( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'jetpack_embed_medium_embed_html' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/shortcodes/medium.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_embed_medium_embed_html($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/medium.php  
  1. function jetpack_embed_medium_embed_html( $args ) { 
  2. $args = jetpack_embed_medium_args( $args ); 
  3.  
  4. if ( empty( $args['url'] ) ) { 
  5. return; 
  6.  
  7. $args['type'] = jetpack_embed_medium_get_embed_type( $args['url'] ); 
  8.  
  9. return sprintf( '<script async src="https://static.medium.com/embed.js"></script><a class="m-%1$s" href="%2$s" data-width="%3$s" data-border="%4$s" data-collapsed="%5$s">View %1$s at Medium.com</a>', esc_attr( $args['type'] ), esc_url( $args['url'] ), esc_attr( $args['width'] ), esc_attr( $args['border'] ), esc_attr( $args['collapsed'] ) );