-
Notifications
You must be signed in to change notification settings - Fork 1
/
GMMediaTags.php
38 lines (30 loc) · 1022 Bytes
/
GMMediaTags.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
35
36
37
38
<?php
/**
* Plugin Name: GM Media Tags
*
* Description: Register a taxonomy 'Media Tag' for attachment and gives the ability to bulk assignment attachment taxonomies in backend, even for taxonomies not registered by plugin.
* Version: 0.1.1
* Author: Giuseppe Mazzapica
* Requires at least: 3.5
* Tested up to: 3.6
*
* Text Domain: gmmediatags
* Domain Path: /lang/
*
* @package GMMediaTags
* @category Media
* @author Giuseppe Mazzapica
*
*/
add_action('after_setup_theme', 'init_GMMediaTags', 30);
function init_GMMediaTags() {
if ( ! defined('ABSPATH') ) die();
define('GMMEDIATAGSPATH', plugin_dir_path( __FILE__ ) );
define('GMMEDIATAGSURL', plugins_url( '/' , __FILE__ ) );
require_once( GMMEDIATAGSPATH . 'inc/GMMediaTags.class.php');
// allow disabling plugin from another plugin or theme via filter
if ( apply_filters('gm_mediatags_enable', true) ) {
load_plugin_textdomain('gmmediatags', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
GMMediaTags::init();
}
}