PluginProbe
Tainacan / 1.0.0
Tainacan v1.0.0
1.3.0 1.2.0 0.20.8 0.21.0 0.21.1 0.21.10 0.21.11 0.21.12 0.21.13 0.21.14 0.21.15 0.21.16 0.21.2 0.21.3 0.21.4 0.21.5 0.21.6 0.21.7 0.21.8 0.21.9 0.3 0.4 0.5 0.6 0.6.1 All 83 releases
tainacan / tainacan.php

tainacan.php in Tainacan 1.0.0, at tainacan.php

38 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Tainacan
4 Plugin URI: https://tainacan.org/
5 Description: Open source, powerful and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional repository platform.
6 Author: Tainacan.org
7 Author URI: https://tainacan.org/
8 Version: 1.0.0
9 Requires at least: 5.9
10 Tested up to: 6.8
11 Requires PHP: 7.0
12 Stable tag: 1.0.0
13 Text Domain: tainacan
14 License: GPLv3 or later
15 License URI: http://www.gnu.org/licenses/gpl-3.0.html
16 */
17
18 // Prevent direct access to the file
19 defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
20
21 // Basic constants
22 const TAINACAN_VERSION = '1.0.0';
23 const TAINACAN_BASE_DIR = __DIR__;
24 const TAINACAN_CLASSES_DIR = __DIR__ . '/classes/';
25
26 $TAINACAN_BASE_URL = plugins_url('', __FILE__);
27 $TAINACAN_API_MAX_ITEMS_PER_PAGE = defined('TAINACAN_API_MAX_ITEMS_PER_PAGE') ? max(TAINACAN_API_MAX_ITEMS_PER_PAGE, 12) : get_option('tainacan_option_search_results_per_page', 96);
28
29 // Initialization logic (loads most classes and instantiates singletons)
30 require_once(TAINACAN_CLASSES_DIR . 'tainacan-creator.php');
31
32 // Perform migrations
33 require_once('migrations.php');
34 add_action('init', ['Tainacan\Migrations', 'run_migrations']);
35
36 // Hook to update .htaccess when the plugin is activated
37 register_activation_hook(__FILE__, ['Tainacan\Private_Files', 'add_htaccess_rules']);
38