| 1 |
<?php |
| 2 |
// Direct calls to this file are Forbidden when wp core files are not present |
| 3 |
if ( ! current_user_can('manage_options') ){ |
| 4 |
header('Status: 403 Forbidden'); |
| 5 |
header('HTTP/1.1 403 Forbidden'); |
| 6 |
exit(); |
| 7 |
} |
| 8 |
|
| 9 |
/* |
| 10 |
// BPS Class - not doing anything with this Class in BPS Free |
| 11 |
if ( !class_exists('Bulletproof_Security') ) { |
| 12 |
|
| 13 |
if ( !defined('BULLETPROOF_VERSION' ) ) |
| 14 |
define( 'BULLETPROOF_VERSION', '.48.8' ); |
| 15 |
|
| 16 |
class Bulletproof_Security { |
| 17 |
|
| 18 |
public function __construct() { |
| 19 |
add_action('init', array($this, 'load_plugin_textdomain')); |
| 20 |
} |
| 21 |
|
| 22 |
public function load_plugin_textdomain() { |
| 23 |
load_plugin_textdomain('bulletproof-security', FALSE, dirname(plugin_basename(__FILE__)).'/languages/'); |
| 24 |
} |
| 25 |
|
| 26 |
public function bulletproof_save_options() { |
| 27 |
return update_option('bulletproof_security', $this->options); |
| 28 |
} |
| 29 |
|
| 30 |
public function bulletproof_set_error($code = '', $error = '', $data = '') { |
| 31 |
if ( empty($code) ) |
| 32 |
$this->errors = new WP_Error(); |
| 33 |
elseif ( is_a($code, 'WP_Error') ) |
| 34 |
$this->errors = $code; |
| 35 |
elseif ( is_a($this->errors, 'WP_Error') ) |
| 36 |
$this->errors->add($code, $error, $data); |
| 37 |
else |
| 38 |
$this->errors = new WP_Error($code, $error, $data); |
| 39 |
} |
| 40 |
|
| 41 |
public function bulletproof_get_error($code = '') { |
| 42 |
if ( is_a($this->errors, 'WP_Error') ) |
| 43 |
return $this->errors->get_error_message($code); |
| 44 |
return false; |
| 45 |
} |
| 46 |
} |
| 47 |
}//end if |
| 48 |
*/ |
| 49 |
?> |