print_embed_sharing_button() WordPress Function
The print_embed_sharing_button() function enables you to add a sharing button to your WordPress site. This function takes two parameters: $url: The URL of the page you want to share. $text: The text you want to display on the button. This function enables you to share your content on social media platforms such as Facebook, Twitter, and LinkedIn.
print_embed_sharing_button() #
Prints the necessary markup for the embed sharing button.
Source
File: wp-includes/embed.php
function print_embed_sharing_button() { if ( is_404() ) { return; } ?> <div class="wp-embed-share"> <button type="button" class="wp-embed-share-dialog-open" aria-label="<?php esc_attr_e( 'Open sharing dialog' ); ?>"> <span class="dashicons dashicons-share"></span> </button> </div> <?php }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |