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
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.