ตัวอย่างโค้ดเพื่อเปลี่ยนสถิติยอดวิว
แนะนำให้ใช้วิธี Import Stat
แต่หากต้องการเขียนโปรแกรมเพิ่ม สามารถใช้ตัวอย่างโค้ดตามนี้ได้
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('sstp_views', 'sstp_change_views',10, 2 ); | |
function sstp_change_views($num, $postID) { | |
if ($postID == 123) { | |
return $num + 500; | |
} | |
return $num; | |
} |