PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
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-pro-post-info.php

class-wpml-upk-pro-post-info.php in Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets 4.5.6, at includes/compatiblity/wpml/class-wpml-upk-pro-post-info.php

85 lines 2.4 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_Pro_Post_Info
10 * Handles translation of repeater items in the Post Info widget
11 */
12 class WPML_UPK_Pro_Post_Info extends WPML_Module_With_Items {
13
14 /**
15 * @return string
16 */
17 public function get_items_field() {
18 return 'icon_list';
19 }
20
21 /**
22 * @return array
23 */
24 public function get_fields() {
25 return array(
26 'text_prefix',
27 'custom_text',
28 'custom_date_format',
29 'custom_time_format',
30 'string_no_comments',
31 'string_one_comment',
32 'string_comments',
33 'custom_url' => ['url'],
34 );
35 }
36
37 /**
38 * @param string $field
39 * @return string
40 */
41 protected function get_title( $field ) {
42 switch ( $field ) {
43 case 'text_prefix':
44 return esc_html__( 'Text Prefix', 'ultimate-post-kit' );
45 case 'custom_text':
46 return esc_html__( 'Custom Text', 'ultimate-post-kit' );
47 case 'custom_date_format':
48 return esc_html__( 'Custom Date Format', 'ultimate-post-kit' );
49 case 'custom_time_format':
50 return esc_html__( 'Custom Time Format', 'ultimate-post-kit' );
51 case 'string_no_comments':
52 return esc_html__( 'No Comments String', 'ultimate-post-kit' );
53 case 'string_one_comment':
54 return esc_html__( 'One Comment String', 'ultimate-post-kit' );
55 case 'string_comments':
56 return esc_html__( 'Comments String', 'ultimate-post-kit' );
57 case 'custom_url':
58 return esc_html__( 'Custom URL', 'ultimate-post-kit' );
59 default:
60 return '';
61 }
62 }
63
64 /**
65 * @param string $field
66 * @return string
67 */
68 protected function get_editor_type( $field ) {
69 switch ( $field ) {
70 case 'text_prefix':
71 case 'custom_text':
72 case 'custom_date_format':
73 case 'custom_time_format':
74 case 'string_no_comments':
75 case 'string_one_comment':
76 case 'string_comments':
77 return 'LINE';
78 case 'custom_url':
79 return 'LINK';
80 default:
81 return 'LINE';
82 }
83 }
84 }
85