print_embed_sharing_dialog()
最后更新于:2021-11-27 20:30:52
print_embed_sharing_dialog()Prints the necessary markup for the embed sharing dialog.
源文件
文件: gc-includes/embed.php
function print_embed_sharing_dialog() {
if ( is_404() ) {
return;
}
?>
<div class="gc-embed-share-dialog hidden" role="dialog" aria-label="<?php esc_attr_e( 'Sharing options' ); ?>">
<div class="gc-embed-share-dialog-content">
<div class="gc-embed-share-dialog-text">
<ul class="gc-embed-share-tabs" role="tablist">
<li class="gc-embed-share-tab-button gc-embed-share-tab-button-gechiui" role="presentation">
<button type="button" role="tab" aria-controls="gc-embed-share-tab-gechiui" aria-selected="true" tabindex="0"><?php esc_html_e( 'GeChiUI Embed' ); ?></button>
</li>
<li class="gc-embed-share-tab-button gc-embed-share-tab-button-html" role="presentation">
<button type="button" role="tab" aria-controls="gc-embed-share-tab-html" aria-selected="false" tabindex="-1"><?php esc_html_e( 'HTML Embed' ); ?></button>
</li>
</ul>
<div id="gc-embed-share-tab-gechiui" class="gc-embed-share-tab" role="tabpanel" aria-hidden="false">
<input type="text" value="<?php the_permalink(); ?>" class="gc-embed-share-input" aria-describedby="gc-embed-share-description-gechiui" tabindex="0" readonly/>
<p class="gc-embed-share-description" id="gc-embed-share-description-gechiui">
<?php _e( 'Copy and paste this URL into your GeChiUI site to embed' ); ?>
</p>
</div>
<div id="gc-embed-share-tab-html" class="gc-embed-share-tab" role="tabpanel" aria-hidden="true">
<textarea class="gc-embed-share-input" aria-describedby="gc-embed-share-description-html" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea>
<p class="gc-embed-share-description" id="gc-embed-share-description-html">
<?php _e( 'Copy and paste this code into your site to embed' ); ?>
</p>
</div>
</div>
<button type="button" class="gc-embed-share-dialog-close" aria-label="<?php esc_attr_e( 'Close sharing dialog' ); ?>">
<span class="dashicons dashicons-no"></span>
</button>
</div>
</div>
<?php
}