本文整理汇总了PHP中ITSEC_Lib::get_module_path方法的典型用法代码示例。如果您正苦于以下问题:PHP ITSEC_Lib::get_module_path方法的具体用法?PHP ITSEC_Lib::get_module_path怎么用?PHP ITSEC_Lib::get_module_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITSEC_Lib
的用法示例。
在下文中一共展示了ITSEC_Lib::get_module_path方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct() {
global $itsec_globals;
//make sure the log file info is there or generate it. This should only affect beta users.
if ( ! isset( $itsec_globals['settings']['log_info'] ) ) {
$itsec_globals['settings']['log_info'] = substr( sanitize_title( get_bloginfo( 'name' ) ), 0, 20 ) . '-' . ITSEC_Lib::get_random( mt_rand( 0, 10 ) );
update_site_option( 'itsec_global', $itsec_globals['settings'] );
}
//Make sure the logs directory was created
if ( ! is_dir( $itsec_globals['ithemes_log_dir'] ) ) {
@mkdir( trailingslashit( $itsec_globals['ithemes_dir'] ) . 'logs' );
}
//don't create a log file if we don't need it.
if ( isset( $itsec_globals['settings']['log_type'] ) && $itsec_globals['settings']['log_type'] !== 0 ) {
$this->log_file = $itsec_globals['ithemes_log_dir'] . '/event-log-' . $itsec_globals['settings']['log_info'] . '.log';
$this->start_log(); //create a log file if we don't have one
}
$this->logger_modules = array(); //array to hold information on modules using this feature
$this->logger_displays = array(); //array to hold metabox information
$this->module_path = ITSEC_Lib::get_module_path( __FILE__ );
add_action( 'plugins_loaded', array( $this, 'register_modules' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_script' ) ); //enqueue scripts for admin page
//Run database cleanup daily with cron
if ( ! wp_next_scheduled( 'itsec_purge_logs' ) ) {
wp_schedule_event( time(), 'daily', 'itsec_purge_logs' );
}
add_action( 'itsec_purge_logs', array( $this, 'purge_logs' ) );
if ( is_admin() ) {
require( trailingslashit( $itsec_globals['plugin_dir'] ) . 'core/lib/class-itsec-wp-list-table.php' ); //used for generating log tables
add_action( 'itsec_add_admin_meta_boxes', array( $this, 'add_admin_meta_boxes' ) ); //add log meta boxes
}
if ( isset( $_POST['itsec_clear_logs'] ) && $_POST['itsec_clear_logs'] === 'clear_logs' ) {
global $itsec_clear_all_logs;
$itsec_clear_all_logs = true;
add_action( 'plugins_loaded', array( $this, 'purge_logs' ) );
}
}
示例2: __construct
function __construct()
{
global $itsec_globals;
$this->logger_modules = array();
//array to hold information on modules using this feature
$this->logger_displays = array();
//array to hold metabox information
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('plugins_loaded', array($this, 'register_modules'));
add_action('plugins_loaded', array($this, 'write_pending_events_to_file'));
add_action('admin_enqueue_scripts', array($this, 'admin_script'));
//enqueue scripts for admin page
//Run database cleanup daily with cron
if (!wp_next_scheduled('itsec_purge_logs')) {
wp_schedule_event(time(), 'daily', 'itsec_purge_logs');
}
add_action('itsec_purge_logs', array($this, 'purge_logs'));
if (is_admin()) {
require trailingslashit($itsec_globals['plugin_dir']) . 'core/lib/class-itsec-wp-list-table.php';
//used for generating log tables
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
//add log meta boxes
}
if (isset($_POST['itsec_clear_logs']) && $_POST['itsec_clear_logs'] === 'clear_logs') {
global $itsec_clear_all_logs;
$itsec_clear_all_logs = true;
add_action('plugins_loaded', array($this, 'purge_logs'));
}
}
示例3: login_enqueue_scripts
/**
* Add appropriate scripts to login page
*
* @since 1.13
*
* @return void
*/
public function login_enqueue_scripts()
{
global $itsec_globals;
$module_path = ITSEC_Lib::get_module_path(__FILE__);
wp_register_style('itsec-recaptcha', $module_path . 'css/itsec-recaptcha.css', array(), $itsec_globals['plugin_build']);
wp_enqueue_style('itsec-recaptcha');
}
示例4: run
function run($core)
{
$this->core = $core;
$this->settings = get_site_option('itsec_malware');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'initialize_admin'));
//initialize admin area
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
//enqueue scripts for admin page
add_action('wp_ajax_itsec_malware_request_url_scan_ajax', array($this, 'wp_ajax_itsec_malware_request_url_scan_ajax'));
//Execute manual homepage scan request
add_action('wp_ajax_itsec_malware_get_scan_results_ajax', array($this, 'wp_ajax_itsec_malware_get_scan_results_ajax'));
//Execute manual homepage scan report
add_filter('itsec_add_dashboard_status', array($this, 'dashboard_status'));
//add information for plugin status
add_filter('itsec_tracking_vars', array($this, 'tracking_vars'));
add_filter('itsec_logger_displays', array($this, 'itsec_logger_displays'));
//adds logs metaboxes
//manually save options on multisite
if (is_multisite()) {
add_action('itsec_admin_init', array($this, 'save_network_options'));
//save multisite options
}
}
示例5: run
/**
* Setup the module's administrative functionality
*
* Loads the file change detection module's privileged functionality including
* settings fields.
*
* @since 4.0.0
*
* @param ITSEC_Core $core The core plugin instance
*
* @return void
*/
public function run($core)
{
$this->core = $core;
$this->settings = get_site_option('itsec_file_change');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
//enqueue scripts for admin page
add_action('itsec_add_admin_meta_boxes', array($this, 'itsec_add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'itsec_admin_init'));
//initialize admin area
add_action('wp_ajax_itsec_file_change_ajax', array($this, 'wp_ajax_itsec_file_change_ajax'));
add_action('wp_ajax_itsec_file_change_warning_ajax', array($this, 'wp_ajax_itsec_file_change_warning_ajax'));
add_action('wp_ajax_itsec_jquery_filetree_ajax', array($this, 'wp_ajax_itsec_jquery_filetree_ajax'));
add_filter('itsec_add_dashboard_status', array($this, 'itsec_add_dashboard_status'));
//add information for plugin status
add_filter('itsec_logger_displays', array($this, 'itsec_logger_displays'));
//adds logs metaboxes
add_filter('itsec_tracking_vars', array($this, 'itsec_tracking_vars'));
//manually save options on multisite
if (is_multisite()) {
add_action('itsec_admin_init', array($this, 'itsec_admin_init_multisite'));
//save multisite options
}
}
示例6: run
/**
* Setup the module's administrative functionality
*
* Loads the database backup module's privileged functionality including
* settings fields.
*
* @since 4.0.0
*
* @param ITSEC_Core $core The core plugin instance
*
* @return void
*/
function run($core)
{
$this->core = $core;
$this->settings = get_site_option('itsec_backup');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
//enqueue scripts for admin page
add_action('itsec_add_admin_meta_boxes', array($this, 'itsec_add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'itsec_admin_init'));
//initialize admin area
add_filter('itsec_add_dashboard_status', array($this, 'itsec_add_dashboard_status'));
//add information for plugin status
add_filter('itsec_tooltip_modules', array($this, 'itsec_tooltip_modules'));
//register tooltip action
add_filter('itsec_tracking_vars', array($this, 'itsec_tracking_vars'));
if (isset($_POST['itsec_backup']) && $_POST['itsec_backup'] == 'one_time_backup') {
add_action('itsec_admin_init', array($this, 'one_time_backup'));
}
//manually save options on multisite
if (is_multisite()) {
add_action('itsec_admin_init', array($this, 'itsec_admin_init_multisite'));
//save multisite options
}
}
示例7: run
function run($core)
{
$this->core = $core;
$this->settings = get_site_option('itsec_ssl');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_filter('itsec_file_modules', array($this, 'register_file'));
//register tooltip action
add_action('current_screen', array($this, 'plugin_init'));
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'initialize_admin'));
//initialize admin area
add_filter('itsec_add_dashboard_status', array($this, 'dashboard_status'));
//add information for plugin status
add_action('admin_enqueue_scripts', array($this, 'admin_script'));
//enqueue scripts for admin page
add_filter('itsec_tracking_vars', array($this, 'tracking_vars'));
//manually save options on multisite
if (is_multisite()) {
add_action('itsec_admin_init', array($this, 'save_network_options'));
//save multisite options
}
if (isset($this->settings['frontend']) && $this->settings['frontend'] == 1) {
add_action('post_submitbox_misc_actions', array($this, 'ssl_enable_per_content'));
add_action('save_post', array($this, 'save_post'));
}
}
示例8: run
function run($core)
{
$this->core = $core;
$this->settings = get_site_option('itsec_hide_backend');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_filter('itsec_file_modules', array($this, 'register_file'));
//register tooltip action
add_filter('itsec_tooltip_modules', array($this, 'register_tooltip'));
//register tooltip action
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'initialize_admin'));
//initialize admin area
add_action('admin_enqueue_scripts', array($this, 'admin_script'));
//enqueue scripts for admin page
add_filter('itsec_add_dashboard_status', array($this, 'dashboard_status'));
//add information for plugin status
add_filter('itsec_tracking_vars', array($this, 'tracking_vars'));
//manually save options on multisite
if (is_multisite()) {
add_action('itsec_admin_init', array($this, 'save_network_options'));
//save multisite options
}
add_filter('itsec_filter_apache_server_config_modification', array($this, 'filter_apache_server_config_modification'));
add_filter('itsec_filter_litespeed_server_config_modification', array($this, 'filter_apache_server_config_modification'));
add_filter('itsec_filter_nginx_server_config_modification', array($this, 'filter_nginx_server_config_modification'));
}
示例9: run
function run( $core ) {
$this->defaults = array(
'enabled' => false,
'email_notifications' => true,
'email_contacts' => array(),
);
$this->core = $core;
$this->settings = get_site_option( 'itsec_malware_scheduling' );
$this->module_path = ITSEC_Lib::get_module_path( __FILE__ );
if ( ! is_array( $this->settings ) ) {
$this->settings = array();
}
$this->settings = array_merge( $this->defaults, $this->settings );
add_action( 'itsec_add_admin_meta_boxes', array( $this, 'itsec_add_admin_meta_boxes' ) ); //add meta boxes to admin page
add_action( 'itsec_admin_init', array( $this, 'itsec_admin_init' ) ); //initialize admin area
add_filter( 'itsec_add_dashboard_status', array( $this, 'dashboard_status' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); //enqueue scripts for admin page
add_action( 'wp_ajax_itsec_jquery_malware_filetree_ajax', array( $this, 'wp_ajax_itsec_jquery_malware_filetree_ajax' ) );
//manually save options on multisite
if ( is_multisite() ) {
add_action( 'itsec_admin_init', array( $this, 'itsec_admin_init_multisite' ) ); //save multisite options
}
}
示例10: run
function run( $core ) {
$this->core = $core;
$this->module_path = ITSEC_Lib::get_module_path( __FILE__ );
add_action( 'admin_init', array( $this, 'admin_init' ) );
}
示例11: run
function run()
{
global $itsec_malware;
$itsec_malware = $this;
$this->settings = get_site_option('itsec_malware');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_filter('itsec_logger_modules', array($this, 'itsec_logger_modules'));
add_filter('itsec_sync_modules', array($this, 'itsec_sync_modules'));
//register sync modules
}
示例12: run
function run()
{
$this->settings = get_site_option('itsec_privilege');
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('admin_init', array($this, 'admin_init'));
add_action('edit_user_profile', array($this, 'edit_user_profile'));
add_action('edit_user_profile_update', array($this, 'edit_user_profile_update'));
add_action('init', array($this, 'init'), 1);
add_action('switch_blog', array($this, 'init'));
}
示例13: run
function run($core)
{
$this->settings = true;
$this->core = $core;
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('itsec_add_admin_meta_boxes', array($this, 'itsec_add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'itsec_admin_init'));
//initialize admin area
}
示例14: run
function run($core)
{
$this->core = $core;
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_filter('itsec_tracking_vars', array($this, 'tracking_vars'));
if (!empty($_POST)) {
add_action('itsec_admin_init', array($this, 'process_post_data'));
}
if (!$this->is_custom_directory() || $this->is_modified_by_it_security()) {
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
}
}
示例15: run
function run($core)
{
$this->core = $core;
$this->module_path = ITSEC_Lib::get_module_path(__FILE__);
add_action('admin_enqueue_scripts', array($this, 'admin_script'));
//enqueue scripts for admin page
add_action('itsec_add_admin_meta_boxes', array($this, 'add_admin_meta_boxes'));
//add meta boxes to admin page
add_action('itsec_admin_init', array($this, 'initialize_admin'));
//initialize admin area
add_filter('itsec_add_dashboard_status', array($this, 'dashboard_status'));
//add information for plugin status
}