Advertisement
Guest User

Untitled

a guest
Jan 11th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.31 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.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (get_option('photonx') == '1') {
  15. add_filter('wp_get_attachment_url', 'parallelize_hostnames', 10, 2);
  16. }
  17.  
  18. if (get_option('removeslug') == '1') {
  19. add_filter('post_type_link', 'rmslug', 10, 3);
  20. add_action('pre_get_posts', 'parse_request');
  21. }
  22.  
  23. if (!function_exists('dev_breadcrumbs_chapter')) {
  24. function dev_breadcrumbs_chapter($id)
  25. {
  26. echo " <div id=\"breadcrumbs\">\r\n <ol itemscope itemtype=\"http://schema.org/BreadcrumbList\">\r\n\r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  27. bloginfo('url');
  28. echo "\">\r\n <span itemprop=\"name\">Home</span></a>\r\n <meta itemprop=\"position\" content=\"1\" />\r\n </li>\r\n › \r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  29. bloginfo('url');
  30. echo "/manga\">\r\n <span itemprop=\"name\">Manga</span></a>\r\n <meta itemprop=\"position\" content=\"2\" />\r\n </li>\r\n\r\n ›\r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  31. $meta = get_post_meta($id, 'dev_seri', true);
  32. echo get_the_permalink($meta);
  33. echo "\">\r\n <span itemprop=\"name\">";
  34. $meta = get_post_meta($id, 'dev_seri', true);
  35. echo get_the_title($meta);
  36. echo "</span></a>\r\n <meta itemprop=\"position\" content=\"3\" />\r\n </li>\r\n\r\n ›\r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  37. the_permalink();
  38. echo "\">\r\n <span itemprop=\"name\">";
  39. the_title();
  40. echo "</span></a>\r\n <meta itemprop=\"position\" content=\"4\" />\r\n</li>\r\n</ol>\r\n</div>\r\n";
  41. }
  42. }
  43.  
  44. if (!function_exists('dev_breadcrumbs_manga')) {
  45. function dev_breadcrumbs_manga($id)
  46. {
  47. echo " <div id=\"breadcrumbs\">\r\n <ol itemscope itemtype=\"http://schema.org/BreadcrumbList\">\r\n\r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  48. bloginfo('url');
  49. echo "\">\r\n <span itemprop=\"name\">Home</span></a>\r\n <meta itemprop=\"position\" content=\"1\" />\r\n </li>\r\n › \r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  50. bloginfo('url');
  51. echo "/manga\">\r\n <span itemprop=\"name\">Manga</span></a>\r\n <meta itemprop=\"position\" content=\"2\" />\r\n </li>\r\n\r\n ›\r\n <li itemprop=\"itemListElement\" itemscope\r\n itemtype=\"https://schema.org/ListItem\">\r\n <a itemtype=\"https://schema.org/Thing\"\r\n itemprop=\"item\" href=\"";
  52. the_permalink();
  53. echo "\">\r\n <span itemprop=\"name\">";
  54. the_title();
  55. echo "</span></a>\r\n <meta itemprop=\"position\" content=\"3\" />\r\n </li>\r\n</ol>\r\n</div>\r\n";
  56. }
  57. }
  58.  
  59. add_action('add_meta_boxes', 'serieslist_register_meta_box');
  60. add_action('save_post', 'chapter_save_post');
  61. add_shortcode('az', 'az_sc');
  62. add_shortcode('manga_genre', 'manga_genre');
  63. add_shortcode('manga_status', 'manga_status');
  64. add_shortcode('manga_type', 'manga_type');
  65. $updater = new EDD_Theme_Updater_Admin($config = array('remote_api_url' => 'https://developersidn.com', 'item_name' => 'Devreader', 'theme_slug' => 'devreader', 'version' => DEV_VERSION, 'author' => 'DevelopersID', 'download_id' => '', 'renew_url' => ''), $strings = array('theme-license' => __('Theme License', 'edd-theme-updater'), 'enter-key' => __('Enter your theme license key.', 'edd-theme-updater'), 'license-key' => __('License Key', 'edd-theme-updater'), 'license-action' => __('License Action', 'edd-theme-updater'), 'deactivate-license' => __('Deactivate License', 'edd-theme-updater'), 'activate-license' => __('Activate License', 'edd-theme-updater'), 'status-unknown' => __('License status is unknown.', 'edd-theme-updater'), 'renew' => __('Renew?', 'edd-theme-updater'), 'unlimited' => __('unlimited', 'edd-theme-updater'), 'license-key-is-active' => __('License key is active.', 'edd-theme-updater'), 'expires%s' => __('Expires %s.', 'edd-theme-updater'), '%1$s/%2$-sites' => __('You have %1$s / %2$s sites activated.', 'edd-theme-updater'), 'license-key-expired-%s' => __('License key expired %s.', 'edd-theme-updater'), 'license-key-expired' => __('License key has expired.', 'edd-theme-updater'), 'license-keys-do-not-match' => __('License keys do not match.', 'edd-theme-updater'), 'license-is-inactive' => __('License is inactive.', 'edd-theme-updater'), 'license-key-is-disabled' => __('License key is disabled.', 'edd-theme-updater'), 'site-is-inactive' => __('Site is inactive.', 'edd-theme-updater'), 'license-status-unknown' => __('License status is unknown.', 'edd-theme-updater'), 'update-notice' => __("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'edd-theme-updater'), 'update-available' => __("<strong>%1\$s %2\$s</strong> is available. <a href=\"%3\$s\" class=\"thickbox\" title=\"%4s\">Check out what's new</a> or <a href=\"%5\$s\"%6\$s>update now</a>.", 'edd-theme-updater')));
  66. new DevNotices();
  67.  
  68. class EDD_Theme_Updater_Admin
  69. {
  70. /**
  71. * Variables required for the theme updater
  72. *
  73. * @since 1.0.0
  74. * @type string
  75. */
  76. protected $remote_api_url = null;
  77. protected $theme_slug = null;
  78. protected $version = null;
  79. protected $author = null;
  80. protected $download_id = null;
  81. protected $renew_url = null;
  82. protected $strings = null;
  83.  
  84. /**
  85. * Initialize the class.
  86. *
  87. * @since 1.0.0
  88. */
  89. public function __construct($config = array(), $strings = array())
  90. {
  91. $config = wp_parse_args($config, array('remote_api_url' => 'https://developersidn.com', 'theme_slug' => get_template(), 'item_name' => '', 'license' => '', 'version' => '', 'author' => '', 'download_id' => '', 'renew_url' => ''));
  92. $this->remote_api_url = $config['remote_api_url'];
  93. $this->item_name = $config['item_name'];
  94. $this->theme_slug = sanitize_key($config['theme_slug']);
  95. $this->version = $config['version'];
  96. $this->author = $config['author'];
  97. $this->download_id = $config['download_id'];
  98. $this->renew_url = $config['renew_url'];
  99.  
  100. if ('' == $config['version']) {
  101. $theme = wp_get_theme($this->theme_slug);
  102. $this->version = $theme->get('Version');
  103. }
  104.  
  105. $this->strings = $strings;
  106. add_action('admin_init', array($this, 'updater'));
  107. add_action('admin_init', array($this, 'register_option'));
  108. add_action('admin_init', array($this, 'license_action'));
  109. add_action('admin_menu', array($this, 'license_menu'));
  110. add_action('update_option_' . $this->theme_slug . '_license_key', array($this, 'activate_license'), 10, 2);
  111. add_filter('http_request_args', array($this, 'disable_wporg_request'), 5, 2);
  112. }
  113.  
  114. public function updater()
  115. {
  116. if (get_option($this->theme_slug . '_license_key_status', false) != 'valid') {
  117. return null;
  118. }
  119.  
  120. new EDD_Theme_Updater(array('remote_api_url' => $this->remote_api_url, 'version' => $this->version, 'license' => trim(get_option($this->theme_slug . '_license_key')), 'item_name' => $this->item_name, 'author' => $this->author), $this->strings);
  121. }
  122.  
  123. /**
  124. * Adds a menu item for the theme license under the appearance menu.
  125. *
  126. * since 1.0.0
  127. */
  128. public function license_menu()
  129. {
  130. $strings = $this->strings;
  131. add_theme_page($strings['theme-license'], $strings['theme-license'], 'manage_options', $this->theme_slug . '-license', array($this, 'license_page'));
  132. }
  133.  
  134. /**
  135. * Outputs the markup used on the theme license page.
  136. *
  137. * since 1.0.0
  138. */
  139. public function license_page()
  140. {
  141. $strings = $this->strings;
  142. $license = trim(get_option($this->theme_slug . '_license_key'));
  143. $status = get_option($this->theme_slug . '_license_key_status', false);
  144.  
  145. if (!$license) {
  146. $message = $strings['enter-key'];
  147. } else {
  148. if (!get_transient($this->theme_slug . '_license_message', false)) {
  149. set_transient($this->theme_slug . '_license_message', $this->check_license(), 60 * 60 * 24);
  150. }
  151.  
  152. $message = get_transient($this->theme_slug . '_license_message');
  153. }
  154.  
  155. echo " <div class=\"wrap\">\r\n <h2>";
  156. echo $strings['theme-license'];
  157. echo "</h2>\r\n <form method=\"post\" action=\"options.php\">\r\n\r\n ";
  158. settings_fields($this->theme_slug . '-license');
  159. echo "\r\n <table class=\"form-table\">\r\n <tbody>\r\n\r\n <tr valign=\"top\">\r\n <th scope=\"row\" valign=\"top\">\r\n ";
  160. echo $strings['license-key'];
  161. echo " </th>\r\n <td>\r\n <input id=\"";
  162. echo $this->theme_slug;
  163. echo '_license_key" name="';
  164. echo $this->theme_slug;
  165. echo '_license_key" type="text" class="regular-text" value="';
  166. echo esc_attr($license);
  167. echo "\" />\r\n <p class=\"description\">\r\n ";
  168. echo $message;
  169. echo " </p>\r\n </td>\r\n </tr>\r\n\r\n ";
  170.  
  171. if ($license) {
  172. echo " <tr valign=\"top\">\r\n <th scope=\"row\" valign=\"top\">\r\n ";
  173. echo $strings['license-action'];
  174. echo " </th>\r\n <td>\r\n ";
  175. wp_nonce_field($this->theme_slug . '_nonce', $this->theme_slug . '_nonce');
  176.  
  177. if ('valid' == $status) {
  178. echo ' <input type="submit" class="button-secondary" name="';
  179. echo $this->theme_slug;
  180. echo '_license_deactivate" value="';
  181. esc_attr_e($strings['deactivate-license']);
  182. ..........................................................................
  183. .............................................
  184. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement