Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP8 Decoder for ionCube Encoder)
- *
- * @ Version : 8.1.0.9
- * @ Author : DeZender
- * @ Release on : 27.10.2023
- * @ Official site : http://DeZender.Net
- *
- */
- class WPSAF
- {
- private $delimeter_wp_safelink = 'wApbsCadfEeFlgiHnik';
- public function __construct()
- {
- add_action('admin_menu', [$this, 'wp_safelink_menu']);
- add_filter('home_template', [$this, 'ch_register_page_template'], 999);
- add_filter('page_template', [$this, 'ch_register_page_template'], 999);
- add_filter('single_template', [$this, 'ch_register_page_template'], 999);
- add_shortcode('wpsafelink', [$this, 'wpsafcode']);
- add_action('init', [$this, 'custom_rewrite']);
- add_action('in_admin_footer', [$this, 'foot_admin'], 999);
- add_action('template_redirect', [$this, 'doRewrite']);
- }
- public function custom_rewrite()
- {
- $wpsaf = json_decode(get_option('wpsaf_options'));
- if ($wpsaf->permalink == 1) {
- add_rewrite_rule('^' . $wpsaf->permalink1 . '/(.*)?', 'index.php', 'top');
- flush_rewrite_rules();
- remove_filter('template_redirect', 'redirect_canonical');
- }
- }
- public function wpsafcode($link)
- {
- $wpsaf = json_decode(get_option('wpsaf_options'));
- $link = array_map('trim', $link);
- $link = implode('', $link);
- if ($link[0] == '=') {
- $link = substr($link, 1, 999);
- }
- if ($wpsaf->permalink == 1) {
- $linkout = home_url() . '/' . $wpsaf->permalink1 . '/' . base64_encode($link);
- }
- else if ($wpsaf->permalink == 2) {
- $linkout = home_url() . '/?' . $wpsaf->permalink2 . '=' . base64_encode($link);
- }
- else {
- $linkout = home_url() . '/?' . base64_encode($link);
- }
- return $linkout;
- }
- public function wp_safelink_menu()
- {
- add_menu_page('WP Safelink', 'WP Safelink', 'manage_options', 'wp-safelink', [$this, 'wp_safelink_options'], '', '25');
- }
- public function ch_register_page_template($page_template)
- {
- global $wpdb;
- $wpsaf = json_decode(get_option('wpsaf_options'));
- $urls = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
- .....................................................................
- ........................................
- ..................
Add Comment
Please, Sign In to add comment