Advertisement
Guest User

Untitled

a guest
Nov 20th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.20 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 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=BirHaber');
  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 = 'Bsqe2#fc_D6SRz#os3532';
  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 ($_POST) {
  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. $classes[] = 'swiper-slide';
  153. return $classes;
  154. }
  155.  
  156. function get_category_options($type = 'normal')
  157. {
  158. $categories = get_categories(['orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false]);
  159. global $bp_options;
  160.  
  161. if ($type == 'gallery') {
  162. foreach ($bp_options['kategoriAyarlar'] as $category2) {
  163. if ($category2['fotoGaleriSwitch'] == 1) {
  164. $category_data[$category2['kategoriId']] = get_cat_name($category2['kategoriId']);
  165. }
  166. }
  167. }
  168. else {
  169. foreach ($categories as $category) {
  170. $category_data[$category->term_id] = $category->name;
  171. }
  172. }
  173.  
  174. return $category_data;
  175. }
  176.  
  177. function month_eng_to_tr($str)
  178. {
  179. $ing_aylar = ['January', 'February', 'March', 'May', 'April', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  180. $tr_aylar = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'];
  181. return str_replace($ing_aylar, $tr_aylar, $str);
  182. }
  183.  
  184. function month_perma_to_text($str)
  185. {
  186. $ing_aylar = ['January', 'February', 'March', 'May', 'April', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  187. $tr_aylar = ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'];
  188. return str_replace($ing_aylar, $tr_aylar, $str);
  189. }
  190.  
  191. function getPostViews($postID)
  192. {
  193. $count_key = 'post_views_count';
  194. $count = get_post_meta($postID, $count_key, true);
  195.  
  196. if ($count == '') {
  197. delete_post_meta($postID, $count_key);
  198. add_post_meta($postID, $count_key, '0');
  199. return '0';
  200. }
  201.  
  202. return $count;
  203. }
  204.  
  205. function setPostViews($postID)
  206. {
  207. $count_key = 'post_views_count';
  208. $count = get_post_meta($postID, $count_key, true);
  209.  
  210. if ($count == '') {
  211. $count = 0;
  212. delete_post_meta($postID, $count_key);
  213. add_post_meta($postID, $count_key, '0');
  214. }
  215. else {
  216. $count++;
  217. update_post_meta($postID, $count_key, $count);
  218. }
  219. }
  220.  
  221. function kategori_listele($post_id)
  222. {
  223. $category_ids = wp_get_post_categories($post_id);
  224. $kategori_list = [];
  225.  
  226. foreach ($category_ids as $key => $val) {
  227. $category_parent = get_category($category_ids[$key])->category_parent;
  228. if (($category_parent != 0) && !$kategori_list[0]) {
  229. $kategori_list[0] = $val;
  230. }
  231.  
  232. if ($kategori_list[0]) {
  233. $category_parent = get_category($kategori_list[0])->category_parent;
  234. $kategori_list[1] = $category_parent;
  235. }
  236. }
  237. if ((count($category_ids) == 1) || empty($kategori_list[1])) {
  238. $kategori_list[1] = $category_ids[0];
  239. }
  240.  
  241. return $kategori_list;
  242. }
  243.  
  244. function sinyor_comment($comment, $args, $depth)
  245. {
  246. $GLOBALS['comment'] = $comment;
  247. $PostAuthor = false;
  248.  
  249. if ($comment->comment_author_email == get_the_author_email()) {
  250. $PostAuthor = true;
  251. }
  252. else if ($comment->comment_author_email == '') {
  253. $PostAuthor = true;
  254. }
  255.  
  256. if ($comment->user_id == '0') {
  257. if (!empty($comment->comment_author_url)) {
  258. $url = $comment->comment_author_url;
  259. }
  260. else {
  261. $url = '#respond';
  262. }
  263. }
  264. else {
  265. $url = get_author_posts_url($comment->user_id);
  266. }
  267.  
  268. echo '<li class="';
  269.  
  270. if ($PostAuthor) {
  271. echo 'authorcomment';
  272. }
  273.  
  274. if (!empty($comment->comment_parent)) {
  275. echo ' reply';
  276. ........................................................................
  277. ..............................................
  278. .........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement