-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbm-wp-experience.php
77 lines (69 loc) · 2.42 KB
/
bm-wp-experience.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Plugin Name: BM WP Experience
* Plugin URI: https://www.bernskiold.com
* Description: Provides an opinionated WordPress experience with clean-up and tweaks that we at Bernskiold have found runs WordPress best.
* Version: 3.11.6
* Author: Bernskiold
* Author URI: https://www.bernskiold.com
* Text Domain: bm-wp-experience
* Domain Path: /languages/
*
* **************************************************************************
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* **************************************************************************
*
* @package BernskioldMedia\WP\Experience
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Autoloader
*/
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
} else {
throw new Exception( 'Autoload does not exist. Please run composer install --no-dev -o.' );
}
/**
* Basic Constants
*/
define( 'BM_WP_EXPERIENCE_FILE_PATH', __FILE__ );
/**
* Main Plugin Class Function
*
* @return object
*/
function bm_wp_experience() {
return \BernskioldMedia\WP\Experience\Plugin::instance();
}
// Initialize the class instance only once.
bm_wp_experience();
/**
* Run update checker if not disabled.
*/
if ( ! defined( 'BM_WP_EXPERIENCE_DISABLE_UPDATER' ) || ( defined( 'BM_WP_EXPERIENCE_DISABLE_UPDATER' ) && false === BM_WP_EXPERIENCE_DISABLE_UPDATER ) ) {
$bm_wp_experience_updater = Puc_v4_Factory::buildUpdateChecker( 'https://github.com/bernskiold/bm-wp-experience', __FILE__, 'bm-wp-experience' );
$bm_wp_experience_updater->getVcsApi()->enableReleaseAssets();
// Add our own plugin icon.
$bm_wp_experience_updater->addResultFilter( function( $plugin_info ) {
$plugin_info->icons = [
'svg' => \BernskioldMedia\WP\Experience\Plugin::get_assets_url( 'icons/bm.svg' ),
];
return $plugin_info;
} );
}