-
Notifications
You must be signed in to change notification settings - Fork 1
/
nbsp-automat.php
44 lines (37 loc) · 978 Bytes
/
nbsp-automat.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
43
44
<?php
/*
Plugin Name: NBSP Automat
Plugin URI: https://github.com/Merchans/nbsp-automat
Description: Automatically adds a non-breaking space ( ) in the content.
Version: 1.0
Author: Richard Markovič
Author URI:
License: GPLv2 or later
Text Domain: nbsp-automat
*/
if ( ! defined('ABSPATH') ) {
die();
}
if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
}
// Nemespace for auto loading
use Inc\Base\Activate;
use Inc\Base\Deactivate;
/**
* The code that runs during plugin activation
*/
function nbsp_automat_activate() {
Activate::activate();
}
/**
* The code that runs during plugin deactivation
*/
function nbsp_automat_deactivate() {
Deactivate::deactivate();
}
register_activation_hook( __FILE__, 'nbsp_automat_activate' );
register_deactivation_hook( __FILE__, 'nbsp_automat_deactivate');
if ( class_exists( 'Inc\\Init' ) ) {
Inc\Init::register_services();
}