CFF_Modern_Elementor_Widget.php
| 1 | <?php |
| 2 | |
| 3 | namespace CustomFacebookFeed\Integrations\Elementor; |
| 4 | |
| 5 | use FacebookFeed\Vendor\Smashballoon\Framework\Packages\Blocks\SB_Elementor_Feed_Widget; |
| 6 | use CustomFacebookFeed\Builder\CFF_Db; |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | |
| 12 | if ( ! class_exists( '\Elementor\Widget_Base' ) ) { |
| 13 | return; |
| 14 | } |
| 15 | |
| 16 | class CFF_Modern_Elementor_Widget extends SB_Elementor_Feed_Widget { |
| 17 | |
| 18 | protected function get_widget_name() { |
| 19 | return 'sb-facebook-feed'; |
| 20 | } |
| 21 | |
| 22 | protected function get_widget_title() { |
| 23 | return __( 'Facebook Feed', 'custom-facebook-feed' ); |
| 24 | } |
| 25 | |
| 26 | protected function get_widget_icon() { |
| 27 | return 'sb-elem-icon sb-elem-facebook'; |
| 28 | } |
| 29 | |
| 30 | protected function get_shortcode_tag() { |
| 31 | return 'custom-facebook-feed'; |
| 32 | } |
| 33 | |
| 34 | protected function get_feeds_options() { |
| 35 | $feeds = CFF_Db::elementor_feeds_query(); |
| 36 | unset( $feeds[0] ); |
| 37 | return $feeds; |
| 38 | } |
| 39 | |
| 40 | protected function get_text_domain() { |
| 41 | return 'custom-facebook-feed'; |
| 42 | } |
| 43 | |
| 44 | protected function get_script_deps() { |
| 45 | return array( 'cffscripts', 'sb-elementor-editor' ); |
| 46 | } |
| 47 | |
| 48 | protected function get_style_deps() { |
| 49 | return array( 'cff', 'sb-elementor-editor' ); |
| 50 | } |
| 51 | |
| 52 | protected function get_output_filter() { |
| 53 | return 'cff_output'; |
| 54 | } |
| 55 | } |
| 56 |