Guest User

Untitled

a guest
Sep 10th, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function lisans()
  15. {
  16. include 'lisans.php';
  17. $domain = $_SERVER['HTTP_HOST'];
  18. $domain = str_replace('www.', '', $domain);
  19. $random = 'bir654tema321';
  20. $h = '' . $random . '_' . $domain . '';
  21. $hash = md5($h);
  22.  
  23. if ($lisans != $hash) {
  24. echo 'Bu Tema Lisanssızdır. Lisansını almak için info@birtema.com mail adresinden iletişime geçebilirsiniz.';
  25. exit();
  26. }
  27. }
  28.  
  29. function create_my_taxonomies()
  30. {
  31. register_taxonomy('blogetiket', 'post', ['hierarchical' => false, 'label' => 'Blog Etiket', 'query_var' => true, 'rewrite' => true]);
  32. }
  33.  
  34. function kategori_id()
  35. {
  36. global $wp_query;
  37. if (is_category() || is_single()) {
  38. $cat_ID = get_query_var('cat');
  39. }
  40.  
  41. return $cat_ID;
  42. }
  43.  
  44. function SearchFilter($query)
  45. {
  46. if ($query->is_search && !$query->is_admin) {
  47. $query->set('post_type', 'post');
  48. }
  49.  
  50. return $query;
  51. }
  52.  
  53. function getPostViews($postID)
  54. {
  55. $count_key = 'post_views_count';
  56. $count = get_post_meta($postID, $count_key, true);
  57.  
  58. if ($count == '') {
  59. delete_post_meta($postID, $count_key);
  60. add_post_meta($postID, $count_key, '0');
  61. return '0';
  62. }
  63.  
  64. return $count . '';
  65. }
  66.  
  67. function setPostViews($postID)
  68. {
  69. $count_key = 'post_views_count';
  70. $count = get_post_meta($postID, $count_key, true);
  71.  
  72. if ($count == '') {
  73. $count = 0;
  74. delete_post_meta($postID, $count_key);
  75. add_post_meta($postID, $count_key, '0');
  76. }
  77. else {
  78. $count++;
  79. update_post_meta($postID, $count_key, $count);
  80. }
  81. }
  82.  
  83. function sayfalama($pages = '', $range = 3)
  84. {
  85. $showitems = ($range * 2) + 1;
  86. global $paged;
  87.  
  88. if (empty($paged)) {
  89. $paged = 1;
  90. }
  91.  
  92. if ($pages == '') {
  93. global $wp_query;
  94. $pages = $wp_query->max_num_pages;
  95.  
  96. if (!$pages) {
  97. $pages = 1;
  98. }
  99. }
  100.  
  101. if (1 != $pages) {
  102. echo '<ul>';
  103. if ((2 < $paged) && (($range + 1) < $paged) && ($showitems < $pages)) {
  104. ..........................................................
  105. ...................................
  106. ..............
Add Comment
Please, Sign In to add comment