print_embed_sharing_dialog

Prints the necessary markup for the embed sharing dialog.

Description

print_embed_sharing_dialog(); 

Usage

  1. if ( !function_exists( 'print_embed_sharing_dialog' ) ) { 
  2. require_once ABSPATH . WPINC . '/embed.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = print_embed_sharing_dialog(); 
  7.  

Defined (1)

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

/wp-includes/embed.php  
  1. function print_embed_sharing_dialog() { 
  2. if ( is_404() ) { 
  3. return; 
  4. ?> 
  5. <div class="wp-embed-share-dialog hidden" role="dialog" aria-label="<?php esc_attr_e( 'Sharing options' ); ?>"> 
  6. <div class="wp-embed-share-dialog-content"> 
  7. <div class="wp-embed-share-dialog-text"> 
  8. <ul class="wp-embed-share-tabs" role="tablist"> 
  9. <li class="wp-embed-share-tab-button wp-embed-share-tab-button-wordpress" role="presentation"> 
  10. <button type="button" role="tab" aria-controls="wp-embed-share-tab-wordpress" aria-selected="true" tabindex="0"><?php esc_html_e( 'WordPress Embed' ); ?></button> 
  11. </li> 
  12. <li class="wp-embed-share-tab-button wp-embed-share-tab-button-html" role="presentation"> 
  13. <button type="button" role="tab" aria-controls="wp-embed-share-tab-html" aria-selected="false" tabindex="-1"><?php esc_html_e( 'HTML Embed' ); ?></button> 
  14. </li> 
  15. </ul> 
  16. <div id="wp-embed-share-tab-wordpress" class="wp-embed-share-tab" role="tabpanel" aria-hidden="false"> 
  17. <input type="text" value="<?php the_permalink(); ?>" class="wp-embed-share-input" aria-describedby="wp-embed-share-description-wordpress" tabindex="0" readonly/> 
  18.  
  19. <p class="wp-embed-share-description" id="wp-embed-share-description-wordpress"> 
  20. <?php _e( 'Copy and paste this URL into your WordPress site to embed' ); ?> 
  21. </p> 
  22. </div> 
  23. <div id="wp-embed-share-tab-html" class="wp-embed-share-tab" role="tabpanel" aria-hidden="true"> 
  24. <textarea class="wp-embed-share-input" aria-describedby="wp-embed-share-description-html" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea> 
  25.  
  26. <p class="wp-embed-share-description" id="wp-embed-share-description-html"> 
  27. <?php _e( 'Copy and paste this code into your site to embed' ); ?> 
  28. </p> 
  29. </div> 
  30. </div> 
  31.  
  32. <button type="button" class="wp-embed-share-dialog-close" aria-label="<?php esc_attr_e( 'Close sharing dialog' ); ?>"> 
  33. <span class="dashicons dashicons-no"></span> 
  34. </button> 
  35. </div> 
  36. </div> 
  37. <?php