PluginProbe
Filr – Secure document library / trunk
Filr – Secure document library vtrunk
1.2.16 trunk 1.0.0 1.1 1.2 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.2.5 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9
filr-protection / filr-protection.php

filr-protection.php in Filr – Secure document library trunk, at filr-protection.php

69 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: Filr - Secure document library
5 Plugin URI: https://wpdocumentlibrary.com/
6 Description: Simple and minimalistic file and document library plugin.
7 Author: WPChill
8 Author URI: https://wpchill.com
9 Version: 1.2.16
10 Text Domain: filr-protection
11 Domain Path: /languages
12 *
13 *
14 * NOTE:
15 * Patrick Posner transferred ownership rights on: 6th of December, 2024 when ownership was handed over to WPChill
16 */
17 define( 'FILR_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
18 define( 'FILR_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
19 define( 'FILR_VERSION', '1.2.16' );
20 // run plugin.
21 if ( !function_exists( 'filr_run_plugin' ) ) {
22 if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
23 require __DIR__ . '/vendor/autoload.php';
24 }
25 // register cronjob.
26 register_activation_hook( __FILE__, 'filr_init_activation' );
27 /**
28 *
29 * Register functions on activation.
30 *
31 * @return void
32 */
33 function filr_init_activation() {
34 if ( !wp_next_scheduled( 'check_file_acess' ) ) {
35 wp_schedule_event( time(), 'hourly', 'check_file_acess' );
36 }
37 }
38
39 add_action( 'plugins_loaded', 'filr_run_plugin' );
40 /**
41 * Run plugin
42 *
43 * @return void
44 */
45 function filr_run_plugin() {
46 // load setup.
47 require_once FILR_PATH . '/inc/setup.php';
48 // localize.
49 $textdomain_dir = plugin_basename( __DIR__ ) . '/languages';
50 load_plugin_textdomain( 'filr-protection', false, $textdomain_dir );
51 filr\FILR_Admin::get_instance();
52 filr\FILR_Meta::get_instance();
53 filr\FILR_Shortcode::get_instance();
54 filr\FILR_Filesystem::get_instance();
55 // Normalize path.
56 add_filter(
57 'filr_file_directory',
58 function ( $current_dir, $filr_dir, $file_id ) {
59 if ( function_exists( 'wp_normalize_path' ) ) {
60 return wp_normalize_path( $current_dir );
61 }
62 return $current_dir;
63 },
64 10,
65 3
66 );
67 }
68
69 }