Advertisement
Guest User

Untitled

a guest
Oct 8th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 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.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Profit_Redirect
  15. {
  16. /**
  17. * The loader that's responsible for maintaining and registering all hooks that power
  18. * the plugin.
  19. *
  20. * @since 1.0.0
  21. * @access protected
  22. * @var Profit_Redirect_Loader $loader Maintains and registers all hooks for the plugin.
  23. */
  24. protected $loader;
  25. /**
  26. * The unique identifier of this plugin.
  27. *
  28. * @since 1.0.0
  29. * @access protected
  30. * @var string $plugin_name The string used to uniquely identify this plugin.
  31. */
  32. protected $plugin_name;
  33. /**
  34. * The current version of the plugin.
  35. *
  36. * @since 1.0.0
  37. * @access protected
  38. * @var string $version The current version of the plugin.
  39. */
  40. protected $version;
  41. /**
  42. * Define the core functionality of the plugin.
  43. *
  44. * Set the plugin name and the plugin version that can be used throughout the plugin.
  45. * Load the dependencies, define the locale, and set the hooks for the admin area and
  46. * the public-facing side of the site.
  47. *
  48. * @since 1.0.0
  49. */
  50. protected $languages;
  51.  
  52. public function __construct()
  53. {
  54. $this->plugin_name = 'profit-redirect';
  55. $this->version = '3.9.7';
  56. $this->load_dependencies();
  57. $this->set_locale();
  58. $this->define_admin_hooks();
  59. $this->define_public_hooks();
  60. }
  61.  
  62. /**
  63. * Load the required dependencies for this plugin.
  64. *
  65. * Include the following files that make up the plugin:
  66. *
  67. * - Profit_Redirect_Loader. Orchestrates the hooks of the plugin.
  68. * - Profit_Redirect_i18n. Defines internationalization functionality.
  69. * - Profit_Redirect_Admin. Defines all hooks for the admin area.
  70. * - Profit_Redirect_Public. Defines all hooks for the public side of the site.
  71. *
  72. * Create an instance of the loader which will be used to register the hooks
  73. * with WordPress.
  74. *
  75. * @since 1.0.0
  76. * @access private
  77. */
  78. private function load_dependencies()
  79. {
  80. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/vendor/autoload.php';
  81. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-loader.php';
  82. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-i18n.php';
  83. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-update-definition.php';
  84. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/list-table-campaign-redirect.php';
  85. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/utils.php';
  86. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/meta-box/meta-box.php';
  87. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/UserAgentParser.php';
  88. require_once plugin_dir_path(dirname(__FILE__)) . 'includes/Mobile_Detect.php';
  89. require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-admin.php';
  90. require_once plugin_dir_path(dirname(__FILE__)) . 'public/class-public.php';
  91. $this->loader = new Loader();
  92. }
  93.  
  94. /**
  95. * Define the locale for this plugin for internationalization.
  96. *
  97. * Uses the Profit_Redirect_i18n class in order to set the domain and to register the hook
  98. * with WordPress.
  99. *
  100. * @since 1.0.0
  101. * @access private
  102. */
  103. private function set_locale()
  104. {
  105. $plugin_i18n = new i18n();
  106. $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
  107. }
  108.  
  109. /**
  110. * Register all of the hooks related to the admin area functionality
  111. * of the plugin.
  112. *
  113. * @since 1.0.0
  114. * @access private
  115. */
  116. private function define_admin_hooks()
  117. {
  118. global $post;
  119. $plugin_admin = new Profit_Redirect_Admin($this->get_plugin_name(), $this->get_version());
  120. $this->loader->add_action('admin_init', $plugin_admin, 'buffer_start');
  121. $this->loader->add_action('activated_plugin', $plugin_admin, 'detect_plugin_activation', 10, 2);
  122. ......................................................................................
  123. .............................................
  124. ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement