Last active
January 4, 2022 22:25
-
-
Save Firsh/9ae0018016820d916a6466a23d9a37ad to your computer and use it in GitHub Desktop.
PhotoSwipe HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function photoswipe_html() { | |
global $post; | |
if ($post->ID !== 21801) { | |
return; | |
} | |
echo <<<'EOD' | |
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"> | |
<div class="pswp__bg"></div> | |
<div class="pswp__scroll-wrap"> | |
<div class="pswp__container"> | |
<div class="pswp__item"></div> | |
<div class="pswp__item"></div> | |
<div class="pswp__item"></div> | |
</div> | |
<div class="pswp__ui pswp__ui--hidden pswp__ca_center"> | |
<div class="pswp__top-bar"> | |
<div class="pswp__counter"></div> | |
<span class="pswp__button pswp__button--close" title="Close (Esc)"></span> | |
<span class="pswp__button pswp__button--share" title="Share"></span> | |
<span class="pswp__button pswp__button--fs" title="Toggle fullscreen"></span> | |
<span class="pswp__button pswp__button--zoom" title="Zoom in/out"></span> | |
<div class="pswp__preloader"> | |
<div class="pswp__preloader__icn"> | |
<div class="pswp__preloader__cut"> | |
<div class="pswp__preloader__donut"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"> | |
<div class="pswp__share-tooltip"></div> | |
</div> | |
<span class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></span> | |
<span class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></span> | |
<div class="pswp__caption"> | |
<div class="pswp__caption__center"></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
EOD; | |
} | |
add_action( 'wp_footer', 'photoswipe_html' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment