-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedia-replacer.php
34 lines (28 loc) · 1.01 KB
/
media-replacer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* Plugin Name: Attatchment Revisions
* Plugin URI:
* Description: Replace media files and keep revisions
* Version: 3.0.6
* Author: Kristoffer Svanmark
* Author URI:
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Text Domain: media-replacer
* Domain Path: /languages
*/
// Protect agains direct file access
if (! defined('WPINC')) {
die;
}
define('ATTACHMENT_REVISIONS_PATH', plugin_dir_path(__FILE__));
define('ATTACHMENT_REVISIONS_URL', plugins_url('', __FILE__));
define('ATTACHMENT_REVISIONS_TEMPLATE_PATH', ATTACHMENT_REVISIONS_PATH . 'templates/');
load_plugin_textdomain('media-replacer', false, plugin_basename(dirname(__FILE__)) . '/languages');
// Autoload from plugin
if (file_exists(ATTACHMENT_REVISIONS_PATH . 'vendor/autoload.php')) {
require_once ATTACHMENT_REVISIONS_PATH . 'vendor/autoload.php';
}
require_once ATTACHMENT_REVISIONS_PATH . 'Public.php';
// Start application
new AttatchmentRevisions\App();