PluginProbe ʕ •ᴥ•ʔ
Custom Twitter Feeds – A Tweets Widget or X Feed Widget / 2.8.0
Custom Twitter Feeds – A Tweets Widget or X Feed Widget v2.8.0
2.8.0 2.7.0 2.6.1 2.6.0 1.0 1.0.1 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.4 1.4.1 1.5 1.5.1 1.6 1.6.1 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.5.4 2.5.5 trunk
custom-twitter-feeds / inc / Integrations / Elementor / CTF_Modern_Elementor_Widget.php
custom-twitter-feeds / inc / Integrations / Elementor Last commit date
CTF_Elementor_Base.php 4 weeks ago CTF_Modern_Elementor_Widget.php 4 weeks ago
CTF_Modern_Elementor_Widget.php
109 lines
1 <?php
2
3 namespace TwitterFeed\Integrations\Elementor;
4
5 use Smashballoon\TwitterFeed\Vendor\Smashballoon\Framework\Packages\Blocks\SB_Elementor_Feed_Widget;
6 use TwitterFeed\Builder\CTF_Db;
7
8 if (! defined('ABSPATH')) {
9 exit;
10 }
11
12 if (! class_exists('\Elementor\Widget_Base')) {
13 return;
14 }
15
16 // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps -- Follows codebase CTF_ prefix convention.
17 class CTF_Modern_Elementor_Widget extends SB_Elementor_Feed_Widget
18 {
19 /**
20 * Get the widget name.
21 *
22 * @return string
23 */
24 protected function get_widget_name() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
25 {
26 return 'sb-twitter-feed';
27 }
28
29 /**
30 * Get the widget title.
31 *
32 * @return string
33 */
34 protected function get_widget_title() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
35 {
36 return __( 'Twitter Feed', 'custom-twitter-feeds' );
37 }
38
39 /**
40 * Get the widget icon CSS class.
41 *
42 * @return string
43 */
44 protected function get_widget_icon() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
45 {
46 return 'sb-elem-icon sb-elem-twitter';
47 }
48
49 /**
50 * Get the shortcode tag.
51 *
52 * @return string
53 */
54 protected function get_shortcode_tag() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
55 {
56 return 'custom-twitter-feeds';
57 }
58
59 /**
60 * Get the available feeds options for the widget.
61 *
62 * @return array
63 */
64 protected function get_feeds_options() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
65 {
66 return CTF_Db::elementor_feeds_query();
67 }
68
69 /**
70 * Get the text domain.
71 *
72 * @return string
73 */
74 protected function get_text_domain() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
75 {
76 return 'custom-twitter-feeds';
77 }
78
79 /**
80 * Get the script dependencies.
81 *
82 * @return array
83 */
84 protected function get_script_deps() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
85 {
86 return array( 'ctf_scripts', 'sb-elementor-editor' );
87 }
88
89 /**
90 * Get the style dependencies.
91 *
92 * @return array
93 */
94 protected function get_style_deps() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
95 {
96 return array( 'ctf_styles', 'sb-elementor-editor' );
97 }
98
99 /**
100 * Get the output filter name.
101 *
102 * @return string
103 */
104 protected function get_output_filter() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps
105 {
106 return 'ctf_output';
107 }
108 }
109