Guest User

Untitled

a guest
Jun 28th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.7.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. add_action( 'init', 'lisans' );
  15. require_once 'cs-admin/cs-framework.php';
  16. include_once 'metabox.php';
  17. add_action( 'init', 'create_my_taxonomies', 0 );
  18. add_theme_support( 'post-thumbnails' );
  19.  
  20. if (function_exists( 'add_image_size' )) {
  21. add_image_size( 'indexSlider', 572, 322, true );
  22. add_image_size( 'blog-kucuk', 226, 127, true );
  23. add_image_size( 'program-kucuk', 75, 75, true );
  24. }
  25.  
  26. add_filter( 'pre_get_posts', 'SearchFilter' );
  27. the_post_thumbnail( );
  28. register_nav_menus( array( 'topmenu' => 'Üst Menu' ) );
  29. register_nav_menus( array( 'mobilmenu' => 'Mobil Menü' ) );
  30. register_nav_menus( array( 'footermenu' => 'Footer Menu' ) );
  31. register_nav_menus( array( 'fixedmenu' => 'Fixed Sol Menü' ) );
  32. add_filter( 'excerpt_length', 'my_excerpt_length' );
  33. add_action( 'wp_footer', 'comment_validation_init' );
  34.  
  35. function lisans()
  36. {
  37. include 'lisans.php';
  38. $domain = $_SERVER['HTTP_HOST'];
  39. $domain = str_replace( 'www.', '', $domain );
  40. $random = 'bir654tema321';
  41. $h = '' . $random . '_' . $domain . '';
  42. $hash = md5( $h );
  43.  
  44. if ($lisans != $hash) {
  45. echo 'Bu Tema Lisanssızdır. Lisansını almak için [email protected] mail adresinden iletişime geçebilirsiniz.';
  46. exit( );
  47. }
  48. }
  49.  
  50. function create_my_taxonomies()
  51. {
  52. register_taxonomy( 'blogetiket', 'post', array(
  53. 'hierarchical' => false,
  54. 'label' => 'Blog Etiket',
  55. 'query_var' => true,
  56. 'rewrite' => true
  57. ) );
  58. }
  59.  
  60. function kategori_id()
  61. {
  62. global $wp_query;
  63. if (is_category( ) || is_single( )) {
  64. $cat_ID = get_query_var( 'cat' );
  65. }
  66.  
  67. return $cat_ID;
  68. }
  69.  
  70. function SearchFilter($query)
  71. {
  72. if ($query->is_search && !($query->is_admin)) {
  73. $query->set( 'post_type', 'post' );
  74. }
  75.  
  76. return $query;
  77. }
  78.  
  79. function getPostViews($postID)
  80. {
  81. $count_key = 'post_views_count';
  82. $count = get_post_meta( $postID, $count_key, true );
  83.  
  84. if ($count == '') {
  85. delete_post_meta( $postID, $count_key );
  86. ..................................................................................
  87. ..............................................
  88. ......................
Advertisement
Add Comment
Please, Sign In to add comment