Plugin Directory

Changeset 3232375


Ignore:
Timestamp:
01/31/2025 03:01:59 AM (13 months ago)
Author:
devcj
Message:

add copy icon

Location:
heading-id-copy/trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • heading-id-copy/trunk/css/style.css

    r3232365 r3232375  
    22    cursor: pointer;
    33}
     4
     5.copy-icon {
     6    width: 0.8em;
     7    cursor: pointer;
     8}
  • heading-id-copy/trunk/heading-id-copy.php

    r3232365 r3232375  
    3333            }
    3434
    35             return "<h{$tag} class=\"wp-block-heading\" id=\"{$id}\" onclick=\"copyToClipboard('{$id}')\">{$text}</h{$tag}>";
     35            return "<h{$tag} class=\"wp-block-heading\" id=\"{$id}\" onclick=\"copyToClipboard('{$id}')\">{$text}
     36                <img src=\"" . plugin_dir_url(__FILE__) . "images/copy.png\" class=\"copy-icon\" alt=\"Copy\">
     37            </h{$tag}>";
    3638        },
    3739        $content
     
    4042    return $content;
    4143}
     44
    4245add_filter('the_content', 'headingcopy_headings');
    4346
Note: See TracChangeset for help on using the changeset viewer.