PluginProbe
Disable Comments & Delete All Comments / 1.0.0
Disable Comments & Delete All Comments v1.0.0
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 / admin / boot.php

boot.php in Disable Comments & Delete All Comments 1.0.0, at admin/boot.php

78 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin boot
4 * @author Webcraftic <wordpress.webraftic@gmail.com>
5 * @copyright Webcraftic 25.05.2017
6 * @version 1.0
7 */
8
9 require(WBCR_CMP_PLUGIN_DIR . '/admin/pages/comments.php');
10
11 if( !defined('LOADING_COMMENTS_PLUS_AS_ADDON') ) {
12 require(WBCR_CMP_PLUGIN_DIR . '/admin/pages/more-features.php');
13 }
14
15 function wbcr_cmp_group_options($options)
16 {
17 $options[] = array(
18 'name' => 'disable_comments',
19 'title' => __('Disable comments on the entire site', 'comments-plus'),
20 'tags' => array('disable_all_comments'),
21 'values' => array('disable_all_comments' => 'disable_comments')
22 );
23 $options[] = array(
24 'name' => 'disable_comments_for_post_types',
25 'title' => __('Select post types', 'comments-plus'),
26 'tags' => array()
27 );
28 $options[] = array(
29 'name' => 'comment_text_convert_links_pseudo',
30 'title' => __('Replace external links in comments on the JavaScript code', 'comments-plus'),
31 'tags' => array('recommended', 'seo_optimize')
32 );
33 $options[] = array(
34 'name' => 'pseudo_comment_author_link',
35 'title' => __('Replace external links from comment authors on the JavaScript code', 'comments-plus'),
36 'tags' => array('recommended', 'seo_optimize')
37 );
38 $options[] = array(
39 'name' => 'remove_x_pingback',
40 'title' => __('Disable X-Pingback', 'comments-plus'),
41 'tags' => array('recommended', 'defence', 'disable_all_comments')
42 );
43 $options[] = array(
44 'name' => 'remove_url_from_comment_form',
45 'title' => __('Remove field "site" in comment form', 'comments-plus'),
46 'tags' => array()
47 );
48
49 return $options;
50 }
51
52 add_filter("wbcr_clearfy_group_options", 'wbcr_cmp_group_options');
53
54 function wbcr_cmp_allow_quick_mods($mods)
55 {
56 $mods['disable_all_comments'] = __('Disable all comments', 'comments-plus');
57
58 return $mods;
59 }
60
61 add_filter("wbcr_clearfy_allow_quick_mods", 'wbcr_cmp_allow_quick_mods');
62
63 function wbcr_cmp_set_plugin_meta($links, $file)
64 {
65 if( $file == WBCR_CMP_PLUGIN_BASE ) {
66 $links[] = '<a href="https://goo.gl/TcMcS4" style="color: #FF5722;font-weight: bold;" target="_blank">' . __('Get ultimate plugin free', 'comments-plus') . '</a>';
67 }
68
69 return $links;
70 }
71
72 if( !defined('LOADING_COMMENTS_PLUS_AS_ADDON') ) {
73 add_filter('plugin_row_meta', 'wbcr_cmp_set_plugin_meta', 10, 2);
74 }
75
76
77
78