PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.5
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.5
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
ultimate-post-kit / includes / compatiblity / wpml / class-wpml-upk-static-social-count.php

class-wpml-upk-static-social-count.php in Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets 4.5.5, at includes/compatiblity/wpml/class-wpml-upk-static-social-count.php

65 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace UltimatePostKit\Includes;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly
6 }
7
8 /**
9 * Class WPML_UPK_Static_Social_Count
10 * Handles translation of repeater items in the Static Social Count widget
11 */
12 class WPML_UPK_Static_Social_Count extends WPML_Module_With_Items {
13
14 /**
15 * @return string
16 */
17 public function get_items_field() {
18 return 'social_counter_list';
19 }
20
21 /**
22 * @return array
23 */
24 public function get_fields() {
25 return array(
26 'social_site_name',
27 'social_site_meta',
28 'social_site_link' => ['url'],
29 );
30 }
31
32 /**
33 * @param string $field
34 * @return string
35 */
36 protected function get_title( $field ) {
37 switch ( $field ) {
38 case 'social_site_name':
39 return esc_html__( 'Label', 'ultimate-post-kit' );
40 case 'social_site_link':
41 return esc_html__( 'Link', 'ultimate-post-kit' );
42 case 'social_site_meta':
43 return esc_html__( 'Meta', 'ultimate-post-kit' );
44 default:
45 return '';
46 }
47 }
48
49 /**
50 * @param string $field
51 * @return string
52 */
53 protected function get_editor_type( $field ) {
54 switch ( $field ) {
55 case 'social_site_name':
56 case 'social_site_meta':
57 return 'LINE';
58 case 'social_site_link':
59 return 'LINK';
60 default:
61 return 'LINE';
62 }
63 }
64 }
65