-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsvg2png.php
42 lines (36 loc) · 1.07 KB
/
svg2png.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
39
40
41
42
<?php
/**
* Plugin Name: Svg2Png
* Plugin URI: https://github.com/MINDKomm/svg2png
* Description: Converts each uploaded SVG to a PNG using CloudConvert
* Text Domain: svg2png
* Domain Path: /languages
* Author: MIND
* Author URI: https://www.mind.ch
* License: GNU General Public License v2.0 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Version: 1.0.1
*/
namespace Svg2Png;
use Svg2Png\Licensing\Licensing;
add_action( 'plugins_loaded', function() {
if ( is_admin() ) {
require_once( __DIR__ . '/vendor/autoload.php' );
load_plugin_textdomain(
'svg2png',
false,
dirname( plugin_basename( __FILE__ ) ) . '/languages'
);
new Svg2Png();
new Settings();
new Licensing( 'svg2png', plugin_dir_path( __FILE__ ) . 'svg2png.php' );
}
} );
/**
* Activate the free license for this plugin on products.mind.ch.
*/
register_activation_hook( __FILE__, function() {
require_once( __DIR__ . '/vendor/autoload.php' );
$licensing = new Licensing( 'svg2png', plugin_dir_path( __FILE__ ) . 'svg2png.php' );
$licensing->activate_free_license();
} );