PluginProbe ʕ •ᴥ•ʔ
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor / 4.0.1
ElementsKit Elementor Addons – Advanced Widgets & Templates Addons for Elementor v4.0.1
4.0.3 4.0.2 4.0.1 4.0.0 3.10.02 3.10.01 3.9.10 3.9.9 3.9.8 3.9.7 3.9.5 3.9.6 3.9.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.3.1 2.3.1.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.4.0 2.5.0 2.5.1 2.5.10 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.2 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.6.0 3.6.1 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.8.1 3.8.2 3.9.0 3.9.1 3.9.2 trunk 1.2.6 1.2.7 1.2.9 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.11 1.5.12 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.9.1 2.0.9.2 2.0.9.3
elementskit-lite / widgets / post-list / post-list-handler.php
elementskit-lite / widgets / post-list Last commit date
post-list-handler.php 6 months ago post-list.php 3 weeks ago
post-list-handler.php
64 lines
1 <?php
2 namespace Elementor;
3
4
5 class ElementsKit_Widget_Post_List_Handler extends \ElementsKit_Lite\Core\Handler_Widget{
6
7 public function wp_init(){
8 // post view count based on single page visit
9 add_action( 'wp_head', array($this, 'ekit_track_post_views'));
10 }
11
12 public function ekit_track_post_views ($post_id) {
13 if ( !is_single() ) return;
14 if ( empty ( $post_id) ) {
15 global $post;
16 $post_id = $post->ID;
17 }
18 $this->ekit_set_post_views($post_id);
19 }
20
21
22 public function ekit_set_post_views($postID) {
23 $count_key = 'ekit_post_views_count';
24 $count = get_post_meta($postID, $count_key, true);
25 if($count==''){
26 $count = 1;
27 delete_post_meta($postID, $count_key);
28 add_post_meta($postID, $count_key, '1');
29 }else{
30 $count++;
31 update_post_meta($postID, $count_key, $count);
32 }
33 }
34
35 static function get_name() {
36 return 'elementskit-post-list';
37 }
38
39
40 static function get_title() {
41 return esc_html__( 'Post List', 'elementskit-lite' );
42 }
43
44
45 static function get_icon() {
46 return 'ekit ekit-widget-icon ekit-post-list';
47 }
48
49 static function get_keywords() {
50 return ['ekit', 'list', 'post list', 'post', 'elementskit post list'];
51 }
52
53 static function get_categories() {
54 return [ 'elementskit' ];
55 }
56
57 static function get_dir() {
58 return \ElementsKit_Lite::widget_dir() . 'post-list/';
59 }
60
61 static function get_url() {
62 return \ElementsKit_Lite::widget_url() . 'post-list/';
63 }
64 }