Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('admin_footer', function () {
- if (isset($_GET['page'], $_GET['sp']) && $_GET['page'] == 'quform.entries' && $_GET['sp'] == 'view') {
- ?>
- <script>
- jQuery(function ($) {
- $('.qfb-entry-table ul').each(function () {
- var images = [];
- $(this).find('>li>a').each(function () {
- var href = $(this).attr('href');
- if (/(.gif|.png|.jpe?g)$/ig.test(href)) {
- var $image = $('<img>').attr('src', href).css({
- maxWidth: '100%'
- });
- images.push($('<div>').css('margin-bottom', '10px').append($image));
- }
- });
- if (images.length) {
- $(this).replaceWith(images);
- }
- });
- });
- </script>
- <?php
- }
- });
Add Comment
Please, Sign In to add comment