Edit File by line
/home/barbar84/www/wp-conte.../plugins/ijrnucl/includes
File: class-protect-uploads.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class Alti_ProtectUploads
[2] Fix | Delete
{
[3] Fix | Delete
[4] Fix | Delete
protected $version;
[5] Fix | Delete
protected $plugin_name;
[6] Fix | Delete
protected $loader;
[7] Fix | Delete
[8] Fix | Delete
public function __construct()
[9] Fix | Delete
{
[10] Fix | Delete
$this->version = '0.3';
[11] Fix | Delete
$this->plugin_name = 'protect-uploads';
[12] Fix | Delete
$this->load_dependencies();
[13] Fix | Delete
$this->set_locale();
[14] Fix | Delete
$this->define_admin_hooks();
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
private function load_dependencies()
[18] Fix | Delete
{
[19] Fix | Delete
[20] Fix | Delete
require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-protect-uploads-loader.php';
[21] Fix | Delete
require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-protect-uploads-i18n.php';
[22] Fix | Delete
require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-protect-uploads-admin.php';
[23] Fix | Delete
[24] Fix | Delete
$this->loader = new Alti_ProtectUploads_Loader();
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* set locale for translation ends.
[29] Fix | Delete
*/
[30] Fix | Delete
private function set_locale()
[31] Fix | Delete
{
[32] Fix | Delete
[33] Fix | Delete
$plugin_i18n = new Alti_ProtectUploads_i18n();
[34] Fix | Delete
$plugin_i18n->set_domain($this->get_plugin_name());
[35] Fix | Delete
[36] Fix | Delete
$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* action and filter for admin side
[41] Fix | Delete
*/
[42] Fix | Delete
private function define_admin_hooks()
[43] Fix | Delete
{
[44] Fix | Delete
[45] Fix | Delete
$plugin_admin = new Alti_ProtectUploads_Admin($this->get_plugin_name(), $this->get_version());
[46] Fix | Delete
[47] Fix | Delete
$this->loader->add_action('admin_menu', $plugin_admin, 'add_submenu_page');
[48] Fix | Delete
$this->loader->add_filter('plugin_action_links_' . $this->get_plugin_name() . '/' . $this->get_plugin_name() . '.php', $plugin_admin, 'add_settings_link');
[49] Fix | Delete
$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
public function run()
[53] Fix | Delete
{
[54] Fix | Delete
$this->loader->run();
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
public function get_plugin_name()
[58] Fix | Delete
{
[59] Fix | Delete
return $this->plugin_name;
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
public function get_loader()
[63] Fix | Delete
{
[64] Fix | Delete
return $this->loader;
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
public function get_version()
[68] Fix | Delete
{
[69] Fix | Delete
return $this->version;
[70] Fix | Delete
}
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function