Advertisement
Guest User

Scott Cariss

a guest
Jun 17th, 2011
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 23.21 KB | None | 0 0
  1. <?php
  2. /*  Copyright 2011  Scott Cariss  (email : scott@l3rady.com)
  3.  
  4.     This program is free software; you can redistribute it and/or modify
  5.     it under the terms of the GNU General Public License as published by
  6.     the Free Software Foundation; either version 2 of the License, or
  7.     (at your option) any later version.
  8.  
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.     GNU General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU General Public License
  15.     along with this program; if not, write to the Free Software
  16.     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  17. */
  18.  
  19. class sc_WordPressFileMonitorPlusSettings extends sc_WordPressFileMonitorPlus {
  20.  
  21.     protected static $frequency_intervals = array("hourly", "twicedaily", "daily", "manual");
  22.  
  23.  
  24.     public function __construct() {
  25.         $this->settingsUpToDate(); // Check settings are up to date
  26.         add_action('admin_menu', array(__CLASS__, 'admin_settings_menu')); // Add admin settings menu
  27.         add_action('admin_init', array(__CLASS__, 'admin_settings_init')); // Add admin init functions
  28.         add_filter('plugin_action_links', array(__CLASS__, 'plugin_action_links'), 10, 2); // Add settings link to plugin in plugin list
  29.     }
  30.  
  31.  
  32.     /**
  33.      * Check if this plugin settings are up to date. Firstly check the version in
  34.      * the DB. If they don't match then load in defaults but don't override values
  35.      * already set. Also this will remove obsolete settings that are not needed.
  36.      *
  37.      * @return void
  38.      */
  39.     protected function settingsUpToDate() {
  40.         $current_ver = get_option(parent::$settings_option_field_ver); // Get current plugin version
  41.         if(parent::$settings_option_field_current_ver != $current_ver) { // is the version the same as this plugin?
  42.             $options = (array) get_option(parent::$settings_option_field); // get current settings from DB
  43.             $defaults = array( // Here are the default values
  44.                     'cron_method' => 'wordpress', // Cron method to be used for scheduling scans
  45.                     'file_check_interval' => 'daily', // How often should the cron run
  46.                     'notify_by_email' => 1, // Do we want to be notified by email when there is a file change?
  47.                     'data_save' => 'database', // Where to save scan data and admin alert message
  48.                     'from_address' => get_option('admin_email'), // Email address the notification comes from
  49.                     'notify_address' => get_option('admin_email'), // Email address the notification is sent to
  50.                     'site_root' => realpath(ABSPATH), // The file check path to start checking files from
  51.                     'exclude_paths' => array(), // What exact directories should we ignore?
  52.                     'exclude_files' => array(), // What exact files should we ignore?
  53.                     'exclude_paths_wild' => array(), // What directory names should we ignore?
  54.                     'exclude_files_wild' => array(), // What file names should we ignore
  55.                     'file_check_method' => array(
  56.                         'size' => 1, // Should we log the filesize of files?
  57.                         'modified' => 1, // Should we log the modified date of files?
  58.                         'md5' => 1 // Should we log the hash of files using md5_file()?
  59.                     ),
  60.                     'display_admin_alert' => 1, // Do we allow the plugin to notify us when there is a change in the admin area?
  61.                     'is_admin_alert' => 0, // Is there a live admin alert?
  62.                     'security_key' => sha1(microtime(true).mt_rand(10000,90000)) // Generate a random key to be used for Other Cron Method
  63.                     // The security key is only shown to the admin and has to be used for triggering a manual scan via an external cron.
  64.                     // This is to stop non admin users from being able to trigger the cron and potentially abuse server resources.
  65.             );
  66.             // Intersect current options with defaults. Basically removing settings that are obsolete
  67.             $options = array_intersect_key($options, $defaults);
  68.             // Merge current settings with defaults. Basically adding any new settings with defaults that we dont have.
  69.             $options = array_merge($defaults, $options);
  70.             update_option(parent::$settings_option_field, $options); // update settings
  71.             update_option(parent::$settings_option_field_ver, parent::$settings_option_field_current_ver); // update settings version
  72.         }
  73.     }
  74.  
  75.  
  76.     /**
  77.      * Adds settings link on plugin list
  78.      *
  79.      * @param array $links
  80.      * @param string $file
  81.      * @return array $links
  82.      */
  83.     public function plugin_action_links($links, $file) {
  84.         static $this_plugin;
  85.         if (!$this_plugin) { $this_plugin = "wordpress-file-monitor-plus/wordpress-file-monitor-plus.php"; }
  86.         if ($this_plugin == $file){
  87.             $settings_link = '<a href="'.admin_url().'options-general.php?page=wordpress-file-monitor-plus">'.__("Settings", "wordpress-file-monitor-plus").'</a>';
  88.             array_unshift($links, $settings_link);
  89.             $settings_link = '<a href="'.admin_url().'options-general.php?page=wordpress-file-monitor-plus&sc_wpfmp_action=1&sc_wpfmp_scan=1">'.__("Manual Scan", "wordpress-file-monitor-plus").'</a>';
  90.             array_unshift($links, $settings_link);
  91.         }
  92.         return $links;
  93.     }
  94.  
  95.  
  96.     /*
  97.      * EVERYTHING SETTINGS
  98.      *
  99.      * I'm not going to comment any of this as its all pretty
  100.      * much straight forward use of the WordPress Settings API.
  101.      */
  102.     public function admin_settings_menu() {
  103.         $options = get_option(parent::$settings_option_field);
  104.         $page = add_options_page('WordPress File Monitor Plus', 'WordPress File Monitor Plus', 'manage_options', 'wordpress-file-monitor-plus', array(__CLASS__, 'settings_page'));
  105.         add_action("admin_print_scripts-$page", array(__CLASS__, 'create_admin_pages_scripts')); // Add js to my settings page
  106.         if(1 == $options['is_admin_alert'] && 1 == $options['display_admin_alert'] && current_user_can(SC_WPFMP_ADMIN_ALERT_PERMISSION)) { // is there an admin display?
  107.             add_action("admin_print_scripts", array(__CLASS__, 'create_admin_pages_tbscripts')); // load thickbox js
  108.             add_action("admin_print_styles", array(__CLASS__, 'create_admin_pages_tbstyles')); // load thickbox css
  109.         }
  110.         if(current_user_can(SC_WPFMP_ADMIN_ALERT_PERMISSION) && "wordpress-file-monitor-plus" == $_GET['page'] && 1 == $_GET['sc_wpfmp_action']) {
  111.             if(1 == $_GET['sc_wpfmp_scan']) {
  112.                 do_action(parent::$cron_name);
  113.             } elseif(1 == $_GET['sc_wpfmp_reset_settings']) {
  114.                 delete_option(parent::$settings_option_field);
  115.                 delete_option(parent::$settings_option_field_ver);
  116.                 self::settingsUpToDate();
  117.             }
  118.         }
  119.     }
  120.     public function settings_page() {
  121.         ?>
  122.         <div class="wrap">
  123.         <?php screen_icon(); ?>
  124.         <h2><?php _e("WordPress File Monitor Plus", "wordpress-file-monitor-plus"); ?></h2>
  125.         <form action="options.php" method="post">
  126.         <?php
  127.         settings_fields("sc_wpfmp_settings");
  128.         do_settings_sections("wordpress-file-monitor-plus");
  129.         ?>
  130.         <p class="submit">
  131.           <?php submit_button(__("Save Changes", "wordpress-file-monitor-plus"), "primary", "submit", false); ?>
  132.           <a class="button-secondary" href="<?php echo admin_url(); ?>options-general.php?page=wordpress-file-monitor-plus&sc_wpfmp_action=1&sc_wpfmp_scan=1"><?php _e("Manual Scan", "wordpress-file-monitor-plus"); ?></a>
  133.           <a class="button-secondary" href="<?php echo admin_url(); ?>options-general.php?page=wordpress-file-monitor-plus&sc_wpfmp_action=1&sc_wpfmp_reset_settings=1"><?php _e("Reset Settings", "wordpress-file-monitor-plus"); ?></a>
  134.         </p>
  135.         </form>
  136.         </div>
  137.         <?php
  138.     }
  139.     public function admin_settings_init() {
  140.         register_setting(parent::$settings_option_field, parent::$settings_option_field, array(__CLASS__, "sc_wpfmp_settings_validate")); // Register Main Settings
  141.         add_settings_section("sc_wpfmp_settings_main", __("Settings", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_text"), "wordpress-file-monitor-plus"); // Make settings main section
  142.         add_settings_field("sc_wpfmp_settings_main_cron_method", __("Cron Method", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_cron_method"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  143.         add_settings_field("sc_wpfmp_settings_main_file_check_interval", __("File Check Interval", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_file_check_interval"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  144.         add_settings_field("sc_wpfmp_settings_main_data_save", __("Data Save Method", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_data_save"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  145.         add_settings_field("sc_wpfmp_settings_main_notify_by_email", __("Notify By Email", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_notify_by_email"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  146.         add_settings_field("sc_wpfmp_settings_main_from_address", __("From Email Address", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_from_address"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  147.         add_settings_field("sc_wpfmp_settings_main_notify_address", __("Notify Email Address", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_notify_address"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  148.         add_settings_field("sc_wpfmp_settings_main_display_admin_alert", __("Admin Alert", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_display_admin_alert"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  149.         add_settings_field("sc_wpfmp_settings_main_file_check_method", __("File Check Method", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_file_check_method"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  150.         add_settings_field("sc_wpfmp_settings_main_site_root", __("File Check Root", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_site_root"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  151.         add_settings_field("sc_wpfmp_settings_main_exclude_files_wild", __("File Names To Ignore", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_exclude_files_wild"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  152.         add_settings_field("sc_wpfmp_settings_main_exclude_paths_wild", __("Dir Names To Ignore", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_exclude_paths_wild"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  153.         add_settings_field("sc_wpfmp_settings_main_exclude_files", __("Exact Files To Ignore", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_exclude_files"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  154.         add_settings_field("sc_wpfmp_settings_main_exclude_paths", __("Exact Dirs To Ignore", "wordpress-file-monitor-plus"), array(__CLASS__, "sc_wpfmp_settings_main_field_exclude_paths"), "wordpress-file-monitor-plus", "sc_wpfmp_settings_main");
  155.     }
  156.     public function sc_wpfmp_settings_validate($input) {
  157.         $valid = get_option(parent::$settings_option_field);
  158.         if(in_array($input['cron_method'], array("wordpress", "other"))) {
  159.             $valid['cron_method'] = $input['cron_method'];
  160.         } else {
  161.             add_settings_error("sc_wpfmp_settings_main_cron_method", "sc_wpfmp_settings_main_cron_method_error", __("Invalid cron method selected", "wordpress-file-monitor-plus"), "error");
  162.         }
  163.         if("other" == $valid['cron_method']) { // If cron method is other
  164.             $input['file_check_interval'] = "manual"; // then force scan interval to manual
  165.         }
  166.         if(in_array($input['file_check_interval'], self::$frequency_intervals)) {
  167.             $valid['file_check_interval'] = $input['file_check_interval'];
  168.             parent::enable_cron($input['file_check_interval']);
  169.         } else {
  170.             add_settings_error("sc_wpfmp_settings_main_file_check_interval", "sc_wpfmp_settings_main_file_check_interval_error", __("Invalid file check interval selected", "wordpress-file-monitor-plus"), "error");
  171.         }
  172.         if(in_array($input['data_save'], array("database", "file"))) {
  173.             $valid['data_save'] = $input['data_save'];
  174.         } else {
  175.             add_settings_error("sc_wpfmp_settings_main_data_save", "sc_wpfmp_settings_main_data_save_error", __("Invalid data save method selected", "wordpress-file-monitor-plus"), "error");
  176.         }
  177.         $sanitized_notify_by_email = absint($input['notify_by_email']);
  178.         if(1 === $sanitized_notify_by_email || 0 === $sanitized_notify_by_email) {
  179.             $valid['notify_by_email'] = $sanitized_notify_by_email;
  180.         } else {
  181.             add_settings_error("sc_wpfmp_settings_main_notify_by_email", "sc_wpfmp_settings_main_notify_by_email_error", __("Invalid notify by email selected", "wordpress-file-monitor-plus"), "error");
  182.         }
  183.         $sanitized_email_from = sanitize_email($input['from_address']);
  184.         if(is_email($sanitized_email_from)) {
  185.             $valid['from_address'] = $sanitized_email_from;
  186.         } else {
  187.             add_settings_error("sc_wpfmp_settings_main_from_address", "sc_wpfmp_settings_main_from_address_error", __("Invalid from email address entered", "wordpress-file-monitor-plus"), "error");
  188.         }
  189.         $sanitized_email_to = sanitize_email($input['notify_address']);
  190.         if(is_email($sanitized_email_to)) {
  191.             $valid['notify_address'] = $sanitized_email_to;
  192.         } else {
  193.             add_settings_error("sc_wpfmp_settings_main_notify_address", "sc_wpfmp_settings_main_notify_address_error", __("Invalid notify email address entered", "wordpress-file-monitor-plus"), "error");
  194.         }
  195.         $sanitized_display_admin_alert = absint($input['display_admin_alert']);
  196.         if(1 === $sanitized_display_admin_alert || 0 === $sanitized_display_admin_alert) {
  197.             $valid['display_admin_alert'] = $sanitized_display_admin_alert;
  198.         } else {
  199.             add_settings_error("sc_wpfmp_settings_main_display_admin_alert", "sc_wpfmp_settings_main_display_admin_alert_error", __("Invalid display admin alert selected", "wordpress-file-monitor-plus"), "error");
  200.         }
  201.         $sanitized_file_check_method = array_map(
  202.             function($n) {
  203.                 $n = absint($n);
  204.                 if(1 !== $n) { $n = 0; }
  205.                 return $n;
  206.             }, $input['file_check_method']
  207.         );
  208.         $valid['file_check_method'] = $sanitized_file_check_method;
  209.         $sanitized_site_root = realpath($input['site_root']);
  210.         if(is_dir($sanitized_site_root) && is_readable($sanitized_site_root)) {
  211.             $valid['site_root'] = $sanitized_site_root;
  212.         } else {
  213.             add_settings_error("sc_wpfmp_settings_main_site_root", "sc_wpfmp_settings_main_site_root_error", __("File check root is not valid. Make sure that PHP has read permissions of the entered file check root", "wordpress-file-monitor-plus"), "error");
  214.         }
  215.         $valid['exclude_files_wild'] = array_map('trim', (array) explode("\n", $input['exclude_files_wild']));
  216.         $valid['exclude_paths_wild'] = array_map('trim', (array) explode("\n", $input['exclude_paths_wild']));
  217.         $valid['exclude_files'] = array_map('trim', (array) explode("\n", $input['exclude_files']));
  218.         $valid['exclude_paths'] = array_map('trim', (array) explode("\n", $input['exclude_paths']));
  219.         return $valid;
  220.     }
  221.     public function sc_wpfmp_settings_main_text() {}
  222.     public function sc_wpfmp_settings_main_field_cron_method() {
  223.         $options = get_option(parent::$settings_option_field);
  224.         ?>
  225.         <select name="<?php echo parent::$settings_option_field ?>[cron_method]">
  226.             <option value="wordpress" <?php selected( $options['cron_method'], "wordpress" ); ?>><?php _e("WordPress Cron", "wordpress-file-monitor-plus"); ?></option>
  227.             <option value="other" <?php selected( $options['cron_method'], "other" ); ?>><?php _e("Other Cron", "wordpress-file-monitor-plus"); ?></option>
  228.         </select>
  229.         <div>
  230.             <br />
  231.             <span class="description"><?php _e("Cron Command: ", "wordpress-file-monitor-plus"); ?></span>
  232.             <pre>wget -q "<?php echo site_url(); ?>/index.php?sc_wpfmp_scan=1&amp;sc_wpfmp_key=<?php echo $options['security_key']; ?>" -O /dev/null >/dev/null 2>&amp;1</pre>
  233.         </div>
  234.         <?php
  235.     }
  236.     public function sc_wpfmp_settings_main_field_file_check_interval() {
  237.         $options = get_option(parent::$settings_option_field);
  238.         ?>
  239.         <select name="<?php echo parent::$settings_option_field ?>[file_check_interval]">
  240.             <option value="<?php echo self::$frequency_intervals[0]; ?>" <?php selected( $options['file_check_interval'], self::$frequency_intervals[0] ); ?>><?php _e("Hourly", "wordpress-file-monitor-plus"); ?></option>
  241.             <option value="<?php echo self::$frequency_intervals[1]; ?>" <?php selected( $options['file_check_interval'], self::$frequency_intervals[1] ); ?>><?php _e("Twice Daily", "wordpress-file-monitor-plus"); ?></option>
  242.             <option value="<?php echo self::$frequency_intervals[2]; ?>" <?php selected( $options['file_check_interval'], self::$frequency_intervals[2] ); ?>><?php _e("Daily", "wordpress-file-monitor-plus"); ?></option>
  243.             <option value="<?php echo self::$frequency_intervals[3]; ?>" <?php selected( $options['file_check_interval'], self::$frequency_intervals[3] ); ?>><?php _e("Manual", "wordpress-file-monitor-plus"); ?></option>
  244.         </select>
  245.         <?php
  246.     }
  247.     public function sc_wpfmp_settings_main_field_data_save() {
  248.         $options = get_option(parent::$settings_option_field);
  249.         ?>
  250.         <select name="<?php echo parent::$settings_option_field ?>[data_save]">
  251.             <option value="database" <?php selected( $options['data_save'], "database" ); ?>><?php _e("Database", "wordpress-file-monitor-plus"); ?></option>
  252.             <option value="file" <?php selected( $options['data_save'], "file" ); ?>><?php _e("File", "wordpress-file-monitor-plus"); ?></option>
  253.         </select>
  254.         <?php
  255.     }
  256.     public function sc_wpfmp_settings_main_field_notify_by_email() {
  257.         $options = get_option(parent::$settings_option_field);
  258.         ?>
  259.         <select name="<?php echo parent::$settings_option_field ?>[notify_by_email]">
  260.             <option value="1" <?php selected( $options['notify_by_email'], 1 ); ?>><?php _e("Yes", "wordpress-file-monitor-plus"); ?></option>
  261.             <option value="0" <?php selected( $options['notify_by_email'], 0 ); ?>><?php _e("No", "wordpress-file-monitor-plus"); ?></option>
  262.         </select>
  263.         <?php
  264.     }
  265.     public function sc_wpfmp_settings_main_field_from_address() {
  266.         $options = get_option(parent::$settings_option_field);
  267.         ?><input class="regular-text" name="<?php echo parent::$settings_option_field ?>[from_address]" value="<?php echo $options['from_address']; ?>" /><?php
  268.     }
  269.     public function sc_wpfmp_settings_main_field_notify_address() {
  270.         $options = get_option(parent::$settings_option_field);
  271.         ?><input class="regular-text" name="<?php echo parent::$settings_option_field ?>[notify_address]" value="<?php echo $options['notify_address']; ?>" /><?php
  272.     }
  273.     public function sc_wpfmp_settings_main_field_display_admin_alert() {
  274.         $options = get_option(parent::$settings_option_field);
  275.         ?>
  276.         <select name="<?php echo parent::$settings_option_field ?>[display_admin_alert]">
  277.             <option value="1" <?php selected( $options['display_admin_alert'], 1 ); ?>><?php _e("Yes", "wordpress-file-monitor-plus"); ?></option>
  278.             <option value="0" <?php selected( $options['display_admin_alert'], 0 ); ?>><?php _e("No", "wordpress-file-monitor-plus"); ?></option>
  279.         </select>
  280.         <?php
  281.     }
  282.     public function sc_wpfmp_settings_main_field_file_check_method() {
  283.         $options = get_option(parent::$settings_option_field);
  284.         ?>
  285.         <input name="<?php echo parent::$settings_option_field ?>[file_check_method][size]" type="checkbox" value="1" <?php checked( $options['file_check_method']['size'], 1 ); ?> /><?php _e(" File Size", "wordpress-file-monitor-plus"); ?><br />
  286.         <input name="<?php echo parent::$settings_option_field ?>[file_check_method][modified]" type="checkbox" value="1" <?php checked( $options['file_check_method']['modified'], 1 ); ?> /><?php _e(" Date Modified", "wordpress-file-monitor-plus"); ?><br />
  287.         <input name="<?php echo parent::$settings_option_field ?>[file_check_method][md5]" type="checkbox" value="1" <?php checked( $options['file_check_method']['md5'], 1 ); ?> /><?php _e(" File Hash", "wordpress-file-monitor-plus"); ?>
  288.         <?php
  289.     }
  290.     public function sc_wpfmp_settings_main_field_site_root() {
  291.         $options = get_option(parent::$settings_option_field);
  292.         ?><input name="<?php echo parent::$settings_option_field ?>[site_root]" value="<?php echo $options['site_root']; ?>" /> <span class="description"><?php printf(__("Default: %s", "wordpress-file-monitor-plus"), realpath(ABSPATH)); ?></span><?php
  293.     }
  294.     public function sc_wpfmp_settings_main_field_exclude_files_wild() {
  295.         $options = get_option(parent::$settings_option_field);
  296.         ?><textarea name="<?php echo parent::$settings_option_field ?>[exclude_files_wild]" cols="25" rows="3"><?php echo implode("\n", $options['exclude_files_wild']); ?></textarea><?php
  297.     }
  298.     public function sc_wpfmp_settings_main_field_exclude_paths_wild() {
  299.         $options = get_option(parent::$settings_option_field);
  300.         ?><textarea name="<?php echo parent::$settings_option_field ?>[exclude_paths_wild]" cols="25" rows="3"><?php echo implode("\n", $options['exclude_paths_wild']); ?></textarea><?php
  301.     }
  302.     public function sc_wpfmp_settings_main_field_exclude_files() {
  303.         $options = get_option(parent::$settings_option_field);
  304.         ?><textarea name="<?php echo parent::$settings_option_field ?>[exclude_files]" cols="25" rows="3"><?php echo implode("\n", $options['exclude_files']); ?></textarea><?php
  305.     }
  306.     public function sc_wpfmp_settings_main_field_exclude_paths() {
  307.         $options = get_option(parent::$settings_option_field);
  308.         ?><textarea name="<?php echo parent::$settings_option_field ?>[exclude_paths]" cols="25" rows="3"><?php echo implode("\n", $options['exclude_paths']); ?></textarea><?php
  309.     }
  310.     public function create_admin_pages_scripts() {
  311.         wp_enqueue_script('wordpress_file_monitor_plus_js_function', plugins_url('js/function.js', "wordpress-file-monitor-plus/wordpress-file-monitor-plus.php"), array('jquery'), '1.2', true);
  312.     }
  313.     public function create_admin_pages_tbscripts() {
  314.         wp_enqueue_script('thickbox');
  315.     }
  316.     public function create_admin_pages_tbstyles() {
  317.         wp_enqueue_style('thickbox');
  318.     }
  319. }
  320. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement