Advertisement
arie_cristianD

fake_view_counter_x3

Jul 31st, 2023
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. add_filter( 'jnews_view_initial_counter', 'fake_counter', null, 3 );
  2.  
  3. if ( ! function_exists( 'fake_counter' ) ) {
  4.     function fake_counter( $counter, $post_id ) {
  5.         $real_view = apply_filters( 'jnews_get_total_view', 0, $post_id, 'all' );
  6.         $counter   = $real_view * 3;
  7.         $counter   = $counter - $real_view;
  8.         return $counter;
  9.     }
  10. }
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement