-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmuut.php
54 lines (47 loc) · 1.46 KB
/
muut.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
<?php
/*
Plugin Name: Muut
Plugin URI: http://wordpress.org/plugins/muut/
Description: A complete re-imagining of what online discussions should be. Real‑time forums and commenting for WordPress.
Version: 3.0.6
Author: Muut, Inc.
Author URI: http://muut.com
Text Domain: muut
*/
/* Copyright 2014 Muut, Inc. */
// Don't load directly.
if ( !defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Initializes the main plugin class.
*
* @return void
* @author Paul Hughes
* @since 3.0
*/
function muut_initialize_plugin() {
if ( file_exists( dirname( __FILE__ ) . '/lib/muut.class.php' ) ) {
require_once( dirname( __FILE__ ) . '/lib/muut.class.php' );
if ( class_exists( 'Muut' ) ) {
muut();
} else {
add_action( 'admin_notices', 'muut_show_plugin_load_fail_message' );
}
} else {
add_action( 'admin_notices', 'muut_show_plugin_load_fail_message' );
}
$plugin_dir = trailingslashit( basename( dirname( __FILE__ ) ) );
load_plugin_textdomain( 'muut', false, $plugin_dir . 'lang/');
}
function muut_show_plugin_load_fail_message() {
if ( current_user_can( 'activate_plugins' ) ) {
printf( __( '%sMuut%s plugin failed to initialize.%s', 'muut' ), '<div class="error"><p><b>', '</b>', '</p></div>' );
}
}
function muut_run_activation_functions() {
add_option( 'muut_plugin_just_activated', time() );
}
// Initialize the plugin.
add_action( 'plugins_loaded', 'muut_initialize_plugin' );
register_activation_hook( __FILE__, 'muut_run_activation_functions' );