PluginProbe
Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code / 3.5.2
Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code v3.5.2
5.5.3 3.1.0 3.2.0 3.2.1 3.3.0 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.6.0 3.7.0 3.8.0 3.8.1 3.8.2 3.8.3 4.0.0 4.0.2 4.0.3 4.0.4 4.0.5 4.1.0 4.1.1 All 78 releases
copy-the-code / classes / elementor / widgets / copy-button / widget.php

widget.php in Copy Anything to Clipboard for WordPress – Copy Button, Copy Text & Copy Code 3.5.2, at classes/elementor/widgets/copy-button/widget.php

96 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor Copy Button Block
4 *
5 * @package Copy the Code
6 * @since 3.1.0
7 */
8
9 namespace CopyTheCode\Elementor\Block;
10
11 use CopyTheCode\Helpers;
12 use Elementor\Widget_Base;
13 use Elementor\Controls_Manager;
14
15 /**
16 * Copy Button Block
17 *
18 * @since 3.1.0
19 */
20 class CopyButton extends Widget_Base {
21
22 /**
23 * Constructor
24 *
25 * @param array $data
26 * @param array $args
27 *
28 * @since 3.1.0
29 */
30 public function __construct($data = [], $args = null) {
31 parent::__construct($data, $args);
32 }
33
34 /**
35 * Get name
36 */
37 public function get_name() {
38 return 'ctc_copy_button';
39 }
40
41 /**
42 * Get title
43 */
44 public function get_title() {
45 return esc_html__( 'Copy to Clipboard Button', 'copy-the-code' );
46 }
47
48 /**
49 * Get icon
50 */
51 public function get_icon() {
52 return 'eicon-button';
53 }
54
55 /**
56 * Get categories
57 */
58 public function get_categories() {
59 return Helpers::get_categories();
60 }
61
62 /**
63 * Get keywords
64 */
65 public function get_keywords() {
66 return Helpers::get_keywords( [ 'copy', 'button', 'clipboard', 'copy button', 'clipboard button' ] );
67 }
68
69 /**
70 * Render
71 */
72 public function render() {
73 ?>
74 <div class="ctc-block ctc-copy-button">
75 <div class="ctc-block-actions">
76 <?php
77 Helpers::render_copy_button( $this );
78 ?>
79 </div>
80 <?php Helpers::render_copy_content( $this ); ?>
81 </div>
82 <?php
83 }
84
85 /**
86 * Register controls
87 */
88 protected function _register_controls() {
89 Helpers::register_copy_content_section( $this );
90
91 Helpers::register_copy_button_section( $this );
92
93 Helpers::register_copy_button_style_section( $this );
94 }
95
96 }