PluginProbe
Disable Comments & Delete All Comments / 1.0.9
Disable Comments & Delete All Comments v1.0.9
1.3.3 1.3.2 trunk 1.0.0 1.0.4 1.0.5 1.0.8 1.0.9 1.1.1 1.1.3 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.3.0 1.3.1
comments-plus / comments-plus.php

comments-plus.php in Disable Comments & Delete All Comments 1.0.9, at comments-plus.php

60 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Webcraftic Disable Comments
4 * Plugin URI: https://wordpress.org/plugins/comments-plus/
5 * Description: Allows administrators to globally disable comments on their site. Comments can be disabled for individual record types.
6 * Author: Webcraftic <wordpress.webraftic@gmail.com>
7 * Version: 1.0.9
8 * Text Domain: comments-plus
9 * Domain Path: /languages/
10 * Author URI: https://clearfy.pro
11 */
12
13 // Exit if accessed directly
14 if( !defined('ABSPATH') ) {
15 exit;
16 }
17
18 if( defined('WCM_PLUGIN_ACTIVE') || (defined('WCL_PLUGIN_ACTIVE') && !defined('LOADING_COMMENTS_PLUS_AS_ADDON')) ) {
19 function wbcr_cmp_admin_notice_error()
20 {
21 ?>
22 <div class="notice notice-error">
23 <p><?php _e('We found that you have the "Clearfy - disable unused features" plugin installed, this plugin already has disable comments functions, so you can deactivate plugin "Disable comments"!'); ?></p>
24 </div>
25 <?php
26 }
27
28 add_action('admin_notices', 'wbcr_cmp_admin_notice_error');
29
30 return;
31 } else {
32
33 define('WCM_PLUGIN_ACTIVE', true);
34
35 define('WCM_PLUGIN_DIR', dirname(__FILE__));
36 define('WCM_PLUGIN_BASE', plugin_basename(__FILE__));
37 define('WCM_PLUGIN_URL', plugins_url(null, __FILE__));
38
39
40
41 if( !defined('LOADING_COMMENTS_PLUS_AS_ADDON') ) {
42 require_once(WCM_PLUGIN_DIR . '/libs/factory/core/boot.php');
43 }
44
45 require_once(WCM_PLUGIN_DIR . '/includes/class.plugin.php');
46
47 if( !defined('LOADING_COMMENTS_PLUS_AS_ADDON') ) {
48 //todo: обновить опции в старом плагине на новый префикс
49 new WCM_Plugin(__FILE__, array(
50 'prefix' => 'wbcr_comments_plus_', // wbcr_cmp
51 'plugin_name' => 'wbcr_comments_plus',
52 'plugin_title' => __('Webcraftic Disable comments', 'comments-plus'),
53 'plugin_version' => '1.0.9',
54 'required_php_version' => '5.2',
55 'required_wp_version' => '4.2',
56 'plugin_build' => 'free',
57 //'updates' => WCM_PLUGIN_DIR . '/updates/'
58 ));
59 }
60 }