-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunthings-empty-media-title.php
More file actions
44 lines (36 loc) · 1.11 KB
/
runthings-empty-media-title.php
File metadata and controls
44 lines (36 loc) · 1.11 KB
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
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Plugin Name: Clear Media Title On Upload
* Plugin URI: https://runthings.dev/wordpress-plugins/empty-media-title/
* Description: Clears the image title attribute field on upload, instead of setting it to the slugified filename.
* Version: 2.0.1
* Author: runthingsdev
* Author URI: https://runthings.dev/
* License: GPLv3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Requires at least: 6.0
* Requires PHP: 7.4
* Text Domain: runthings-empty-media-title
*/
namespace Runthings\EmptyMediaTitle;
if (!defined('WPINC')) {
die;
}
define('RUNTHINGS_EMT_VERSION', '2.0.1');
define('RUNTHINGS_EMT_URL', plugin_dir_url(__FILE__));
define('RUNTHINGS_EMT_DIR', plugin_dir_path(__FILE__));
class Bootstrap
{
public function __construct()
{
add_action('plugins_loaded', [$this, 'init']);
}
public function init(): void
{
require_once RUNTHINGS_EMT_DIR . 'lib/Plugin.php';
require_once RUNTHINGS_EMT_DIR . 'lib/BulkClear.php';
new \Runthings\EmptyMediaTitle\Plugin();
new \Runthings\EmptyMediaTitle\BulkClear();
}
}
new Bootstrap();