Changeset 3464250
- Timestamp:
- 02/18/2026 11:07:35 AM (25 hours ago)
- Location:
- stick-copy-button-codeblock
- Files:
-
- 13 added
- 2 edited
-
tags/1.5.0 (added)
-
tags/1.5.0/assets (added)
-
tags/1.5.0/assets/scbc-script.js (added)
-
tags/1.5.0/assets/scbc-style.css (added)
-
tags/1.5.0/languages (added)
-
tags/1.5.0/languages/stick-copy-button-codeblock-ja.mo (added)
-
tags/1.5.0/languages/stick-copy-button-codeblock-ja.po (added)
-
tags/1.5.0/languages/stick-copy-button-codeblock.pot (added)
-
tags/1.5.0/readme.txt (added)
-
tags/1.5.0/screenshot-1.png (added)
-
tags/1.5.0/screenshot-2.png (added)
-
tags/1.5.0/screenshot-3.png (added)
-
tags/1.5.0/stick-copy-button-codeblock.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/stick-copy-button-codeblock.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stick-copy-button-codeblock/trunk/readme.txt
r3445344 r3464250 6 6 Requires PHP: 7.4 7 7 Tested up to: 6.9 8 Stable tag: 1. 4.08 Stable tag: 1.5.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 165 165 166 166 == Changelog == 167 = 1.5.0 = 168 * Load scripts only when code blocks are detected. 169 167 170 = 1.4.0 = 168 171 * Added an option to display line numbers. -
stick-copy-button-codeblock/trunk/stick-copy-button-codeblock.php
r3414250 r3464250 3 3 * Plugin Name: Sticky Copy Button for Code Blocks 4 4 * Description: This plugin adds a convenient copy button to every code block on your blog posts. Customize the button's position, labels, size, and colors from a dedicated settings page to match your site's design. Optional line numbers can be displayed. 5 * Version: 1. 4.05 * Version: 1.5.0 6 6 * Author: Kasuga 7 7 * License: GPLv2 or later … … 235 235 */ 236 236 function kasuga_scbc_enqueue_assets() { 237 if ( ! is_singular() ) { 238 return; 239 } 240 241 global $post; 242 if ( ! $post || ! isset( $post->post_content ) ) { 243 return; 244 } 245 246 if ( ! has_block( 'core/code', $post ) && strpos( $post->post_content, '<pre' ) === false ) { 247 return; 248 } 237 249 238 250 $settings = array( … … 260 272 .code-block-wrapper .line-numbers span { 261 273 display: block !important; 262 height: 1.5em !important;263 line-height: 1.5 !important;274 height: 1.5em !important; 275 line-height: 1.5 !important; 264 276 width: 100%; 265 277 } 266 278 .code-block-wrapper pre { 267 line-height: 1.5 !important;279 line-height: 1.5 !important; 268 280 letter-spacing: 0 !important; 269 281 }
Note: See TracChangeset
for help on using the changeset viewer.