Advertisement
Guest User

Untitled

a guest
Jul 24th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.17 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.0
  8. * @ Author : DeZender
  9. * @ Release on : 15.05.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function unregister_default_widgets()
  15. {
  16. unregister_widget('WP_Widget_Pages');
  17. unregister_widget('WP_Widget_Calendar');
  18. unregister_widget('WP_Widget_Archives');
  19. unregister_widget('WP_Widget_Links');
  20. unregister_widget('WP_Widget_Media_Image');
  21. unregister_widget('WP_Widget_Media_Audio');
  22. unregister_widget('WP_Widget_Media_Video');
  23. unregister_widget('WP_Widget_Meta');
  24. unregister_widget('WP_Widget_Media_Gallery');
  25. unregister_widget('WP_Widget_Search');
  26. unregister_widget('WP_Widget_Text');
  27. unregister_widget('WP_Widget_Categories');
  28. unregister_widget('WP_Widget_Recent_Posts');
  29. unregister_widget('WP_Widget_Recent_Comments');
  30. unregister_widget('WP_Widget_RSS');
  31. unregister_widget('WP_Widget_Tag_Cloud');
  32. unregister_widget('WP_Nav_Menu_Widget');
  33. unregister_widget('Twenty_Eleven_Ephemera_Widget');
  34. }
  35.  
  36. function url_filtered($fields)
  37. {
  38. if (isset($fields['url'])) {
  39. unset($fields['url']);
  40. }
  41.  
  42. return $fields;
  43. }
  44.  
  45. function birtema_aktivasyon()
  46. {
  47. include __DIR__ . '/lisans.php';
  48. $domain = $_SERVER['HTTP_HOST'];
  49. $curl = curl_init('http://birtema.net/lisans_check/api.php?lisans=' . $lisans . '&domain=' . $domain . '&theme=BirHaberLite');
  50. curl_setopt($curl, CURLOPT_TIMEOUT, '50');
  51. curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30');
  52. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  53. curl_setopt($curl, CURLOPT_HEADER, 0);
  54. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
  55. $curlResult = curl_exec($curl);
  56. curl_close($curl);
  57. add_option('birhaber_versiyon', '1.0');
  58. add_action('widgets_init', 'unregister_default_widgets', 11);
  59. require_once ABSPATH . 'wp-admin/includes/upgrade.php';
  60. $sql3 = 'CREATE TABLE `bt_follower` (' . "\n" . '`system_id` int(11) NOT NULL,' . "\n" . '`user_id` int(11) NOT NULL,' . "\n" . '`follow_id` int(11) NOT NULL' . "\n" . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;';
  61. dbDelta($sql3);
  62. dbDelta('ALTER TABLE `bt_follower` ADD PRIMARY KEY (`system_id`);');
  63. dbDelta('ALTER TABLE `bt_follower` MODIFY `system_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;');
  64. $sql = 'CREATE TABLE `bt_contact` (' . "\n" . '`contact_id` int(11) NOT NULL,' . "\n" . '`name` varchar(255) NOT NULL,' . "\n" . '`email` varchar(255) NOT NULL,' . "\n" . '`subject` varchar(255) NOT NULL,' . "\n" . '`message` longtext NOT NULL,' . "\n" . '`time` int(11) NOT NULL,' . "\n" . '`status` int(11) NOT NULL' . "\n" . ') ENGINE=MyISAM DEFAULT CHARSET=utf8;';
  65. dbDelta($sql);
  66. dbDelta('ALTER TABLE `bt_contact` ADD PRIMARY KEY (`contact_id`);');
  67. dbDelta('ALTER TABLE `bt_contact` MODIFY `contact_id` int(11);');
  68. $sql2 = 'CREATE TABLE `bt_live_chat` (' . "\n" . ' `id` int(11) NOT NULL,' . "\n" . ' `page_id` varchar(255) NOT NULL,' . "\n" . ' `name` varchar(255) NOT NULL,' . "\n" . ' `text` mediumtext NOT NULL,' . "\n" . ' `status` int(11) NOT NULL,' . "\n" . ' `time` int(11) NOT NULL' . "\n" . ' ) ENGINE=MyISAM DEFAULT CHARSET=utf8;' . "\n" . ' ALTER TABLE `bt_live_chat`' . "\n" . ' ADD PRIMARY KEY (`id`);' . "\n" . ' ALTER TABLE `bt_live_chat`' . "\n" . ' MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;' . "\n" . ' COMMIT;';
  69. dbDelta($sql2);
  70. dbDelta('CREATE TABLE `bt_like` (' . "\n" . ' `like_id` int(11) NOT NULL,' . "\n" . ' `ip` varchar(255) NOT NULL,' . "\n" . ' `post_id` int(11) NOT NULL,' . "\n" . ' `time` int(11) NOT NULL' . "\n" . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;');
  71. dbDelta('ALTER TABLE `bt_like`' . "\n" . ' ADD PRIMARY KEY (`like_id`);' . "\n" . ' ALTER TABLE `bt_like`' . "\n" . ' MODIFY `like_id` int(11) NOT NULL AUTO_INCREMENT;');
  72. dbDelta('CREATE TABLE `bt_emoji` (' . "\n" . ' `id` int(11) NOT NULL,' . "\n" . ' `ip` varchar(255) NOT NULL,' . "\n" . ' `post_id` int(11) NOT NULL,' . "\n" . ' `emoji` varchar(255) NOT NULL,' . "\n" . ' `time` int(11) NOT NULL' . "\n" . ') ENGINE=InnoDB DEFAULT CHARSET=utf8;');
  73. dbDelta('ALTER TABLE `bt_emoji`' . "\n" . ' ADD PRIMARY KEY (`id`);');
  74. }
  75.  
  76. function lisans()
  77. {
  78. include __DIR__ . '/lisans.php';
  79. $domain = $_SERVER['HTTP_HOST'];
  80. $domain = str_replace('www.', '', $domain);
  81. $random = 'L2sqd2#kc6PC_6SRs#hs3s532';
  82. $h = '' . $random . '_' . $domain . '';
  83. $hash = md5($h);
  84.  
  85. if ($hash == $lisans) {
  86. }
  87. else if ($hash == $lisans2) {
  88. }
  89. else if ($hash == $lisans3) {
  90. }
  91. else if ($hash == $lisans4) {
  92. }
  93. else if ($hash == $lisans5) {
  94. }
  95. else {
  96. if (!empty($_POST[__FUNCTION__])) {
  97. $dt = fopen(__DIR__ . '/lisans.php', 'w+');
  98. fwrite($dt, '<?php $lisans = "' . $_POST[__FUNCTION__] . '";');
  99. fclose($dt);
  100.  
  101. if ($hash == $_POST[__FUNCTION__]) {
  102. echo '<center>Lisansınız onaylandı. Anasayfaya yönlendiriliyorsunuz. <br /><a href="' . home_url('/') . '">Anasayfa gitmek için tıklayın</a></center>' . "\n" . ' <meta http-equiv="refresh" content="3;URL=' . home_url('/') . '">';
  103. }
  104. else {
  105. echo '<center>Hatalı lisans kodu girdiniz. </center>';
  106. }
  107. }
  108.  
  109. echo ' <center>' . "\n" . ' <h4>Lisans Kodu</h4>' . "\n" . ' <form action="';
  110. echo $_SERVER['PHP_SELF'];
  111. echo '" method="post">' . "\n" . ' <input type="text" name="lisans" />' . "\n" . ' <input type="submit" value="Kaydet" />' . "\n" . ' </form>' . "\n" . ' </center>' . "\n" . ' ';
  112. exit();
  113. }
  114. }
  115.  
  116. function _is_curl_installed()
  117. {
  118. if (in_array('curl', get_loaded_extensions())) {
  119. return true;
  120. }
  121. else {
  122. return false;
  123. echo 'Temanın çalışması için cURL kütüphanenizin aktif olması gerekiyor. cURL kütüphanesini aktif etmek için lütfen sunucu ile iletişime geçin';
  124. }
  125. }
  126.  
  127. function quailtyFunc()
  128. {
  129. global $bp_options;
  130. $bp_options['jpegQuality'] = (int) $bp_options['jpegQuality'];
  131. return $bp_options;
  132. }
  133.  
  134. function prefix_wcount()
  135. {
  136. ob_start();
  137. the_content();
  138. $content = ob_get_clean();
  139. return sizeof(explode(' ', $content));
  140. }
  141.  
  142. function bb_ust_menu_register()
  143. {
  144. register_nav_menus(['bbUstMenu' => __('Üst Menu', 'theme_prefix')]);
  145. register_nav_menus(['bbMobilMenu' => __('Mobil Menu', 'theme_prefix')]);
  146. register_nav_menus(['bbFooter1' => __('Footer Menü 1', 'theme_prefix'), 'bbFooter2' => __('Footer Menü 2', 'theme_prefix'), 'bbFooter3' => __('Footer Menü 3', 'theme_prefix'), 'bbFooter4' => __('Footer Menü 4', 'theme_prefix'), 'bbFooter5' => __('Footer Menü 5', 'theme_prefix')]);
  147. register_nav_menus(['bbHamburger1' => __('Hamburger Menü 1', 'theme_prefix'), 'bbHamburger2' => __('Hamburger Menü 2', 'theme_prefix'), 'bbHamburger3' => __('Hamburger Menü 3', 'theme_prefix'), 'bbHamburger4' => __('Hamburger Menü 4', 'theme_prefix'), 'bbHamburger5' => __('Hamburger Menü 5', 'theme_prefix')]);
  148. }
  149.  
  150. function li_menu_class_func($classes, $item, $args, $depth)
  151. {
  152. global $bp_options;
  153. $classes[] = 'swiper-slide';
  154. return $classes;
  155. }
  156.  
  157. function get_category_options($type = 'normal')
  158. {
  159. $categories = get_categories(['orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false]);
  160. global $bp_options;
  161.  
  162. if ($type == 'gallery') {
  163. foreach ($bp_options['kategoriAyarlar'] as $category2) {
  164. if ($category2['fotoGaleriSwitch'] == 1) {
  165. $category_data[$category2['kategoriId']] = get_cat_name($category2['kategoriId']);
  166. }
  167. }
  168. }
  169. else {
  170. foreach ($categories as $category) {
  171. $category_data[$category->term_id] = $category->name;
  172. }
  173. }
  174.  
  175. return $category_data;
  176. }
  177.  
  178. function month_eng_to_tr($str)
  179. {
  180. $ing_aylar = ['January', 'February', 'March', 'May', 'April', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  181. $tr_aylar = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'];
  182. return str_replace($ing_aylar, $tr_aylar, $str);
  183. }
  184.  
  185. function month_perma_to_text($str)
  186. {
  187. $ing_aylar = ['January', 'February', 'March', 'May', 'April', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  188. $tr_aylar = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'];
  189. return str_replace($ing_aylar, $tr_aylar, $str);
  190. }
  191.  
  192. function getPostViews($postID)
  193. {
  194. $count_key = 'post_views_count';
  195. $count = get_post_meta($postID, $count_key, true);
  196.  
  197. if ($count == '') {
  198. delete_post_meta($postID, $count_key);
  199. add_post_meta($postID, $count_key, '0');
  200. return '0';
  201. }
  202.  
  203. return $count;
  204. }
  205.  
  206. function setPostViews($postID)
  207. {
  208. $count_key = 'post_views_count';
  209. $count = get_post_meta($postID, $count_key, true);
  210.  
  211. if ($count == '') {
  212. $count = 0;
  213. delete_post_meta($postID, $count_key);
  214. add_post_meta($postID, $count_key, '0');
  215. }
  216. else {
  217. $count++;
  218. update_post_meta($postID, $count_key, $count);
  219. }
  220. }
  221.  
  222. function kategori_listele($post_id)
  223. {
  224. $category_ids = wp_get_post_categories($post_id);
  225. $kategori_list = [];
  226.  
  227. foreach ($category_ids as $key => $val) {
  228. $category_parent = get_category($category_ids[$key])->category_parent;
  229. if (($category_parent != 0) && !$kategori_list[0]) {
  230. $kategori_list[0] = $val;
  231. }
  232.  
  233. if ($kategori_list[0]) {
  234. $category_parent = get_category($kategori_list[0])->category_parent;
  235. $kategori_list[1] = $category_parent;
  236. }
  237. }
  238. if ((count($category_ids) == 1) || empty($kategori_list[1])) {
  239. $kategori_list[1] = $category_ids[0];
  240. }
  241.  
  242. return $kategori_list;
  243. }
  244.  
  245. function sinyor_comment($comment, $args, $depth)
  246. {
  247. $GLOBALS['comment'] = $comment;
  248. $PostAuthor = false;
  249.  
  250. if ($comment->comment_author_email == get_the_author_email()) {
  251. $PostAuthor = true;
  252. }
  253. else if ($comment->comment_author_email == '') {
  254. $PostAuthor = true;
  255. }
  256.  
  257. if ($comment->user_id == '0') {
  258. if (!empty($comment->comment_author_url)) {
  259. $url = $comment->comment_author_url;
  260. }
  261. else {
  262. $url = '#respond';
  263. }
  264. }
  265. else {
  266. $url = get_author_posts_url($comment->user_id);
  267. }
  268.  
  269. echo '<li class="';
  270.  
  271. if ($PostAuthor) {
  272. echo 'authorcomment';
  273. .........................................................................
  274. .......................................
  275. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement