first commit

This commit is contained in:
User A0264400
2026-04-01 23:20:16 +03:00
commit a766acdc90
23071 changed files with 4933189 additions and 0 deletions

View File

@@ -0,0 +1,178 @@
<?php
/**
* Admin boot
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright Webcraftic 25.05.2017
* @version 1.0
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Массово проходится по комментарием в базе данных и отключает, какждый индивидуально.
*/
function wbcr_cmp_enter_permanent_mode() {
global $wpdb;
if ( ! WCM_Plugin::app()->getPopulateOption( 'disable_comments_permanent' ) ) {
return;
}
$types = wbcr_cmp_get_disabled_post_types();
if ( empty( $types ) ) {
return;
}
if ( WCM_Plugin::app()->isNetworkActive() ) {
// NOTE: this can be slow on large networks!
$blogs = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id
FROM $wpdb->blogs
WHERE site_id = %d
AND public = '1'
AND archived = '0'
AND deleted = '0'", $wpdb->siteid ) );
foreach ( $blogs as $id ) {
switch_to_blog( $id );
wbcr_close_comments_in_db( $types );
restore_current_blog();
}
} else {
wbcr_close_comments_in_db( $types );
}
}
add_action( 'wbcr/factory/pages/impressive/after_form_save', 'wbcr_cmp_enter_permanent_mode' );
add_action( 'wbcr_clearfy_configurated_quick_mode', 'wbcr_cmp_enter_permanent_mode' );
/**
* Закрывает комментарии в базе данных
*
* @param $types
*/
function wbcr_close_comments_in_db( $types ) {
global $wpdb;
$bits = implode( ', ', array_pad( [], count( $types ), '%s' ) );
$wpdb->query( $wpdb->prepare( "UPDATE `$wpdb->posts`
SET `comment_status` = 'closed', ping_status = 'closed'
WHERE `post_type`
IN ( $bits )", $types ) );
}
if ( ! defined( 'LOADING_COMMENTS_PLUS_AS_ADDON' ) ) {
function wbcr_cmp_set_plugin_meta( $links, $file ) {
if ( $file == WCM_PLUGIN_BASE ) {
$url = 'https://clearfy.pro';
if ( get_locale() == 'ru_RU' ) {
$url = 'https://ru.clearfy.pro';
}
$url .= '?utm_source=wordpress.org&utm_campaign=' . WCM_Plugin::app()->getPluginName();
$links[] = '<a href="' . $url . '" style="color: #FF5722;font-weight: bold;" target="_blank">' . __( 'Get ultimate plugin free', 'comments-plus' ) . '</a>';
}
return $links;
}
add_filter( 'plugin_row_meta', 'wbcr_cmp_set_plugin_meta', 10, 2 );
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param string $page_url
* @param string $plugin_name
*
* @return string
*/
function wbcr_cmp_rating_widget_url( $page_url, $plugin_name ) {
if ( ! defined( 'LOADING_COMMENTS_PLUS_AS_ADDON' ) && ( $plugin_name == WCM_Plugin::app()->getPluginName() ) ) {
return 'https://goo.gl/v4QkW5';
}
return $page_url;
}
add_filter( 'wbcr_factory_pages_480_imppage_rating_widget_url', 'wbcr_cmp_rating_widget_url', 10, 2 );
/**
* Удаляем лишние виджеты из правого сайдбара в интерфейсе плагина
*
* - Виджет с премиум рекламой
* - Виджет с рейтингом
* - Виджет с маркерами информации
*/
add_filter( 'wbcr/factory/pages/impressive/widgets', function ( $widgets, $position, $plugin ) {
if ( WCM_Plugin::app()->getPluginName() == $plugin->getPluginName() && 'right' == $position ) {
unset( $widgets['business_suggetion'] );
unset( $widgets['rating_widget'] );
unset( $widgets['info_widget'] );
}
return $widgets;
}, 20, 3 );
} else {
function wbcr_cmp_group_options( $options ) {
$options[] = [
'name' => 'disable_comments',
'title' => __( 'Disable comments on the entire site', 'comments-plus' ),
'tags' => [ 'disable_all_comments' ],
'values' => [ 'disable_all_comments' => 'disable_comments' ]
];
$options[] = [
'name' => 'disable_comments_for_post_types',
'title' => __( 'Select post types', 'comments-plus' ),
'tags' => []
];
$options[] = [
'name' => 'disable_comments_extra_post_types',
'title' => __( 'Custom post types', 'comments-plus' ),
'tags' => []
];
$options[] = [
'name' => 'disable_comments_permanent',
'title' => __( 'Use persistent mode', 'comments-plus' ),
'tags' => []
];
$options[] = [
'name' => 'comment_text_convert_links_pseudo',
'title' => __( 'Replace external links in comments on the JavaScript code', 'comments-plus' ),
'tags' => [ 'recommended', 'seo_optimize' ]
];
$options[] = [
'name' => 'pseudo_comment_author_link',
'title' => __( 'Replace external links from comment authors on the JavaScript code', 'comments-plus' ),
'tags' => [ 'recommended', 'seo_optimize' ]
];
$options[] = [
'name' => 'remove_url_from_comment_form',
'title' => __( 'Remove field "site" in comment form', 'comments-plus' ),
'tags' => []
];
return $options;
}
add_filter( "wbcr_clearfy_group_options", 'wbcr_cmp_group_options' );
function wbcr_cmp_allow_quick_mods( $mods ) {
$mods['disable_all_comments'] = [
'title' => __( 'One click disable all comments', 'comments-plus' ),
'icon' => 'dashicons-testimonial'
];
return $mods;
}
add_filter( "wbcr_clearfy_allow_quick_mods", 'wbcr_cmp_allow_quick_mods' );
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,233 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Страница общих настроек для этого плагина.
*
* Может быть использована только, если этот плагин используется как отдельный плагин, а не как аддон
* дя плагина Clearfy. Если плагин загружен, как аддон для Clearfy, эта страница не будет подключена.
*
* Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright (c) 2018 Webraftic Ltd
*/
class WbcrCmp_CommentsPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
* {@inheritDoc}
*
* @var string
*/
public $id = "comments";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-testimonial';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* WbcrCmp_CommentsPage constructor.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Disable comments', 'comments-plus' );
$this->page_menu_short_description = __( 'Manage site comments', 'comments-plus' );
if ( ! defined( 'LOADING_COMMENTS_PLUS_AS_ADDON' ) ) {
$this->internal = false;
$this->menu_target = 'options-general.php';
$this->add_link_to_plugin_actions = true;
$this->show_search_options_form = false;
}
parent::__construct( $plugin );
}
/*public function getMenuTitle() {
return defined( 'LOADING_COMMENTS_PLUS_AS_ADDON' ) ? __( 'Comments', 'comments-plus' ) : __( 'General', 'comments-plus' );
}*/
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @return string
*/
public function getPageTitle() {
return defined( 'LOADING_COMMENTS_PLUS_AS_ADDON' ) ? __( 'Comments', 'comments-plus' ) : __( 'General', 'comments-plus' );
}
/**
* {@inheritDoc}
*
* @since 1.0.0
* @return mixed[]
*/
public function getPageOptions() {
$options = [];
$options[] = [
'type' => 'html',
'html' => '<div class="wbcr-factory-page-group-header"><strong>' . __( 'Global disabling of comments', 'comments-plus' ) . '</strong><p>' . __( 'What is the difference between these and native WordPress functions? WordPress disables comments only for new posts! Using the functions below, you can disable comments globally, even for old posts, and you can choose which post types comments to disable. The plugin also disables the comment functionality itself, which creates a certain load on the site.', 'comments-plus' ) . '</p></div>'
];
$args = [ 'public' => true ];
if ( $this->plugin->isNetworkActive() ) {
$args['_builtin'] = true;
}
$types = get_post_types( $args, 'objects' );
/*foreach( array_keys( $types ) as $type ) {
if( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) // the type doesn't support comments anyway
unset( $types[$type] );
}*/
$post_types = [];
foreach ( $types as $type_name => $type ) {
$post_types[] = [ $type_name, $type->label ];
}
$options[] = [
'type' => 'dropdown',
'name' => 'disable_comments',
'way' => 'buttons',
'title' => __( 'Disable comments', 'comments-plus' ),
'data' => [
[ 'enable_comments', __( 'Not disable', 'comments-plus' ) ],
[
'disable_comments',
__( 'Everywhere', 'comments-plus' ),
sprintf( __( 'You can delete all comments in the database by clicking on this link (<a href="%s">cleaning comments in database</a>).', 'comments-plus' ), admin_url( 'admin.php?page=delete_comments-' . $this->plugin->getPluginName() ) )
],
[
'disable_certain_post_types_comments',
__( 'On certain post types', 'comments-plus' ),
sprintf( __( 'You can delete all comments for the selected post types. Select the post types below and save the settings. After that, click the link (<a href="%s">delete all comments for the selected post types in database</a>).', 'comments-plus' ), admin_url( 'admin.php?page=delete_comments-' . $this->plugin->getPluginName() ) )
]
],
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'Everywhere - Warning: This option is global and will affect your entire site. Use it only if you want to disable comments everywhere. A complete description of what this option does is available here', 'comments-plus' ) . '<br><br>' . __( 'On certain post types - Disabling comments will also disable trackbacks and pingbacks. All comment-related fields will also be hidden from the edit/quick-edit screens of the affected posts. These settings cannot be overridden for individual posts.', 'comments-plus' ),
'default' => 'enable_comments',
'events' => [
'disable_certain_post_types_comments' => [
'show' => '.factory-control-disable_comments_for_post_types, #wbcr-clearfy-comments-base-options,.factory-control-disable_comments_permanent,.factory-control-disable_comments_extra_post_types'
],
'enable_comments' => [
'show' => '#wbcr-clearfy-comments-base-options',
'hide' => '.factory-control-disable_comments_for_post_types,.factory-control-disable_comments_permanent,.factory-control-disable_comments_extra_post_types'
],
'disable_comments' => [
'show' => '.factory-control-disable_comments_permanent',
'hide' => '.factory-control-disable_comments_for_post_types, #wbcr-clearfy-comments-base-options,.factory-control-disable_comments_extra_post_types'
]
]
];
$options[] = [
'type' => 'list',
'way' => 'checklist',
'name' => 'disable_comments_for_post_types',
'title' => __( 'Select post types', 'comments-plus' ),
'data' => $post_types,
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'Select the post types for which comments will be disabled', 'comments-plus' ),
'default' => 'post,page,attachment'
];
if ( $this->plugin->isNetworkActive() ) {
$options[] = [
'type' => 'textbox',
'name' => 'disable_comments_extra_post_types',
'title' => __( 'Custom post types', 'comments-plus' ),
'data' => $post_types,
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'Only the built-in post types appear above. If you want to disable comments on other custom post types on the entire network, you can supply a comma-separated list of post types below (use the slug that identifies the post type).', 'comments-plus' ),
'default' => ''
];
}
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'disable_comments_permanent',
'title' => __( 'Use persistent mode', 'comments-plus' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'This will make persistent changes to your database &mdash; comments will remain closed even if you later disable the plugin! You should not use it if you only want to disable comments temporarily.', 'comments-plus' ),
'default' => false
];
$options[] = [
'type' => 'div',
'id' => 'wbcr-clearfy-comments-base-options',
'items' => [
[
'type' => 'html',
'html' => '<div class="wbcr-factory-page-group-header"><strong>' . __( 'General settings for comments', 'comments-plus' ) . '</strong><p>' . __( 'These settings will help you improve SEO and reduce the amount of spam.', 'comments-plus' ) . '</p></div>'
],
[
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'remove_url_from_comment_form',
'title' => __( 'Remove field "site" in comment form', 'comments-plus' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'Tired of spam in the comments? Do visitors leave "blank" comments for the sake of a link to their site?', 'comments-plus' ) . '<br><b>Clearfy: </b>' . __( 'Removes the "Site" field from the comment form.', 'comments-plus' ) . '<br>--<br><span class="wbcr-factory-light-orange-color"> *' . __( 'Works with the standard comment form, if the form is manually written in your theme-it probably will not work!', 'comments-plus' ) . '</span>',
'default' => false
],
[
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'comment_text_convert_links_pseudo',
'title' => __( 'Replace external links in comments on the JavaScript code', 'comments-plus' ),
'layout' => [ 'hint-type' => 'icon' ],
'hint' => __( 'Superfluous external links from comments, which can be typed from a dozen and more for one article, do not bring anything good for promotion.', 'comments-plus' ) . '<br><br><b>Clearfy: </b>' . sprintf( __( 'Replaces the links of this kind of %s, on links of this kind %s', 'comments-plus' ), '<code>a href="http://yourdomain.com" rel="nofollow"</code>', '<code>span data-uri="http://yourdomain.com"</code>' ),
'default' => false
],
[
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'pseudo_comment_author_link',
'title' => __( 'Replace external links from comment authors on the JavaScript code', 'comments-plus' ),
'layout' => [ 'hint-type' => 'icon' ],
'hint' => __( 'Up to 90 percent of comments in the blog can be left for the sake of an external link. Even nofollow from page weight loss here does not help.', 'comments-plus' ) . '<br><br><b>Clearfy: </b>' . __( 'Replaces the links of the authors of comments on the JavaScript code, it is impossible to distinguish it from usual links.', 'comments-plus' ) . '<br>--<br><i>' . __( 'In some Wordpress topics this may not work.', 'comments-plus' ) . '</i>',
'default' => false
]
]
];
$formOptions = [];
$formOptions[] = [
'type' => 'form-group',
'items' => $options,
//'cssClass' => 'postbox'
];
return apply_filters( 'wbcr_cmp_comments_form_options', $formOptions );
}
}

View File

@@ -0,0 +1,513 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Страница общих настроек для этого плагина.
*
* Может быть использована только, если этот плагин используется как отдельный плагин, а не как аддон
* дя плагина Clearfy. Если плагин загружен, как аддон для Clearfy, эта страница не будет подключена.
*
* Поддерживает режим работы с мультисаймами. Вы можете увидеть эту страницу в панели настройки сети.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright (c) 2018 Webraftic Ltd
*/
class WbcrCmp_DeleteCommentsPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
* {@inheritDoc}
*
* @var string
*/
public $id = "delete_comments";
/**
* {@inheritDoc}
*
* @var string
*/
public $type = "page";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_parent_page = "comments";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-testimonial';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* WbcrCmp_DeleteCommentsPage constructor.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Comments cleaner', 'comments-plus' );
parent::__construct( $plugin );
}
/**
* {@inheritDoc}
*
* @param $notices
* @param Wbcr_Factory480_Plugin $plugin
*
* @return array
* @see libs\factory\pages\themplates\FactoryPages480_ImpressiveThemplate
*/
public function getActionNotices( $notices ) {
$notices[] = [
'conditions' => [
'wbcr_cmp_clear_comments' => 1
],
'type' => 'success',
'message' => __( 'All comments have been deleted.', 'comments-plus' )
];
$notices[] = [
'conditions' => [
'wbcr_cmp_clear_comments_error' => 1,
'wbcr_cmp_code' => 'interal_error'
],
'type' => 'danger',
'message' => __( 'An error occurred while trying to delete comments. Internal error occured. Please try again later.', 'comments-plus' )
];
return $notices;
}
public function getStats() {
if ( WCM_Plugin::app()->isNetworkActive() ) {
$stats = $this->getMultisiteStats();
} else {
$stats = $this->getSiteStats();
}
return $stats;
}
public function getMultisiteStats() {
$stats = [];
foreach ( WCM_Plugin::app()->getActiveSites() as $site ) {
switch_to_blog( $site->blog_id );
$site_stats = $this->getSiteStats();
$stats = $this->mergeStats( $stats, $site_stats );
restore_current_blog();
}
return $stats;
}
public function mergeStats( $current_stats, $new_stats ) {
if ( ! isset( $current_stats['stat_data'] ) ) {
$current_stats['stat_data'] = $new_stats['stat_data'];
} else {
$comment_fields = [ 'total_comments', 'order_notes_count', 'spamcount', 'unpcount', 'trashcount' ];
foreach ( $comment_fields as $comment_field ) {
if ( is_null( $current_stats['stat_data'][0]->$comment_field ) ) {
$current_stats['stat_data'][0]->$comment_field = 0;
}
if ( is_null( $new_stats['stat_data'][0]->$comment_field ) ) {
$new_stats['stat_data'][0]->$comment_field = 0;
}
if ( $new_stats['stat_data'][0]->$comment_field ) {
$current_stats['stat_data'][0]->$comment_field = $current_stats['stat_data'][0]->$comment_field + $new_stats['stat_data'][0]->$comment_field;
}
}
}
if ( ! isset( $current_stats['post_types'] ) ) {
$current_stats['post_types'] = $new_stats['post_types'];
} else {
foreach ( $new_stats['post_types'] as $post_type_key => $post_type ) {
if ( array_key_exists( $post_type_key, $current_stats['post_types'] ) ) {
$current_stats['post_types'][ $post_type_key ]['comments_count'] += $new_stats['post_types'][ $post_type_key ]['comments_count'];
} else {
$current_stats['post_types'][ $post_type_key ] = $new_stats['post_types'][ $post_type_key ];
}
}
}
return $current_stats;
}
public function getSiteStats() {
global $wpdb;
$stat_data = $wpdb->get_results( "SELECT count(*) as total_comments,
SUM(comment_type='order_note') as order_notes_count,
SUM(comment_approved='spam') as spamcount,
SUM(comment_approved='0') as unpcount,
SUM(comment_approved='trash') as trashcount
FROM {$wpdb->prefix}comments" );
$stat_data_by_post_type = $wpdb->get_results( "SELECT
SUM(comment_count) as type_comments_count, post_type
FROM $wpdb->posts
GROUP BY post_type" );
$types = get_post_types( [ 'public' => true ], 'objects' );
$post_types = [];
foreach ( (array) $types as $type_name => $type ) {
$comments_count = 0;
if ( ! empty( $stat_data_by_post_type ) ) {
foreach ( (array) $stat_data_by_post_type as $post_type_stat_value ) {
if ( $post_type_stat_value->post_type == $type_name ) {
$comments_count = $post_type_stat_value->type_comments_count;
}
}
}
$post_types[ $type_name ] = [ 'label' => $type->label, 'comments_count' => $comments_count ];
}
return [
'stat_data' => $stat_data,
'post_types' => $post_types
];
}
/**
* Prints the content of the page
*
* @see libs\factory\pages\themplates\FactoryPages480_ImpressiveThemplate
*/
public function showPageContent() {
$stats = $this->getStats();
$stat_data = $stats['stat_data'];
$post_types = $stats['post_types'];
?>
<script>
/**
* Select all types by one click.
*/
jQuery(document).ready(function($) {
updateCommentsCounter();
var allTypesCheckbox = $('#wbcr-cmp-all-types-checkbox');
allTypesCheckbox.click(function() {
$('.wbcr-cmp-post-type-checkbox').prop("checked", $(this).prop("checked"));
updateCommentsCounter()
});
$('.wbcr-cmp-post-type-checkbox').click(function() {
if( !$(this).prop("checked") ) {
allTypesCheckbox.prop("checked", false);
}
updateCommentsCounter();
});
$('input[name="wbcr_cmp_delete_order_notes"]').click(function() {
updateCommentsCounter();
});
$('.wbcr-cmp-delete-comments-button').click(function() {
var confrimDelete = confirm('<?php _e( 'Are you sure you want to delete comments from the database without restoring?', 'comments-plus' ); ?>');
if( !confrimDelete ) {
return false;
}
$(this).submit();
});
function updateCommentsCounter() {
var commentsCount = 0;
$('.wbcr-cmp-post-type-checkbox:checked, input[name="wbcr_cmp_delete_order_notes"]:checked').each(function() {
commentsCount += $(this).data('comments-number');
});
$('.wbcr-cmp-delete-comments-button').val('<?php _e( 'Delete ', 'comments-plus' ) ?>(' + commentsCount + ')');
}
});
</script>
<div class="wbcr-factory-page-group-header" style="margin-top:0;">
<strong><?php _e( 'Comments clearing tools', 'comments-plus' ) ?></strong>
<p>
<?php _e( 'These functions can be useful for global disabling comments or bulk cleaning spam comments.', 'comments-plus' ) ?>
</p>
</div>
<form method="post" action="<?= $this->getActionUrl( 'delete-all-comments' ) ?>" style="padding: 20px;">
<h5><?php _e( 'Remove all comments', 'comments-plus' ); ?></h5>
<p><?php _e( 'You can delete all comments in your database with one click.', 'comments-plus' ); ?></p>
<p><strong><?php _e( 'Choose post types', 'comments-plus' ); ?></strong>
<div style="height:150px; width:400px; padding:10px 10px 0; background: #fff; border:1px solid #ccc; overflow-y: scroll; overflow-x:hidden;">
<p>
<label>
<input type="checkbox" id="wbcr-cmp-all-types-checkbox" name="wbcr_cmp_post_type[]" value="all" checked/> <?php _e( 'Select all', 'comments-plus' ); ?>
</label>
</p>
<?php foreach ( (array) $post_types as $key => $type ): ?>
<p>
<label>
<input type="checkbox" data-comments-number="<?= $type['comments_count'] ?>" class="wbcr-cmp-post-type-checkbox" name="wbcr_cmp_post_type[]" value="<?= esc_attr( $key ) ?>" checked/> <?= $type['label'] ?>
(<?= $type['comments_count'] ?>)
</label>
</p>
<?php endforeach; ?>
</div>
<?php if ( class_exists( 'WooCommerce' ) ):
?>
<p style="margin:15px 0 0">
<label>
<input type="checkbox" data-comments-number="<?= $stat_data[0]->order_notes_count ?>" name="wbcr_cmp_delete_order_notes" value="1"/> <?php printf( __( 'Delete Woocommerce order notices? (%d)', 'comments-plus' ), $stat_data[0]->order_notes_count ); ?>
</label>
</p>
<?php endif;
?>
<p style="margin-top:15px;">
<input type="submit" name="wbcr_cmp_delete_all" class="button button-default wbcr-cmp-delete-comments-button" value="<?php printf( __( 'Delete (%s)', 'comments-plus' ), $stat_data[0]->total_comments ); ?>">
</p>
<?php wp_nonce_field( $this->getResultId() . '_delete_all_comments' ) ?>
</form>
<div style="padding: 20px;">
<hr/>
<h5><?php _e( 'Remove spam comments', 'comments-plus' ); ?></h5>
<p><?php _e( 'You can remove only spam comments from the database with one click.', 'comments-plus' ); ?></p>
<a href="<?= wp_nonce_url( $this->getActionUrl( 'delete-spam-comments' ), $this->getResultId() . '_delete_spam_comments' ) ?>" class="button button-default wbcr-cmp-delete-comments-button">
<?php printf( __( 'Delete (%d)', 'comments-plus' ), $stat_data[0]->spamcount ); ?>
</a>
<hr/>
<h5><?php _e( 'Remove unapproved comments', 'comments-plus' ); ?></h5>
<p><?php _e( 'You can remove only unapproved comments from the database with one click.', 'comments-plus' ); ?></p>
<a href="<?= wp_nonce_url( $this->getActionUrl( 'delete-unaproved-comments' ), $this->getResultId() . '_delete_unaproved_comments' ) ?>" class="button button-default wbcr-cmp-delete-comments-button">
<?php printf( __( 'Delete (%d)', 'comments-plus' ), $stat_data[0]->unpcount ); ?>
</a>
<hr/>
<h5><?php _e( 'Remove trashed comments', 'comments-plus' ); ?></h5>
<p><?php _e( 'You can remove only trashed comments from the database with one click.', 'comments-plus' ); ?></p>
<a href="<?= wp_nonce_url( $this->getActionUrl( 'delete-trash-comments' ), $this->getResultId() . '_delete_trash_comments' ) ?>" class="button button-default wbcr-cmp-delete-comments-button">
<?php printf( __( 'Delete (%d)', 'comments-plus' ), $stat_data[0]->trashcount ); ?>
</a>
</div>
<?php
}
/**
* @return bool
*/
protected function deleteAllComments() {
global $wpdb;
$delete_order_notes = $this->request->post( 'wbcr_cmp_delete_order_notes', false, 'intval' );
if ( $wpdb->query( "TRUNCATE $wpdb->commentmeta" ) != false ) {
$delete_all_sql = "TRUNCATE $wpdb->comments";
if ( class_exists( 'WooCommerce' ) ) {
if ( ! $delete_order_notes ) {
$delete_all_sql = "DELETE FROM $wpdb->comments WHERE comment_type != 'order_note'";
}
}
if ( $wpdb->query( $delete_all_sql ) != false ) {
$wpdb->query( "UPDATE $wpdb->posts SET comment_count = 0 WHERE post_author != 0" );
$wpdb->query( "OPTIMIZE TABLE $wpdb->commentmeta" );
$wpdb->query( "OPTIMIZE TABLE $wpdb->comments" );
return true;
}
}
return false;
}
/**
* @param string $post_type
*
* @return bool
*/
protected function deleteCommentsByPostType( $post_type = 'post' ) {
global $wpdb;
$delete_order_notes = $this->request->post( 'wbcr_cmp_delete_order_notes', false, 'intval' );
$wpdb->query( "DELETE cmeta FROM $wpdb->commentmeta cmeta INNER JOIN $wpdb->comments comments ON cmeta.comment_id=comments.comment_ID INNER JOIN $wpdb->posts posts ON comments.comment_post_ID=posts.ID WHERE posts.post_type = '%s'" );
$delete_certain_sql = "DELETE comments FROM $wpdb->comments comments INNER JOIN $wpdb->posts posts ON comments.comment_post_ID=posts.ID WHERE posts.post_type = '%s'";
if ( class_exists( 'WooCommerce' ) ) {
if ( ! $delete_order_notes ) {
$delete_certain_sql .= " and comment_type != 'order_note'";
}
}
$wpdb->query( $wpdb->prepare( $delete_certain_sql, $post_type ) );
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET comment_count = 0 WHERE post_author != 0 AND post_type = '%s'", $post_type ) );
return true;
}
/**
* @param $post_types
*
* @return bool
*/
protected function deleteCommentsByPostTypes( $post_types ) {
global $wpdb;
if ( empty( $post_types ) || ! is_array( $post_types ) ) {
return false;
}
foreach ( $post_types as $post_type ) {
$this->deleteCommentsByPostType( $post_type );
}
$wpdb->query( "OPTIMIZE TABLE $wpdb->commentmeta" );
$wpdb->query( "OPTIMIZE TABLE $wpdb->comments" );
return true;
}
/**
* This action deletes all comments from the database without restoring.
*/
public function deleteAllCommentsAction() {
check_admin_referer( $this->getResultId() . '_delete_all_comments' );
if ( isset( $_POST['wbcr_cmp_delete_all'] ) ) {
$post_types = $this->request->post( 'wbcr_cmp_post_type', [], true );
$result = false;
if ( empty( $post_types ) || in_array( 'all', $post_types ) ) {
if ( WCM_Plugin::app()->isNetworkActive() ) {
foreach ( WCM_Plugin::app()->getActiveSites() as $site ) {
switch_to_blog( $site->blog_id );
$result = $this->deleteAllComments();
restore_current_blog();
}
} else {
$result = $this->deleteAllComments();
}
} else {
if ( WCM_Plugin::app()->isNetworkActive() ) {
foreach ( WCM_Plugin::app()->getActiveSites() as $site ) {
switch_to_blog( $site->blog_id );
$result = $this->deleteCommentsByPostTypes( $post_types );
restore_current_blog();
}
} else {
$result = $this->deleteCommentsByPostTypes( $post_types );
}
}
if ( $result ) {
$this->redirectToAction( 'index', [
'wbcr_cmp_clear_comments' => '1'
] );
} else {
$this->redirectToAction( 'index', [
'wbcr_cmp_clear_comments_error' => '1',
'wbcr_cmp_code' => 'interal_error',
] );
}
}
$this->redirectToAction( 'index' );
}
/**
* The basic function of deleting comments.
*
* @param int|string $type
*/
public function deleteComments( $type = 0 ) {
if ( in_array( $type, [ 'spam', 'trash', 0 ] ) ) {
if ( WCM_Plugin::app()->isNetworkActive() ) {
foreach ( WCM_Plugin::app()->getActiveSites() as $site ) {
switch_to_blog( $site->blog_id );
$this->deleteCommentsByType( $type );
restore_current_blog();
}
} else {
$this->deleteCommentsByType( $type );
}
$this->redirectToAction( 'index', [
'wbcr_cmp_clear_comments' => '1'
] );
}
}
/**
* @param int $type
*
* @return false|int
*/
private function deleteCommentsByType( $type = 0 ) {
global $wpdb;
$wpdb->query( "DELETE cmeta
FROM $wpdb->commentmeta cmeta
INNER JOIN {$wpdb->comments} comments ON cmeta.comment_id=comments.comment_ID
WHERE comment_approved='{$type}'" );
$res = $wpdb->query( "DELETE FROM {$wpdb->comments} WHERE comment_approved='{$type}'" );
if ( $res ) {
$wpdb->query( "OPTIMIZE TABLE {$wpdb->comments}" );
$wpdb->query( "OPTIMIZE TABLE {$wpdb->commentmeta}" );
}
return $res;
}
/**
* This action deletes spam comments
*/
public function deleteSpamCommentsAction() {
check_admin_referer( $this->getResultId() . '_delete_spam_comments' );
$this->deleteComments( 'spam' );
}
/**
* This action deletes unaproved comments
*/
public function deleteUnaprovedCommentsAction() {
check_admin_referer( $this->getResultId() . '_delete_unaproved_comments' );
$this->deleteComments();
}
/**
* This action deletes trash comments
*/
public function deleteTrashCommentsAction() {
check_admin_referer( $this->getResultId() . '_delete_trash_comments' );
$this->deleteComments( 'trash' );
}
}

View File

@@ -0,0 +1,24 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Рекламная страница.
*
* Используется для рекламы плагина Clearfy. Пользователь может изучить все возможности плагина Clearfy
* и перейти на лендинг плагина, чтобы скачать и попробовать его.
*
* Может быть использована только, если этот плагин используется как отдельный плагин, а не как аддон
* для плагина Clearfy. Если плагин загружен, как аддон для Clearfy, эта страница не будет подключена.
*
* НЕ поддерживает режим работы с мультисаймами!
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright (c) 2018 Webraftic Ltd
*/
class WbcrCmp_MoreFeaturesPage extends \WBCR\Factory_Templates_134\Pages\MoreFeatures {
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,16 @@
/**
* Url span
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 17.11.2017, Webcraftic
* @version 1.0
*/
.wbcr-clearfy-pseudo-link {
color: #008acf;
cursor: pointer;
text-decoration: underline;
}
.wbcr-clearfy-pseudo-link:hover {
text-decoration: none;
}

View File

@@ -0,0 +1,18 @@
/**
* Url span
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 17.11.2017, Webcraftic
* @version 1.0
*/
(function($) {
'use strict';
$(function() {
$(document).on("click", ".wbcr-clearfy-pseudo-link", function() {
window.open($(this).data("uri"));
});
})
})(jQuery);

View File

@@ -0,0 +1,52 @@
<?php
/**
* Этот файл инициализирует этот плагин, как аддон для плагина Clearfy.
*
* Файл будет подключен только в плагине Clearfy, используя особый вариант загрузки. Это более простое решение
* пришло на смену встроенной системы подключения аддонов в фреймворке.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 2018 Webraftic Ltd
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! defined( 'WCM_PLUGIN_ACTIVE' ) ) {
define( 'WCM_PLUGIN_VERSION', '1.2.0' );
define( 'WCM_TEXT_DOMAIN', 'comments-plus' );
define( 'WCM_PLUGIN_ACTIVE', true );
// Этот плагин загружен, как аддон для плагина Clearfy
define( 'LOADING_COMMENTS_PLUS_AS_ADDON', true );
if ( ! defined( 'WCM_PLUGIN_DIR' ) ) {
define( 'WCM_PLUGIN_DIR', dirname( __FILE__ ) );
}
if ( ! defined( 'WCM_PLUGIN_BASE' ) ) {
define( 'WCM_PLUGIN_BASE', plugin_basename( __FILE__ ) );
}
if ( ! defined( 'WCM_PLUGIN_URL' ) ) {
define( 'WCM_PLUGIN_URL', plugins_url( '', __FILE__ ) );
}
try {
// Global scripts
require_once( WCM_PLUGIN_DIR . '/includes/3rd-party/class-clearfy-plugin.php' );
new WCM_Plugin();
} catch( Exception $e ) {
$wcm_plugin_error_func = function () use ( $e ) {
$error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Webcraftic Disable Comments', $e->getMessage(), $e->getCode() );
echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
};
add_action( 'admin_notices', $wcm_plugin_error_func );
add_action( 'network_admin_notices', $wcm_plugin_error_func );
}
}

View File

@@ -0,0 +1,137 @@
<?php
/**
* Plugin Name: Webcraftic Disable Comments
* Plugin URI: https://webcraftic.com
* Description: Allows administrators to globally disable comments on their site. Comments can be disabled for individual record types.
* Author: Webcraftic <wordpress.webraftic@gmail.com>
* Version: 1.2.0
* Text Domain: comments-plus
* Domain Path: /languages/
* Author URI: https://webcraftic.com
* Framework Version: FACTORY_480_VERSION
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Developers who contributions in the development plugin:
*
* Alexander Kovalev
* ---------------------------------------------------------------------------------
* Full plugin development.
*
* Email: alex.kovalevv@gmail.com
* Personal card: https://alexkovalevv.github.io
* Personal repo: https://github.com/alexkovalevv
* ---------------------------------------------------------------------------------
*/
/**
* -----------------------------------------------------------------------------
* CHECK REQUIREMENTS
* Check compatibility with php and wp version of the user's site. As well as checking
* compatibility with other plugins from Webcraftic.
* -----------------------------------------------------------------------------
*/
require_once( dirname( __FILE__ ) . '/libs/factory/core/includes/class-factory-requirements.php' );
// @formatter:off
$wcm_plugin_info = [
'prefix' => 'wbcr_comments_plus_', // wbcr_cmp
'plugin_name' => 'wbcr_comments_plus',
'plugin_title' => 'Webcraftic Disable comments',
// PLUGIN SUPPORT
'support_details' => [
'url' => 'https://webcraftic.com',
'pages_map' => [
'support' => 'support', // {site}/support
'docs' => 'docs' // {site}/docs
]
],
// PLUGIN SUBSCRIBE FORM
'subscribe_widget' => true,
'subscribe_settings' => [ 'group_id' => '105408898' ],
// PLUGIN ADVERTS
'render_adverts' => true,
'adverts_settings' => [
'dashboard_widget' => true, // show dashboard widget (default: false)
'right_sidebar' => true, // show adverts sidebar (default: false)
'notice' => true, // show notice message (default: false)
],
// FRAMEWORK MODULES
'load_factory_modules' => [
[ 'libs/factory/bootstrap', 'factory_bootstrap_482', 'admin' ],
[ 'libs/factory/forms', 'factory_forms_480', 'admin' ],
[ 'libs/factory/pages', 'factory_pages_480', 'admin' ],
[ 'libs/factory/templates', 'factory_templates_134', 'all' ],
[ 'libs/factory/adverts', 'factory_adverts_159', 'admin' ]
]
];
$wcm_compatibility = new Wbcr_Factory480_Requirements( __FILE__, array_merge( $wcm_plugin_info, [
'plugin_already_activate' => defined( 'WCM_PLUGIN_ACTIVE' ),
'required_php_version' => '5.4',
'required_wp_version' => '4.2.0',
'required_clearfy_check_component' => false
] ) );
/**
* If the plugin is compatible, then it will continue its work, otherwise it will be stopped,
* and the user will throw a warning.
*/
if ( ! $wcm_compatibility->check() ) {
return;
}
/**
* -----------------------------------------------------------------------------
* CONSTANTS
* Install frequently used constants and constants for debugging, which will be
* removed after compiling the plugin.
* -----------------------------------------------------------------------------
*/
// This plugin is activated
define( 'WCM_PLUGIN_ACTIVE', true );
define( 'WCM_PLUGIN_VERSION', $wcm_compatibility->get_plugin_version() );
define( 'WCM_PLUGIN_DIR', dirname( __FILE__ ) );
define( 'WCM_PLUGIN_BASE', plugin_basename( __FILE__ ) );
define( 'WCM_PLUGIN_URL', plugins_url( '', __FILE__ ) );
/**
* -----------------------------------------------------------------------------
* PLUGIN INIT
* -----------------------------------------------------------------------------
*/
require_once( WCM_PLUGIN_DIR . '/libs/factory/core/boot.php' );
require_once( WCM_PLUGIN_DIR . '/includes/class-plugin.php' );
try {
new WCM_Plugin( __FILE__, array_merge( $wcm_plugin_info, [
'plugin_version' => WCM_PLUGIN_VERSION,
'plugin_text_domain' => $wcm_compatibility->get_text_domain(),
] ) );
} catch ( Exception $e ) {
// Plugin wasn't initialized due to an error
define( 'WCM_PLUGIN_THROW_ERROR', true );
$wcm_plugin_error_func = function () use ( $e ) {
$error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Webcraftic Disable Comments', $e->getMessage(), $e->getCode() );
echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
};
add_action( 'admin_notices', $wcm_plugin_error_func );
add_action( 'network_admin_notices', $wcm_plugin_error_func );
}
// @formatter:on

View File

@@ -0,0 +1,112 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Disable comments
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright (c) 2018 Webraftic Ltd
*/
class WCM_Plugin {
/**
* @see self::app()
* @var WCL_Plugin
*/
private static $app;
/**
* Конструктор
*
* Применяет конструктор родительского класса и записывает экземпляр текущего класса в свойство $app.
* Подробнее о свойстве $app см. self::app()
*
* @param string $plugin_path
* @param array $data
*
* @throws Exception
*/
public function __construct() {
if ( ! class_exists( 'WCL_Plugin' ) ) {
throw new Exception( 'Plugin Clearfy is not installed!' );
}
self::$app = WCL_Plugin::app();
$this->global_scripts();
if ( is_admin() ) {
$this->admin_scripts();
}
add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] );
// Wordpress 6.7 fix
add_action( 'init', function () {
if ( is_admin() ) {
$this->register_pages();
}
} );
}
/**
* Статический метод для быстрого доступа к интерфейсу плагина.
*
* Позволяет разработчику глобально получить доступ к экземпляру класса плагина в любом месте
* плагина, но при этом разработчик не может вносить изменения в основной класс плагина.
*
* Используется для получения настроек плагина, информации о плагине, для доступа к вспомогательным
* классам.
*
* @return WCL_Plugin
*/
public static function app() {
return self::$app;
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
public function plugins_loaded() {
}
/**
* Регистрирует классы страниц в плагине
*
* Мы указываем плагину, где найти файлы страниц и какое имя у их класса. Чтобы плагин
* выполнил подключение классов страниц. После регистрации, страницы будут доступные по url
* и в меню боковой панели администратора. Регистрируемые страницы будут связаны с текущим плагином
* все операции выполняемые внутри классов страниц, имеют отношение только текущему плагину.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
private function register_pages() {
$admin_path = WCM_PLUGIN_DIR . '/admin/pages';
self::app()->registerPage( 'WbcrCmp_CommentsPage', $admin_path . '/class-page-comments.php' );
self::app()->registerPage( 'WbcrCmp_DeleteCommentsPage', $admin_path . '/class-page-delete-comments.php' );
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function admin_scripts() {
require( WCM_PLUGIN_DIR . '/admin/boot.php' );
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function global_scripts() {
require( WCM_PLUGIN_DIR . '/includes/boot.php' );
require( WCM_PLUGIN_DIR . '/includes/classes/class-configurate-comments.php' );
new WbcrCmp_ConfigComments( self::$app );
}
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,51 @@
<?php
/**
* Admin boot
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright Webcraftic 25.05.2017
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Получает список отключенных типов записей
*
* @return array|bool|mixed|void
*/
function wbcr_cmp_get_disabled_post_types() {
$post_types = WCM_Plugin::app()->getPopulateOption( 'disable_comments_for_post_types' );
if ( WCM_Plugin::app()->getPopulateOption( 'disable_comments', 'enable_comments' ) == 'disable_comments' ) {
$args = [ 'public' => true ];
if ( WCM_Plugin::app()->isNetworkActive() ) {
$args['_builtin'] = true;
}
$all_post_types = get_post_types( $args, 'objects' );
return array_keys( $all_post_types );
}
// Not all extra_post_types might be registered on this particular site
/*if( $this->networkactive ) {
foreach( (array) $this->options['extra_post_types'] as $extra ) {
if( post_type_exists( $extra ) ) {
$types[] = $extra;
}
}
}*/
if ( is_array( $post_types ) ) {
return $post_types;
}
return explode( ',', $post_types );
}

View File

@@ -0,0 +1,119 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Plugin class
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>
* @copyright (c) 19.02.2018, Webcraftic
*/
class WCM_Plugin extends Wbcr_Factory480_Plugin {
/**
* @see self::app()
* @var Wbcr_Factory480_Plugin
*/
private static $app;
/**
* @since 3.1.0
* @var array
*/
private $plugin_data;
/**
* Конструктор
*
* Применяет конструктор родительского класса и записывает экземпляр текущего класса в свойство $app.
* Подробнее о свойстве $app см. self::app()
*
* @param string $plugin_path
* @param array $data
*
* @throws Exception
*/
public function __construct( $plugin_path, $data ) {
parent::__construct( $plugin_path, $data );
self::$app = $this;
$this->plugin_data = $data;
$this->global_scripts();
if ( is_admin() ) {
$this->admin_scripts();
}
add_action( 'plugins_loaded', [ $this, 'plugins_loaded' ] );
// Wordpress 6.7 fix
add_action( 'init', function () {
if ( is_admin() ) {
$this->register_pages();
}
} );
}
/**
* Статический метод для быстрого доступа к интерфейсу плагина.
*
* Позволяет разработчику глобально получить доступ к экземпляру класса плагина в любом месте
* плагина, но при этом разработчик не может вносить изменения в основной класс плагина.
*
* Используется для получения настроек плагина, информации о плагине, для доступа к вспомогательным
* классам.
*
* @return \Wbcr_Factory480_Plugin|\WCM_Plugin
*/
public static function app() {
return self::$app;
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
public function plugins_loaded() {
}
/**
* Регистрирует классы страниц в плагине
*
* Мы указываем плагину, где найти файлы страниц и какое имя у их класса. Чтобы плагин
* выполнил подключение классов страниц. После регистрации, страницы будут доступные по url
* и в меню боковой панели администратора. Регистрируемые страницы будут связаны с текущим плагином
* все операции выполняемые внутри классов страниц, имеют отношение только текущему плагину.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
private function register_pages() {
$admin_path = WCM_PLUGIN_DIR . '/admin/pages';
self::app()->registerPage( 'WbcrCmp_CommentsPage', $admin_path . '/class-page-comments.php' );
self::app()->registerPage( 'WbcrCmp_DeleteCommentsPage', $admin_path . '/class-page-delete-comments.php' );
self::app()->registerPage( 'WbcrCmp_MoreFeaturesPage', $admin_path . '/class-page-more-features.php' );
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function admin_scripts() {
require( WCM_PLUGIN_DIR . '/admin/boot.php' );
}
/**
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function global_scripts() {
require( WCM_PLUGIN_DIR . '/includes/boot.php' );
require( WCM_PLUGIN_DIR . '/includes/classes/class-configurate-comments.php' );
new WbcrCmp_ConfigComments( self::$app );
}
}

View File

@@ -0,0 +1,338 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* This class configures the parameters advanced
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
*
* @copyright (c) 2017 Webraftic Ltd
*/
class WbcrCmp_ConfigComments extends WBCR\Factory_Templates_134\Configurate {
private $modified_types = [];
/**
* @param Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
parent::__construct( $plugin );
$this->plugin = $plugin;
}
public function registerActionsAndFilters() {
// These need to happen now
if ( $this->isDisabledAllPosts() ) {
add_action( 'widgets_init', [ $this, 'disableRcWidget' ] );
add_action( 'template_redirect', [ $this, 'filterQuery' ], 9 ); // before redirect_canonical
// Admin bar filtering has to happen here since WP 3.6
add_action( 'template_redirect', [ $this, 'filterAdminBar' ] );
add_action( 'admin_init', [ $this, 'filterAdminBar' ] );
} else {
if ( $this->getPopulateOption( 'comment_text_convert_links_pseudo' ) || $this->getPopulateOption( 'pseudo_comment_author_link' ) ) {
add_action( 'wp_enqueue_scripts', [ $this, 'assetsUrlSpanScripts' ] );
}
if ( $this->getPopulateOption( 'comment_text_convert_links_pseudo' ) ) {
add_filter( 'comment_text', [ $this, 'commentTextConvertLinksPseudo' ] );
}
if ( $this->getPopulateOption( 'pseudo_comment_author_link' ) ) {
add_filter( 'get_comment_author_link', [ $this, 'pseudoCommentAuthorLink' ], 100, 3 );
}
if ( $this->getPopulateOption( 'remove_url_from_comment_form' ) ) {
add_filter( 'comment_form_default_fields', [ $this, 'removeUrlFromCommentForm' ] );
}
}
// These can happen later
//add_action('plugins_loaded', array($this, 'register_text_domain'));
add_action( 'wp_loaded', [ $this, 'initWploadedFilters' ] );
}
/*
* Remove comment links from the admin bar in a multisite network.
*/
public function removeNetworkCommentLinks( $wp_admin_bar ) {
if ( $this->plugin->isNetworkActive() && is_user_logged_in() ) {
foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
$wp_admin_bar->remove_menu( 'blog-' . $blog->userblog_id . '-c' );
}
} else {
// We have no way to know whether the plugin is active on other sites, so only remove this one
$wp_admin_bar->remove_menu( 'blog-' . get_current_blog_id() . '-c' );
}
}
private function isDisabledAllPosts() {
return $this->getPopulateOption( 'disable_comments', 'enable_comments' ) == 'disable_comments';
}
private function isDisabledCertainPostTypes() {
return $this->getPopulateOption( 'disable_comments', 'enable_comments' ) == 'disable_certain_post_types_comments';
}
private function isEnabledComments() {
return $this->getPopulateOption( 'disable_comments', 'enable_comments' ) == 'enable_comments';
}
/*
* Get an array of disabled post type.
*/
private function getDisabledPostTypes() {
return wbcr_cmp_get_disabled_post_types();
}
/*
* Check whether comments have been disabled on a given post type.
*/
private function isPostTypeDisabled( $type ) {
return $this->isDisabledCertainPostTypes() && in_array( $type, $this->getDisabledPostTypes() );
}
public function initWploadedFilters() {
$disabled_post_types = $this->getDisabledPostTypes();
if ( ! empty( $disabled_post_types ) && ! $this->isEnabledComments() ) {
foreach ( $disabled_post_types as $type ) {
// we need to know what native support was for later
if ( post_type_supports( $type, 'comments' ) ) {
$this->modified_types[] = $type;
remove_post_type_support( $type, 'comments' );
remove_post_type_support( $type, 'trackbacks' );
}
}
add_filter( 'comments_array', [ $this, 'filterExistingComments' ], 20, 2 );
add_filter( 'comments_open', [ $this, 'filterCommentStatus' ], 20, 2 );
add_filter( 'pings_open', [ $this, 'filterCommentStatus' ], 20, 2 );
}
// Filters for the admin only
if ( is_admin() ) {
add_action( 'admin_print_footer_scripts', [ $this, 'discussionNotice' ] );
// if only certain types are disabled, remember the original post status
if ( ! $this->isDisabledAllPosts() ) {
add_action( 'edit_form_advanced', [ $this, 'editFormInputs' ] );
add_action( 'edit_page_form', [ $this, 'editFormInputs' ] );
} else {
add_action( 'admin_menu', [ $this, 'filterAdminMenu' ], 9999 ); // do this as late as possible
add_action( 'admin_print_footer_scripts-index.php', [ $this, 'dashboardJs' ] );
add_action( 'wp_dashboard_setup', [ $this, 'filterDashboard' ] );
add_filter( 'pre_option_default_pingback_flag', '__return_zero' );
}
} // Filters for front end only
else {
add_action( 'template_redirect', [ $this, 'checkCommentTemplate' ] );
if ( $this->isDisabledAllPosts() ) {
add_filter( 'feed_links_show_comments_feed', '__return_false' );
}
}
}
/*
* Replace the theme's comment template with a blank one.
* To prevent this, define DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE
* and set it to True
*/
public function checkCommentTemplate() {
if ( is_singular() && ( $this->isDisabledAllPosts() || $this->isPostTypeDisabled( get_post_type() ) ) ) {
if ( ! defined( 'DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE' ) || DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE == true ) {
// Kill the comments template.
add_filter( 'comments_template', [ $this, 'dummyCommentsTemplate' ], 20 );
}
// Remove comment-reply script for themes that include it indiscriminately
wp_deregister_script( 'comment-reply' );
// feed_links_extra inserts a comments RSS link
remove_action( 'wp_head', 'feed_links_extra', 3 );
}
}
public function dummyCommentsTemplate() {
return WCM_PLUGIN_DIR . '/includes/comments-template.php';
}
/*
* Issue a 403 for all comment feed requests.
*/
public function filterQuery() {
if ( is_comment_feed() ) {
wp_die( __( 'Comments are closed.' ), '', [ 'response' => 403 ] );
}
}
/*
* Remove comment links from the admin bar.
*/
public function filterAdminBar() {
if ( is_admin_bar_showing() ) {
// Remove comments links from admin bar
remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
}
if ( is_multisite() ) {
add_action( 'admin_bar_menu', [ $this, 'removeNetworkCommentLinks' ], 500 );
}
}
public function editFormInputs() {
global $post;
// Without a dicussion meta box, comment_status will be set to closed on new/updated posts
if ( in_array( $post->post_type, $this->modified_types ) ) {
echo '<input type="hidden" name="comment_status" value="' . $post->comment_status . '" /><input type="hidden" name="ping_status" value="' . $post->ping_status . '" />';
}
}
public function discussionNotice() {
$disabled_post_types = $this->getDisabledPostTypes();
if ( get_current_screen()->id == 'options-discussion' && ! empty( $disabled_post_types ) ) {
$names = [];
foreach ( $disabled_post_types as $type ) {
$type_object = get_post_type_object( $type );
if ( empty( $type_object ) ) {
continue;
}
$names[ $type ] = $type_object->labels->name;
}
?>
<script>
jQuery(document).ready(function($) {
$(".wrap h2").first().after(<?php echo json_encode( '<div style="color: #900"><p>' . sprintf( __( 'Note: The <em>%s</em> plugin is currently active, and comments are completely disabled on: %s. Many of the settings below will not be applicable for those post types.', 'comments-plus' ), $this->plugin->getPluginTitle(), implode( ', ', $names ) ) . '</p></div>' );?>);
});
</script>
<?php
}
}
public function filterAdminMenu() {
global $pagenow;
if ( $pagenow == 'comment.php' || $pagenow == 'edit-comments.php' || $pagenow == 'options-discussion.php' ) {
wp_die( __( 'Comments are closed.' ), '', [ 'response' => 403 ] );
}
remove_menu_page( 'edit-comments.php' );
remove_submenu_page( 'options-general.php', 'options-discussion.php' );
}
public function filterDashboard() {
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
}
public function dashboardJs() {
echo '<script>
jQuery(function($){
$("#dashboard_right_now .comment-count, #latest-comments").hide();
$("#welcome-panel .welcome-comments").parent().hide();
});
</script>';
}
public function filterExistingComments( $comments, $post_id ) {
$post = get_post( $post_id );
return ( $this->isDisabledAllPosts() || $this->isPostTypeDisabled( $post->post_type ) ) ? [] : $comments;
}
public function filterCommentStatus( $open, $post_id ) {
$post = get_post( $post_id );
return ( $this->isDisabledAllPosts() || $this->isPostTypeDisabled( $post->post_type ) ) ? false : $open;
}
public function disableRcWidget() {
unregister_widget( 'WP_Widget_Recent_Comments' );
}
/**
* Convert links in comment text into span pseudo links
*
* @param $comment_text
*
* @return mixed
*/
public function commentTextConvertLinksPseudo( $comment_text ) {
return $this->convertLinksPseudo( $comment_text );
}
/**
* Convert links into span pseudo links
*
* @param $text
*
* @return mixed
*/
public function convertLinksPseudo( $text ) {
return preg_replace_callback( '/<a[^>]+href=[\'"](https?:\/\/[^"\']+)[\'"][^>]+>(.*?)<\/a>/i', [
$this,
'replaceLinks'
], $text );
}
public function replaceLinks( $matches ) {
if ( $matches[1] == get_home_url() ) {
return $matches[0];
}
return '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $matches[1] . '" > ' . $matches[2] . '</span>';
}
/**
* Convert author link to pseudo link
*
* @return string
*/
public function pseudoCommentAuthorLink( $return, $author, $comment_ID ) {
$url = get_comment_author_url( $comment_ID );
$author = get_comment_author( $comment_ID );
if ( empty( $url ) || 'http://' == $url ) {
$return = $author;
} else {
$return = '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $url . '">' . $author . '</span>';
}
return $return;
}
/**
* Remove url field from comment form
*
* @param $fields
*
* @return mixed
*/
public function removeUrlFromCommentForm( $fields ) {
if ( isset( $fields['url'] ) ) {
unset( $fields['url'] );
}
return $fields;
}
// todo: Убрать это грязное решение со скриптами.
public function assetsUrlSpanScripts() {
if ( ! is_singular() ) {
return;
}
wp_enqueue_style( 'wbcr-comments-plus-url-span', WCM_PLUGIN_URL . '/assets/css/url-span.css', [], $this->plugin->getPluginVersion() );
wp_enqueue_script( 'wbcr-comments-plus-url-span', WCM_PLUGIN_URL . '/assets/js/url-span.js', [ 'jquery' ], $this->plugin->getPluginVersion(), true );
}
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,4 @@
<?php
/* Dummy comments template file.
* This replaces the theme's comment template when comments are disabled everywhere
*/

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,369 @@
# Translation of Plugins - Clearfy in Spanish (Spain)
# This file is distributed under the same license as the Plugins - Clearfy WordPress optimization plugin and disable ultimate tweaker - Development (trunk) package.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2019-04-28 06:24+0300\n"
"PO-Revision-Date: 2019-04-28 06:24+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.1.1\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.1.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: libs\n"
"X-Poedit-SearchPathExcluded-1: components\n"
"X-Poedit-SearchPathExcluded-2: cache\n"
#: admin/boot.php:72
msgid "Disable comments on the entire site"
msgstr "Deshabilitar comentarios en todo el sitio"
#: admin/boot.php:78 admin/pages/comments.php:127
msgid "Select post types"
msgstr "Seleccionar tipos publicaciones"
#: admin/boot.php:83 admin/pages/comments.php:138
msgid "Custom post types"
msgstr "Custom post types"
#: admin/boot.php:88 admin/pages/comments.php:149
msgid "Use persistent mode"
msgstr "Usa el modo persistente"
#: admin/boot.php:93 admin/pages/comments.php:176
msgid "Replace external links in comments on the JavaScript code"
msgstr "Reemplazar enlaces externos decomentarios en el código JavaScript"
#: admin/boot.php:98 admin/pages/comments.php:185
msgid "Replace external links from comment authors on the JavaScript code"
msgstr ""
"Reemplace los enlaces externos de los autores en comentarios del código "
"JavaScript"
#: admin/boot.php:103 admin/pages/comments.php:167
msgid "Remove field \"site\" in comment form"
msgstr "Eliminar campo \"sitio \" en formulario de comentario"
#: admin/boot.php:115
msgid "One click disable all comments"
msgstr "Un clic deshabilita todos los comentarios"
#: admin/boot.php:136
msgid "Get ultimate plugin free"
msgstr "Obtener el ultimate plugin gratis"
#: admin/pages/comments.php:37 admin/pages/comments.php:91
msgid "Disable comments"
msgstr "Desactivar Comentarios"
#: admin/pages/comments.php:38
msgid "Manage site comments"
msgstr "Administrar los comentarios del sitio"
#: admin/pages/comments.php:51
msgid "Comments"
msgstr "Comentarios"
#: admin/pages/comments.php:51
msgid "General"
msgstr "General"
#: admin/pages/comments.php:66
msgid "Global disabling of comments"
msgstr "Deshabilitación global de comentarios."
#: admin/pages/comments.php:66
msgid ""
"What is the difference between these and native WordPress functions? "
"WordPress disables comments only for new posts! Using the functions below, "
"you can disable comments globally, even for old posts, and you can choose "
"which post types comments to disable. The plugin also disables the comment "
"functionality itself, which creates a certain load on the site."
msgstr ""
"¿Cuál es la diferencia entre estas y las funciones nativas de WordPress? "
"¡WordPress deshabilita comentarios solo para nuevas publicaciones! Al usar "
"las funciones a continuación, puede deshabilitar los comentarios "
"globalmente, incluso para las publicaciones anteriores, y puede elegir qué "
"tipo de comentarios deshabilitar. El plugin también desactiva la "
"funcionalidad de comentarios, lo que crea una cierta carga en el sitio."
#: admin/pages/comments.php:93
msgid "Not disable"
msgstr "No deshabilitar"
#: admin/pages/comments.php:96
msgid "Everywhere"
msgstr "Donde sea"
#: admin/pages/comments.php:97
#, php-format
msgid ""
"You can delete all comments in the database by clicking on this link (<a "
"href=\"%s\">cleaning comments in database</a>)."
msgstr ""
"Puede eliminar los comentarios en la base de datos haciendo clic en este "
"enlace (<a href=\"%s\">limpiando comentarios en la base de datos</a>)."
#: admin/pages/comments.php:101
msgid "On certain post types"
msgstr "Para ciertos tipos de correos"
#: admin/pages/comments.php:102
#, php-format
msgid ""
"You can delete all comments for the selected post types. Select the post "
"types below and save the settings. After that, click the link (<a href=\"%s"
"\">delete all comments for the selected post types in database</a>)."
msgstr ""
"Puede eliminar los comentarios para los tipos de publicación seleccionados. "
"Seleccione los tipos de publicación y guarde la configuración. Después, haga "
"clic en el enlace (<a href=\"%s\">eliminar todos los comentarios de los "
"tipos de publicaciones seleccionados en la base de datos</a>)."
#: admin/pages/comments.php:106
msgid ""
"Everywhere - Warning: This option is global and will affect your entire "
"site. Use it only if you want to disable comments everywhere. A complete "
"description of what this option does is available here"
msgstr ""
"Donde sea - Advertencia: Esta opción es global y afectará a todo su sitio. "
"Úselo solo si desea deshabilitar comentarios en todas partes. Una "
"descripción completa de lo que hace esta opción está disponible aquí."
#: admin/pages/comments.php:106
msgid ""
"On certain post types - Disabling comments will also disable trackbacks and "
"pingbacks. All comment-related fields will also be hidden from the edit/"
"quick-edit screens of the affected posts. These settings cannot be "
"overridden for individual posts."
msgstr ""
"Para ciertas publicaciones, al deshabilitar los comentarios, se deshabilita "
"los trackbacks y los pingbacks. Los campos relacionados con comentarios se "
"ocultarán de las pantallas de edición/edición-rápida de las publicaciones "
"afectadas. Estas configuraciones no se pueden anular para publicaciones "
"individuales."
#: admin/pages/comments.php:130
msgid "Select the post types for which comments will be disabled"
msgstr ""
"Seleccione los tipos de publicación para los cuales se deshabilitarán los "
"comentarios."
#: admin/pages/comments.php:141
msgid ""
"Only the built-in post types appear above. If you want to disable comments "
"on other custom post types on the entire network, you can supply a comma-"
"separated list of post types below (use the slug that identifies the post "
"type)."
msgstr ""
"Solo los tipos de post types incorporados aparecen arriba. Si desea "
"deshabilitar los comentarios sobre otros tipos de post types personalizadas "
"en toda la red, puede proporcionar una lista separada por comas de los tipos "
"de post types a continuación (use la barra que identifica el tipo de "
"publicación)."
#: admin/pages/comments.php:151
msgid ""
"This will make persistent changes to your database &mdash; comments will "
"remain closed even if you later disable the plugin! You should not use it if "
"you only want to disable comments temporarily."
msgstr ""
"Esto hará cambios persistentes en su base de datos &mdash; Los comentarios "
"permanecerán cerrados incluso si luego deshabilitas el plugin. No lo use si "
"solo desea deshabilitar los comentarios temporalmente."
#: admin/pages/comments.php:161
msgid "General settings for comments"
msgstr "Configuraciones generales para comentarios"
#: admin/pages/comments.php:161
msgid "These settings will help you improve SEO and reduce the amount of spam."
msgstr ""
"Estas configuraciones te ayudarán a mejorar el SEO y reducir la cantidad de "
"spam."
#: admin/pages/comments.php:169
msgid ""
"Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
"sake of a link to their site?"
msgstr ""
"¿Cansado de spam en los comentarios? ¿Los visitantes dejan \"en blanco\" "
"los comentarios por un enlace a su sitio?"
#: admin/pages/comments.php:169
msgid "Removes the \"Site\" field from the comment form."
msgstr "Elimina el campo \"Sitio \" del formulario de comentarios."
#: admin/pages/comments.php:169
msgid ""
"Works with the standard comment form, if the form is manually written in "
"your theme-it probably will not work!"
msgstr ""
"Funciona con el formulario de comentarios estándar, si el formulario está "
"escrito manualmente en su tema, ¡probablemente no funcionará!"
#: admin/pages/comments.php:178
msgid ""
"Superfluous external links from comments, which can be typed from a dozen "
"and more for one article, do not bring anything good for promotion."
msgstr ""
"Los enlaces externos superfluos en los comentarios y en cantidades mayores "
"de 12 no aportan nada bueno para el SEO o algunas promociones."
#: admin/pages/comments.php:178
#, php-format
msgid "Replaces the links of this kind of %s, on links of this kind %s"
msgstr "Reemplaza los enlaces del tipo %s, en enlaces de este tipo %s"
#: admin/pages/comments.php:187
msgid ""
"Up to 90 percent of comments in the blog can be left for the sake of an "
"external link. Even nofollow from page weight loss here does not help."
msgstr ""
"Hasta un 90 por ciento de los comentarios del Blog pueden ser usados para "
"enlaces externos, incluso, usar la etiqueta \"nofollow\" no ayudará. "
#: admin/pages/comments.php:187
msgid ""
"Replaces the links of the authors of comments on the JavaScript code, it is "
"impossible to distinguish it from usual links."
msgstr ""
"Reemplaza los enlaces de los autores de los comentarios sobre el código "
"JavaScript, es imposible distinguirlo de los enlaces habituales."
#: admin/pages/comments.php:187
msgid "In some Wordpress topics this may not work."
msgstr "En algunos tópicos de Wordpress, ésto podría no trabajar"
#: admin/pages/delete-comments.php:41
msgid "Comments cleaner"
msgstr "Limpieza de comentarios"
#: admin/pages/delete-comments.php:62
msgid "All comments have been deleted."
msgstr "Todos los comentarios han sido eliminados."
#: admin/pages/delete-comments.php:71
msgid ""
"An error occurred while trying to delete comments. Internal error occured. "
"Please try again later."
msgstr ""
"Se ha producido un error al intentar eliminar comentarios. Se produjo un "
"error interno. Por favor, inténtelo de nuevo más tarde."
#: admin/pages/delete-comments.php:211
msgid ""
"Are you sure you want to delete comments from the database without restoring?"
msgstr ""
"¿Está seguro de que desea eliminar los comentarios de la base de datos sin "
"restaurar?"
#: admin/pages/delete-comments.php:226
msgid "Delete "
msgstr "Borrar"
#: admin/pages/delete-comments.php:232
msgid "Comments clearing tools"
msgstr "Herramientas de limpieza de comentarios"
#: admin/pages/delete-comments.php:235
msgid ""
"These functions can be useful for global disabling comments or bulk cleaning "
"spam comments."
msgstr ""
"Estas funciones pueden ser útiles para deshabilitar los comentarios globales "
"o limpiar de forma masiva los comentarios de spam."
#: admin/pages/delete-comments.php:240
msgid "Remove all comments"
msgstr "Eliminar todos los comentarios"
#: admin/pages/delete-comments.php:242
msgid "You can delete all comments in your database with one click."
msgstr "Borrar todos los comentarios en la basa de datos con un click"
#: admin/pages/delete-comments.php:244
msgid "Choose post types"
msgstr "Elegir tipos de publicaciones"
#: admin/pages/delete-comments.php:249
msgid "Select all"
msgstr "Seleccionar todo"
#: admin/pages/delete-comments.php:266
#, php-format
msgid "Delete Woocommerce order notices? (%d)"
msgstr "¿Desea eliminar los avisos de pedidos de Woocommerce? (%d)"
#: admin/pages/delete-comments.php:272
#, php-format
msgid "Delete (%s)"
msgstr "Borrar (%s)"
#: admin/pages/delete-comments.php:279
msgid "Remove spam comments"
msgstr "Eliminar comentarios spam"
#: admin/pages/delete-comments.php:281
msgid "You can remove only spam comments from the database with one click."
msgstr ""
"Puede eliminar solo los comentarios spam de la base de datos con un solo "
"clic."
#: admin/pages/delete-comments.php:283 admin/pages/delete-comments.php:290
#: admin/pages/delete-comments.php:297
#, php-format
msgid "Delete (%d)"
msgstr "Borrar (%d)"
#: admin/pages/delete-comments.php:286
msgid "Remove unapproved comments"
msgstr "Eliminar comentarios no aprobados"
#: admin/pages/delete-comments.php:288
msgid ""
"You can remove only unapproved comments from the database with one click."
msgstr ""
"Puede eliminar solo los comentarios no aprobados de la base de datos con un "
"solo click."
#: admin/pages/delete-comments.php:293
msgid "Remove trashed comments"
msgstr "Eliminar comentarios en la papelera"
#: admin/pages/delete-comments.php:295
msgid "You can remove only trashed comments from the database with one click."
msgstr ""
"Puede borrar solo los comentarios eliminados de la base de datos con un solo "
"click."
#: comments-plus.php:70
msgid "Webcraftic Disable comments"
msgstr "Deshabilitar comentarios Webcraftic "
#: includes/classes/class.configurate-comments.php:180
#: includes/classes/class.configurate-comments.php:236
msgid "Comments are closed."
msgstr "Cerrados los comentarios"
#: includes/classes/class.configurate-comments.php:224
#, php-format
msgid ""
"Note: The <em>%s</em> plugin is currently active, and comments are "
"completely disabled on: %s. Many of the settings below will not be "
"applicable for those post types."
msgstr ""
"Nota: el plugin <em>%s</em> está activo y los comentarios están "
"completamente deshabilitados en: %s. Muchas de las configuraciones a "
"continuación no serán aplicables para esos tipos de publicaciones."

View File

@@ -0,0 +1,359 @@
msgid ""
msgstr ""
"Project-Id-Version: Clearfy\n"
"POT-Creation-Date: 2018-09-06 18:27+0300\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: nl_BE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.1.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: libs\n"
"X-Poedit-SearchPathExcluded-1: components\n"
"X-Poedit-SearchPathExcluded-2: cache\n"
#: admin/boot.php:18
msgid "Disable comments on the entire site"
msgstr "Reacties uitschakelen op de volledige site"
#: admin/boot.php:24 admin/pages/comments.php:129
msgid "Select post types"
msgstr "Selecteer bericht types"
#: admin/boot.php:29 admin/pages/comments.php:157
msgid "Replace external links in comments on the JavaScript code"
msgstr "Vervang externe links in opmerkingen over de JavaScript code"
#: admin/boot.php:34 admin/pages/comments.php:166
msgid "Replace external links from comment authors on the JavaScript code"
msgstr "Vervang externe links van commentaar auteurs op de JavaScript code"
#: admin/boot.php:39
msgid "Disable X-Pingback"
msgstr "Uitschakelen X-Pingback"
#: admin/boot.php:44 admin/pages/comments.php:148
msgid "Remove field \"site\" in comment form"
msgstr "Verwijder het veld \"site\" in reactie formulier"
#: admin/boot.php:56
msgid "One click disable all comments"
msgstr "Alle reacties uitschakelen in één klik"
#: admin/boot.php:77
msgid "Get ultimate plugin free"
msgstr "Krijg ultieme plugin gratis"
#: admin/pages/comments.php:33 admin/pages/comments.php:94
msgid "Disable comments"
msgstr "Reacties uitschakelen"
#: admin/pages/comments.php:47
msgid "Comments"
msgstr "Opmerkingen"
#: admin/pages/comments.php:48
msgid "General"
msgstr "Algemeen"
#: admin/pages/comments.php:81
msgid "Global disabling of comments"
msgstr "Algemene uitschakeling van reacties"
#: admin/pages/comments.php:81
msgid ""
"What is the difference between these and native WordPress functions? WordPress "
"disables comments only for new posts! Using the functions below, you can "
"disable comments globally, even for old posts, and you can choose which post "
"types comments to disable. The plugin also disables the comment functionality "
"itself, which creates a certain load on the site."
msgstr ""
"Wat is het verschil tussen deze en native WordPress-functies? WordPress "
"schakelt alleen reacties uit voor nieuwe berichten! Met behulp van de "
"onderstaande functies kunt u opmerkingen globaal uitschakelen, zelfs voor oude "
"berichten, en kunt u kiezen welk bericht een opmerking is om uit te schakelen. "
"De plugin schakelt ook de commentaar functionaliteit zelf uit, die de site op "
"één of andere manier belast."
#: admin/pages/comments.php:96
msgid "Not disable"
msgstr "Niet uitschakelen"
#: admin/pages/comments.php:99
msgid "Everywhere"
msgstr "Overal"
#: admin/pages/comments.php:100
#, php-format
msgid ""
"You can delete all comments in the database by clicking on this link (<a href="
"\"%s\">cleaning comments in database</a>)."
msgstr ""
"U kunt alle reacties in de database verwijderen door op deze link te klikken "
"(<a href=\"%s\">reacties opschonen in database</a>)."
#: admin/pages/comments.php:104
msgid "On certain post types"
msgstr "Op bepaalde bericht types"
#: admin/pages/comments.php:105
#, php-format
msgid ""
"You can delete all comments for the selected post types. Select the post types "
"below and save the settings. After that, click the link (<a href=\"%s\">delete "
"all comments for the selected post types in database</a>)."
msgstr ""
"U kunt alle reacties voor de geselecteerde bericht types verwijderen. "
"Selecteer de bericht types hieronder en sla de instellingen op. Klik daarna op "
"de link (<a href=\"%s\">verwijder alle reacties voor de geselecteerde bericht "
"types in de database</a>)."
#: admin/pages/comments.php:109
msgid ""
"Everywhere - Warning: This option is global and will affect your entire site. "
"Use it only if you want to disable comments everywhere. A complete description "
"of what this option does is available here"
msgstr ""
"Overal - Waarschuwing: deze optie is globaal en heeft invloed op uw hele site. "
"Gebruik het alleen als u reacties overal wilt uitschakelen. Een volledige "
"beschrijving van wat deze optie doet, is hier beschikbaar"
#: admin/pages/comments.php:109
msgid ""
"On certain post types - Disabling comments will also disable trackbacks and "
"pingbacks. All comment-related fields will also be hidden from the edit/quick-"
"edit screens of the affected posts. These settings cannot be overridden for "
"individual posts."
msgstr ""
"Op bepaalde bericht types: Door het uitschakelen van reacties, worden ook "
"trackbacks en pingbacks uitgeschakeld. Alle aan reactie gerelateerde velden "
"worden ook verborgen in de editeer/quick-edit schermen van de betreffende "
"berichten. Deze instellingen kunnen niet worden overschreven voor individuele "
"berichten."
#: admin/pages/comments.php:132
msgid "Select the post types for which comments will be disabled"
msgstr "Selecteer de bericht types waarvoor reacties zullen worden uitgeschakeld"
#: admin/pages/comments.php:142
msgid "General settings for comments"
msgstr "Algemene instellingen voor reacties"
#: admin/pages/comments.php:142
msgid "These settings will help you improve SEO and reduce the amount of spam."
msgstr ""
"Met deze instellingen kunt u de SEO verbeteren en de hoeveelheid spam "
"verminderen."
#: admin/pages/comments.php:150
msgid ""
"Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
"sake of a link to their site?"
msgstr ""
"Ben je spam in de reacties beu? Laten bezoekers \"lege\" reacties achter om "
"enkel te linken naar hun site?"
#: admin/pages/comments.php:150
msgid "Removes the \"Site\" field from the comment form."
msgstr "Verwijdert het veld \"Site\" uit het reactie formulier."
#: admin/pages/comments.php:150
msgid ""
"Works with the standard comment form, if the form is manually written in your "
"theme-it probably will not work!"
msgstr ""
"Werkt met het standaard reactie formulier, als het formulier handmatig aan uw "
"thema werd toegevoegd, zal het waarschijnlijk niet werken!"
#: admin/pages/comments.php:159
msgid ""
"Superfluous external links from comments, which can be typed from a dozen and "
"more for one article, do not bring anything good for promotion."
msgstr ""
"Overbodige externe linken van reacties, die uit een tiental of meer voor één "
"artikel getypt kunnen zijn, brengen promotioneel niets bij."
#: admin/pages/comments.php:159
#, php-format
msgid "Replaces the links of this kind of %s, on links of this kind %s"
msgstr "Vervangt de linken van dit soort %s, naar linken van dit type %s"
#: admin/pages/comments.php:168
msgid ""
"Up to 90 percent of comments in the blog can be left for the sake of an "
"external link. Even nofollow from page weight loss here does not help."
msgstr ""
"Tot 90 procent van de reacties in de blog wordt achtergelaten omwille van een "
"externe link. Zelfs nofollow voor pagina gewichtsverlies helpt hier niet."
#: admin/pages/comments.php:168
msgid ""
"Replaces the links of the authors of comments on the JavaScript code, it is "
"impossible to distinguish it from usual links."
msgstr ""
"Vervangt de linken van de auteurs van reacties op de JavaScript code, het is "
"onmogelijk om het te onderscheiden van de gebruikelijke linken."
#: admin/pages/comments.php:168
msgid "In some Wordpress topics this may not work."
msgstr "In sommige onderdelen van WordPress werkt dit misschien niet."
#: admin/pages/comments.php:175
msgid "Disable XML-RPC"
msgstr "Schakel XML-RPC uit"
#: admin/pages/comments.php:177
msgid ""
"A pingback is basically an automated comment that gets created when another "
"blog links to you. A self-pingback is created when you link to an article "
"within your own blog. Pingbacks are essentially nothing more than spam and "
"simply waste resources."
msgstr ""
"Een pingback is in feite een geautomatiseerde commentaar die wordt gemaakt "
"wanneer een andere blog linkt naar u. Een zelf-pingback wordt gemaakt wanneer "
"u een linkt naar een artikel binnen uw eigen blog. Pingbacks zijn in wezen "
"niets meer dan spam en simpelweg een verspilling van resources."
#: admin/pages/comments.php:177
msgid "Removes the server responses a reference to the xmlrpc file."
msgstr "Verwijdert de server reacties bij verwijzing naar het xmlrpc bestand."
#: admin/pages/delete-comments.php:36
msgid "Comments cleaner"
msgstr "Reacties opkuisen"
#: admin/pages/delete-comments.php:75
msgid "All comments have been deleted."
msgstr "Alle opmerkingen zijn verwijderd."
#: admin/pages/delete-comments.php:84
msgid ""
"An error occurred while trying to delete comments. Internal error occured. "
"Please try again later."
msgstr ""
"Er is een fout opgetreden bij het verwijderen van opmerkingen. Interne fout "
"opgetreden. Probeer het later opnieuw."
#: admin/pages/delete-comments.php:154
msgid ""
"Are you sure you want to delete comments from the database without restoring?"
msgstr ""
"Weet je zeker dat je reacties uit de database wilt verwijderen zonder te "
"herstellen?"
#: admin/pages/delete-comments.php:169
msgid "Delete "
msgstr ""
#: admin/pages/delete-comments.php:175
msgid "Comments clearing tools"
msgstr "Opmerkingen wissen tools"
#: admin/pages/delete-comments.php:178
msgid ""
"These functions can be useful for global disabling comments or bulk cleaning "
"spam comments."
msgstr ""
"Deze functies kunnen handig zijn voor algemene uitschakeling van opmerkingen "
"of voor het opschonen van spam-reacties."
#: admin/pages/delete-comments.php:183
msgid "Remove all comments"
msgstr "Verwijder alle reacties"
#: admin/pages/delete-comments.php:185
msgid "You can delete all comments in your database with one click."
msgstr "U kunt alle reacties in uw database met één klik verwijderen."
#: admin/pages/delete-comments.php:187
msgid "Choose post types"
msgstr "Kies bericht types"
#: admin/pages/delete-comments.php:192
msgid "Select all"
msgstr "Selecteer alles"
#: admin/pages/delete-comments.php:209
#, php-format
msgid "Delete Woocommerce order notices? (%d)"
msgstr "Woocommerce ordermeldingen verwijderen? (%d)"
#: admin/pages/delete-comments.php:215
#, php-format
msgid "Delete (%s)"
msgstr ""
#: admin/pages/delete-comments.php:222
msgid "Remove spam comments"
msgstr "Verwijder spam reacties"
#: admin/pages/delete-comments.php:224
msgid "You can remove only spam comments from the database with one click."
msgstr "U kunt met één muisklik enkel spam reacties uit de database verwijderen."
#: admin/pages/delete-comments.php:226 admin/pages/delete-comments.php:233
#: admin/pages/delete-comments.php:240
#, php-format
msgid "Delete (%d)"
msgstr "Verwijderen (%d)"
#: admin/pages/delete-comments.php:229
msgid "Remove unapproved comments"
msgstr "Verwijder niet-goedgekeurde reacties"
#: admin/pages/delete-comments.php:231
msgid "You can remove only unapproved comments from the database with one click."
msgstr ""
"U kunt met één klik enkel niet-goedgekeurde reacties uit de database "
"verwijderen."
#: admin/pages/delete-comments.php:236
msgid "Remove trashed comments"
msgstr "Verwijder reacties uit vuilbak"
#: admin/pages/delete-comments.php:238
msgid "You can remove only trashed comments from the database with one click."
msgstr ""
"U kunt met één klik enkel de reacties in de vuilbak uit de database "
"verwijderen."
#: comments-plus.php:23
msgid ""
"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\"!"
msgstr ""
"We hebben geconstateerd dat de plugin \"Clearfy - uitschakelen ongebruikte "
"functies\" is geïnstalleerd, deze plugin heeft al de functie voor het "
"uitschakelen van reacties, dus u kunt de plugin \"Uitschakelen Reacties\" "
"deactiveren!"
#: comments-plus.php:81
msgid "Webcraftic Disable comments"
msgstr "Webcraftic uitschakelen reacties"
#: includes/classes/class.configurate-comments.php:188
#: includes/classes/class.configurate-comments.php:240
msgid "Comments are closed."
msgstr "Reacties zijn gesloten."
#: includes/classes/class.configurate-comments.php:228
#, php-format
msgid ""
"Note: The <em>%s</em> plugin is currently active, and comments are completely "
"disabled on: %s. Many of the settings below will not be applicable for those "
"post types."
msgstr ""
"Opmerking: de plugin <em>%s</em> is momenteel actief en reacties zijn volledig "
"uitgeschakeld op: %s. Veel van onderstaande instellingen zijn niet van "
"toepassing op die bericht types."

View File

@@ -0,0 +1,360 @@
msgid ""
msgstr ""
"Project-Id-Version: clearfy\n"
"POT-Creation-Date: 2018-09-06 18:27+0300\n"
"PO-Revision-Date: 2018-09-06 18:27+0300\n"
"Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
"Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: libs\n"
"X-Poedit-SearchPathExcluded-1: components\n"
"X-Poedit-SearchPathExcluded-2: cache\n"
#: admin/boot.php:18
msgid "Disable comments on the entire site"
msgstr "Desativar comentários em todo o site"
#: admin/boot.php:24 admin/pages/comments.php:129
msgid "Select post types"
msgstr "Selecione os tipos de postagem"
#: admin/boot.php:29 admin/pages/comments.php:157
msgid "Replace external links in comments on the JavaScript code"
msgstr "Substituir links externos nos comentários no código JavaScript"
#: admin/boot.php:34 admin/pages/comments.php:166
msgid "Replace external links from comment authors on the JavaScript code"
msgstr ""
"Substituir links externos de autores de comentários no código JavaScript"
#: admin/boot.php:39
msgid "Disable X-Pingback"
msgstr "Desativar X-Pingback"
#: admin/boot.php:44 admin/pages/comments.php:148
msgid "Remove field \"site\" in comment form"
msgstr "Remover campo \"site \" no formulário de comentário"
#: admin/boot.php:56
msgid "One click disable all comments"
msgstr "Um clique desativa todos os comentários"
#: admin/boot.php:77
msgid "Get ultimate plugin free"
msgstr "Obtenha o melhor plugin grátis"
#: admin/pages/comments.php:33 admin/pages/comments.php:94
msgid "Disable comments"
msgstr "Desativar comentários"
#: admin/pages/comments.php:47
msgid "Comments"
msgstr "Comentários"
#: admin/pages/comments.php:48
msgid "General"
msgstr "Geral"
#: admin/pages/comments.php:81
msgid "Global disabling of comments"
msgstr "Desativação global de comentários"
#: admin/pages/comments.php:81
msgid ""
"What is the difference between these and native WordPress functions? "
"WordPress disables comments only for new posts! Using the functions below, "
"you can disable comments globally, even for old posts, and you can choose "
"which post types comments to disable. The plugin also disables the comment "
"functionality itself, which creates a certain load on the site."
msgstr ""
"Qual é a diferença entre essas e funções nativas do WordPress? O WordPress "
"desativa os comentários apenas para novas postagens! Usando as funções "
"abaixo, você pode desativar os comentários globalmente, mesmo para postagens "
"antigas, e pode escolher quais comentários de tipos de post serão "
"desativados. O plug-in também desativa a própria funcionalidade de "
"comentários, o que cria uma certa carga no site."
#: admin/pages/comments.php:96
msgid "Not disable"
msgstr "Não desativar"
#: admin/pages/comments.php:99
msgid "Everywhere"
msgstr "Em toda parte"
#: admin/pages/comments.php:100
#, php-format
msgid ""
"You can delete all comments in the database by clicking on this link (<a "
"href=\"%s\">cleaning comments in database</a>)."
msgstr ""
"Você pode excluir todos os comentários no banco de dados clicando neste link "
"(<a href=\"%s\"> limpando comentários no banco de dados </a>)."
#: admin/pages/comments.php:104
msgid "On certain post types"
msgstr "Em certos tipos de postagem"
#: admin/pages/comments.php:105
#, php-format
msgid ""
"You can delete all comments for the selected post types. Select the post "
"types below and save the settings. After that, click the link (<a href=\"%s"
"\">delete all comments for the selected post types in database</a>)."
msgstr ""
"Você pode excluir todos os comentários para os tipos de postagem "
"selecionados. Selecione os tipos de postagem abaixo e salve as "
"configurações. Depois disso, clique no link (<a href=\"%s\"> exclua todos os "
"comentários para os tipos de postagem selecionados no banco de dados </a>)."
#: admin/pages/comments.php:109
msgid ""
"Everywhere - Warning: This option is global and will affect your entire "
"site. Use it only if you want to disable comments everywhere. A complete "
"description of what this option does is available here"
msgstr ""
"Em todo lugar - Aviso: essa opção é global e afetará todo o seu site. Use-o "
"somente se você quiser desabilitar os comentários em todos os lugares. Uma "
"descrição completa do que esta opção faz está disponível aqui"
#: admin/pages/comments.php:109
msgid ""
"On certain post types - Disabling comments will also disable trackbacks and "
"pingbacks. All comment-related fields will also be hidden from the edit/"
"quick-edit screens of the affected posts. These settings cannot be "
"overridden for individual posts."
msgstr ""
"Em determinados tipos de postagens - a desativação de comentários também "
"desativará os trackbacks e os pingbacks. Todos os campos relacionados a "
"comentários também ficarão ocultos nas telas de edição / edição rápida das "
"postagens afetadas. Essas configurações não podem ser substituídas por "
"postagens individuais."
#: admin/pages/comments.php:132
msgid "Select the post types for which comments will be disabled"
msgstr ""
"Selecione os tipos de postagem para os quais os comentários serão desativados"
#: admin/pages/comments.php:142
msgid "General settings for comments"
msgstr "Configurações gerais para comentários"
#: admin/pages/comments.php:142
msgid "These settings will help you improve SEO and reduce the amount of spam."
msgstr ""
"Essas configurações ajudarão você a melhorar o SEO e reduzir a quantidade de "
"spam."
#: admin/pages/comments.php:150
msgid ""
"Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
"sake of a link to their site?"
msgstr ""
"Cansado de spam nos comentários? Os visitantes deixam comentários \"em "
"branco \" por causa de um link para seu site?"
#: admin/pages/comments.php:150
msgid "Removes the \"Site\" field from the comment form."
msgstr "Remove o campo \"Site \" do formulário de comentários."
#: admin/pages/comments.php:150
msgid ""
"Works with the standard comment form, if the form is manually written in "
"your theme-it probably will not work!"
msgstr ""
"Funciona com o formulário de comentários padrão, se o formulário for escrito "
"manualmente no seu tema, provavelmente não funcionará!"
#: admin/pages/comments.php:159
msgid ""
"Superfluous external links from comments, which can be typed from a dozen "
"and more for one article, do not bring anything good for promotion."
msgstr ""
"Links externos supérfluos de comentários, que podem ser digitados de uma "
"dúzia ou mais para um artigo, não trazem nada de bom para a promoção."
#: admin/pages/comments.php:159
#, php-format
msgid "Replaces the links of this kind of %s, on links of this kind %s"
msgstr "Substitui os links deste tipo de %s , em links desse tipo %s"
#: admin/pages/comments.php:168
msgid ""
"Up to 90 percent of comments in the blog can be left for the sake of an "
"external link. Even nofollow from page weight loss here does not help."
msgstr ""
"Até 90 por cento dos comentários no blog podem ser deixados por causa de um "
"link externo. Mesmo nofollow da perda de peso da página aqui não ajuda."
#: admin/pages/comments.php:168
msgid ""
"Replaces the links of the authors of comments on the JavaScript code, it is "
"impossible to distinguish it from usual links."
msgstr ""
"Substitui os links dos autores de comentários no código JavaScript, é "
"impossível distingui-lo dos links usuais."
#: admin/pages/comments.php:168
msgid "In some Wordpress topics this may not work."
msgstr "Em alguns tópicos do WordPress isso pode não funcionar."
#: admin/pages/comments.php:175
msgid "Disable XML-RPC"
msgstr "Desativar o XML-RPC"
#: admin/pages/comments.php:177
msgid ""
"A pingback is basically an automated comment that gets created when another "
"blog links to you. A self-pingback is created when you link to an article "
"within your own blog. Pingbacks are essentially nothing more than spam and "
"simply waste resources."
msgstr ""
"Um pingback é basicamente um comentário automatizado que é criado quando "
"outro blog é direcionado a você. Um pingback automático é criado quando você "
"vincula um artigo ao seu próprio blog. Pingbacks são essencialmente nada "
"mais que spam e simplesmente desperdiçam recursos."
#: admin/pages/comments.php:177
msgid "Removes the server responses a reference to the xmlrpc file."
msgstr "Remove as respostas do servidor uma referência ao arquivo xmlrpc."
#: admin/pages/delete-comments.php:36
msgid "Comments cleaner"
msgstr "Comentários mais limpo"
#: admin/pages/delete-comments.php:75
msgid "All comments have been deleted."
msgstr "Todos os comentários foram apagados."
#: admin/pages/delete-comments.php:84
msgid ""
"An error occurred while trying to delete comments. Internal error occured. "
"Please try again later."
msgstr ""
"Ocorreu um erro ao tentar excluir comentários. Erro interno ocorrido. Por "
"favor, tente novamente mais tarde."
#: admin/pages/delete-comments.php:154
msgid ""
"Are you sure you want to delete comments from the database without restoring?"
msgstr ""
"Tem certeza de que deseja excluir comentários do banco de dados sem "
"restaurar?"
#: admin/pages/delete-comments.php:169
msgid "Delete "
msgstr ""
#: admin/pages/delete-comments.php:175
msgid "Comments clearing tools"
msgstr "Ferramentas de compensação de comentários"
#: admin/pages/delete-comments.php:178
msgid ""
"These functions can be useful for global disabling comments or bulk cleaning "
"spam comments."
msgstr ""
"Essas funções podem ser úteis para comentários globais de desativação ou "
"comentários de spam de limpeza em massa."
#: admin/pages/delete-comments.php:183
msgid "Remove all comments"
msgstr "Remover todos os comentários"
#: admin/pages/delete-comments.php:185
msgid "You can delete all comments in your database with one click."
msgstr ""
"Você pode excluir todos os comentários em seu banco de dados com um clique."
#: admin/pages/delete-comments.php:187
msgid "Choose post types"
msgstr "Escolher tipos de postagem"
#: admin/pages/delete-comments.php:192
msgid "Select all"
msgstr "Selecionar tudo"
#: admin/pages/delete-comments.php:209
#, php-format
msgid "Delete Woocommerce order notices? (%d)"
msgstr "Excluir avisos de pedido do Woocommerce? ( %d )"
#: admin/pages/delete-comments.php:215
#, php-format
msgid "Delete (%s)"
msgstr ""
#: admin/pages/delete-comments.php:222
msgid "Remove spam comments"
msgstr "Remover comentários de spam"
#: admin/pages/delete-comments.php:224
msgid "You can remove only spam comments from the database with one click."
msgstr ""
"Você pode remover apenas comentários de spam do banco de dados com um clique."
#: admin/pages/delete-comments.php:226 admin/pages/delete-comments.php:233
#: admin/pages/delete-comments.php:240
#, php-format
msgid "Delete (%d)"
msgstr "Excluir ( %d )"
#: admin/pages/delete-comments.php:229
msgid "Remove unapproved comments"
msgstr "Remover comentários não aprovados"
#: admin/pages/delete-comments.php:231
msgid ""
"You can remove only unapproved comments from the database with one click."
msgstr ""
"Você pode remover apenas comentários não aprovados do banco de dados com um "
"clique."
#: admin/pages/delete-comments.php:236
msgid "Remove trashed comments"
msgstr "Remover comentários na lixeira"
#: admin/pages/delete-comments.php:238
msgid "You can remove only trashed comments from the database with one click."
msgstr ""
"Você pode remover apenas os comentários da base de dados com um clique."
#: comments-plus.php:23
msgid ""
"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\"!"
msgstr ""
"Descobrimos que você tem o plug-in \"Clearfy - desativar recursos não "
"utilizados \" instalado, este plugin já tem funções de desabilitar "
"comentários, então você pode desativar o plugin \"Desativar comentários \"!"
#: comments-plus.php:81
msgid "Webcraftic Disable comments"
msgstr "Webcraftic Desabilitar comentários"
#: includes/classes/class.configurate-comments.php:188
#: includes/classes/class.configurate-comments.php:240
msgid "Comments are closed."
msgstr "Comentários estão fechados."
#: includes/classes/class.configurate-comments.php:228
#, php-format
msgid ""
"Note: The <em>%s</em> plugin is currently active, and comments are "
"completely disabled on: %s. Many of the settings below will not be "
"applicable for those post types."
msgstr ""
"Nota: O plug-in <em> %s </em> está ativo no momento e os comentários estão "
"completamente desativados em: %s . Muitas das configurações abaixo não serão "
"aplicáveis a esses tipos de postagem."

View File

@@ -0,0 +1,427 @@
msgid ""
msgstr ""
"Project-Id-Version: clearfy\n"
"POT-Creation-Date: 2018-10-16 22:46+0300\n"
"PO-Revision-Date: 2018-10-16 23:23+0300\n"
"Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
"Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: libs\n"
#: admin/boot.php:18
msgid "Disable comments on the entire site"
msgstr "Отключить комментарии на всем сайте"
#: admin/boot.php:24 admin/pages/comments.php:127
msgid "Select post types"
msgstr "Выбрать тип записи"
#: admin/boot.php:29 admin/pages/comments.php:167
msgid "Replace external links in comments on the JavaScript code"
msgstr "Заменить внешние ссылки в комментариях на JavaScript код"
#: admin/boot.php:34 admin/pages/comments.php:176
msgid "Replace external links from comment authors on the JavaScript code"
msgstr "Заменить внешние ссылки от авторов комментариев на код JavaScript"
#: admin/boot.php:39
msgid "Disable X-Pingback"
msgstr "Убрать ссылку на X-Pingback и возможность спамить pingback-ами"
#: admin/boot.php:44 admin/pages/comments.php:158
msgid "Remove field \"site\" in comment form"
msgstr "Удаляет поле \"Сайт\" в форме комментариев"
#: admin/boot.php:56
msgid "One click disable all comments"
msgstr "Отключить все комментарии в один клик"
#: admin/boot.php:77
msgid "Get ultimate plugin free"
msgstr "Получите полную версию плагина бесплатно"
#: admin/pages/comments.php:38 admin/pages/comments.php:92
msgid "Disable comments"
msgstr "Отключить комментарии"
#: admin/pages/comments.php:39
msgid "Manage site comments"
msgstr "Упр. комментариями"
#: admin/pages/comments.php:52
msgid "Comments"
msgstr "Комментарии"
#: admin/pages/comments.php:52
msgid "General"
msgstr "Основные"
#: admin/pages/comments.php:67
msgid "Global disabling of comments"
msgstr "Глобальное отключение комментариев"
#: admin/pages/comments.php:67
msgid ""
"What is the difference between these and native WordPress functions? "
"WordPress disables comments only for new posts! Using the functions below, "
"you can disable comments globally, even for old posts, and you can choose "
"which post types comments to disable. The plugin also disables the comment "
"functionality itself, which creates a certain load on the site."
msgstr ""
"Чем отличается эти функции от нативных функций Wordpress? Wordpress "
"отключает комментарии только для новых записей! С помощью функций ниже, вы "
"можете отключить комментарии глобально, даже для старых записей, причем вы "
"можете выбрать для каких типов записей нужно отключить комментарии. Плагин "
"также отключает сам функционал комментариев, который создает определенную "
"нагрузку на сайт."
#: admin/pages/comments.php:94
msgid "Not disable"
msgstr "Не отключать"
#: admin/pages/comments.php:97
msgid "Everywhere"
msgstr "Повсюду"
#: admin/pages/comments.php:98
#, php-format
msgid ""
"You can delete all comments in the database by clicking on this link (<a "
"href=\"%s\">cleaning comments in database</a>)."
msgstr ""
"Вы можете удалить все комментарии в базе данных, нажав на эту ссылку ( <a "
"href=\"%s\">очистка комментариев в базе данных</a> )."
#: admin/pages/comments.php:102
msgid "On certain post types"
msgstr "Только выбранные типы записей"
#: admin/pages/comments.php:103
#, php-format
msgid ""
"You can delete all comments for the selected post types. Select the post "
"types below and save the settings. After that, click the link (<a href=\"%s"
"\">delete all comments for the selected post types in database</a>)."
msgstr ""
"Вы можете удалить все комментарии для выбранных типов записей. Выберите типы "
"записей ниже и сохраните настройки. После этого нажмите ссылку ( <a href=\"%s"
"\">удалите все комментарии для выбранных типов записей в базе данных</a> )."
#: admin/pages/comments.php:107
msgid ""
"Everywhere - Warning: This option is global and will affect your entire "
"site. Use it only if you want to disable comments everywhere. A complete "
"description of what this option does is available here"
msgstr ""
"Повсюду - предупреждение: этот параметр является глобальным и повлияет на "
"весь ваш сайт. Используйте его только в том случае, если вы хотите отключить "
"комментарии повсюду. "
#: admin/pages/comments.php:107
msgid ""
"On certain post types - Disabling comments will also disable trackbacks and "
"pingbacks. All comment-related fields will also be hidden from the edit/"
"quick-edit screens of the affected posts. These settings cannot be "
"overridden for individual posts."
msgstr ""
"В некоторых типах сообщений - отключение комментариев также отключает "
"трекбэки и pingback. Все поля, связанные с комментариями, также будут скрыты "
"от экранов редактирования / быстрого редактирования затронутых сообщений. "
"Эти настройки нельзя переопределять для отдельных сообщений."
#: admin/pages/comments.php:130
msgid "Select the post types for which comments will be disabled"
msgstr "Выберите типы записей, для которых комментарии будут отключены."
#: admin/pages/comments.php:138
msgid "Custom post types"
msgstr "Произвольные типы записей"
#: admin/pages/comments.php:141
msgid ""
"Only the built-in post types appear above. If you want to disable comments "
"on other custom post types on the entire network, you can supply a comma-"
"separated list of post types below (use the slug that identifies the post "
"type)."
msgstr ""
"Только встроенные типы записей отображаются выше. Если вы хотите отключить "
"комментарии к другим пользовательским типам записей во всей сети, вы можете "
"предоставить список типов сообщений, разделенных запятыми (используйте имя, "
"которое идентифицирует тип записей)."
#: admin/pages/comments.php:152
msgid "General settings for comments"
msgstr "Общие настройки комментариев"
#: admin/pages/comments.php:152
msgid "These settings will help you improve SEO and reduce the amount of spam."
msgstr "Эти настройки помогут вам улучшить SEO и уменьшить количество спама."
#: admin/pages/comments.php:160
msgid ""
"Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
"sake of a link to their site?"
msgstr ""
"Надоел спам в комментариях? Посетители оставляют «пустые» комментарии ради "
"ссылки на свой сайт?"
#: admin/pages/comments.php:160
msgid "Removes the \"Site\" field from the comment form."
msgstr "Убирает поле «Сайт» из формы комментирования."
#: admin/pages/comments.php:160
msgid ""
"Works with the standard comment form, if the form is manually written in "
"your theme-it probably will not work!"
msgstr ""
"Работает со стандартной формой комментирования, если в Вашей теме форма "
"прописана вручную - скорей всего не сработает!"
#: admin/pages/comments.php:169
msgid ""
"Superfluous external links from comments, which can be typed from a dozen "
"and more for one article, do not bring anything good for promotion."
msgstr ""
"Внешние ссылки в комментариях, которых может быть десятки или больше на "
"одной странице, могут ухудшить продвижение вашего сайта."
#: admin/pages/comments.php:169
#, php-format
msgid "Replaces the links of this kind of %s, on links of this kind %s"
msgstr ""
"Заменяет ссылки %s, на span тег и устанавливает переход с помощью JavaScript "
"%s"
#: admin/pages/comments.php:178
msgid ""
"Up to 90 percent of comments in the blog can be left for the sake of an "
"external link. Even nofollow from page weight loss here does not help."
msgstr ""
"До 90 процентов комментариев в блоге оставляют ради внешней ссылки. Не "
"поможет даже nofollow от потери веса страницы."
#: admin/pages/comments.php:178
msgid ""
"Replaces the links of the authors of comments on the JavaScript code, it is "
"impossible to distinguish it from usual links."
msgstr ""
"Заменяет ссылки авторов комментариев на JavaScript код, его невозможно "
"отличить от обычной ссылки."
#: admin/pages/comments.php:178
msgid "In some Wordpress topics this may not work."
msgstr "В некоторых темах Wordpress это может не сработать."
#: admin/pages/comments.php:185
msgid "Disable XML-RPC"
msgstr "Отключить XML-RPC"
#: admin/pages/comments.php:187
msgid ""
"A pingback is basically an automated comment that gets created when another "
"blog links to you. A self-pingback is created when you link to an article "
"within your own blog. Pingbacks are essentially nothing more than spam and "
"simply waste resources."
msgstr ""
"Pingback по-существу автоматизированных комментарий, который создается, "
"когда другой блог ссылается на вас. Self-pingback создается, когда вы "
"оставили ссылку на статью в своем блоге. Pingbacks по существу являются не "
"более чем спам и пустая трата ресурсов вашего сайта."
#: admin/pages/comments.php:187
msgid "Removes the server responses a reference to the xmlrpc file."
msgstr "Удаляет ссылку на xmlrpc-файл и ответ сервера."
#: admin/pages/delete-comments.php:41
msgid "Comments cleaner"
msgstr "Очистка комментариев"
#: admin/pages/delete-comments.php:62
msgid "All comments have been deleted."
msgstr "Все комментарии были удалены."
#: admin/pages/delete-comments.php:71
msgid ""
"An error occurred while trying to delete comments. Internal error occured. "
"Please try again later."
msgstr ""
"При попытке удалить комментарии произошла ошибка. Пожалуйста, повторите "
"попытку позже."
#: admin/pages/delete-comments.php:211
msgid ""
"Are you sure you want to delete comments from the database without restoring?"
msgstr ""
"Вы уверены, что вы хотите удалить комментарии из базы данных без "
"восстановления?"
#: admin/pages/delete-comments.php:226
msgid "Delete "
msgstr "Удалить"
#: admin/pages/delete-comments.php:232
msgid "Comments clearing tools"
msgstr "Комментарии очищающие инструменты"
#: admin/pages/delete-comments.php:235
msgid ""
"These functions can be useful for global disabling comments or bulk cleaning "
"spam comments."
msgstr ""
"Эти функции могут быть полезны для глобальных отключений комментариев или "
"массовой очистки спама комментариев."
#: admin/pages/delete-comments.php:240
msgid "Remove all comments"
msgstr "Удалить все комментарии"
#: admin/pages/delete-comments.php:242
msgid "You can delete all comments in your database with one click."
msgstr "Вы можете удалить все комментарии в базе данных с одним щелчком мыши."
#: admin/pages/delete-comments.php:244
msgid "Choose post types"
msgstr "Выберите типы записей"
#: admin/pages/delete-comments.php:249
msgid "Select all"
msgstr "Выбрать все"
#: admin/pages/delete-comments.php:266
#, php-format
msgid "Delete Woocommerce order notices? (%d)"
msgstr "Удалять заметки от заказов Woocommerce? (%d)"
#: admin/pages/delete-comments.php:272
#, php-format
msgid "Delete (%s)"
msgstr "Удалить (%s)"
#: admin/pages/delete-comments.php:279
msgid "Remove spam comments"
msgstr "Удалить спам комментарии"
#: admin/pages/delete-comments.php:281
msgid "You can remove only spam comments from the database with one click."
msgstr ""
"Вы можете одним нажатием удалить только спам комментарии из базы данных."
#: admin/pages/delete-comments.php:283 admin/pages/delete-comments.php:290
#: admin/pages/delete-comments.php:297
#, php-format
msgid "Delete (%d)"
msgstr "Удалить (%d)"
#: admin/pages/delete-comments.php:286
msgid "Remove unapproved comments"
msgstr "Удалить неподтвержденные комментарии"
#: admin/pages/delete-comments.php:288
msgid ""
"You can remove only unapproved comments from the database with one click."
msgstr ""
"Вы можете одним нажатием удалить только не подтвержденные комментарии из "
"базы данных."
#: admin/pages/delete-comments.php:293
msgid "Remove trashed comments"
msgstr "Удалить комментарии из корзины"
#: admin/pages/delete-comments.php:295
msgid "You can remove only trashed comments from the database with one click."
msgstr "Вы можете одним нажатием удалить только комментарии из корзины."
#: comments-plus.php:63
msgid "Webcraftic Disable comments"
msgstr "Webcraftic отключить комментарии"
#: includes/classes/class.configurate-comments.php:204
#: includes/classes/class.configurate-comments.php:256
msgid "Comments are closed."
msgstr "Комментарии Закрыты."
#: includes/classes/class.configurate-comments.php:244
#, php-format
msgid ""
"Note: The <em>%s</em> plugin is currently active, and comments are "
"completely disabled on: %s. Many of the settings below will not be "
"applicable for those post types."
msgstr ""
"Примечание. Плагин <em>%s</em> в настоящий момент активен, и комментарии "
"полностью отключены: %s. Многие из приведенных ниже настроек не будут "
"применяться для этих типов сообщений."
#~ msgid ""
#~ "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\"!"
#~ msgstr ""
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
#~ "комментариев, поэтому вы можете отключить плагин «Отключить комментарии»!"
#~ msgid "Recommended"
#~ msgstr "Рекомендовано"
#~ msgid "You are not allowed to view this page."
#~ msgstr "Вам не разрешено просматривать эту страницу."
#~ msgid "You do not have the selected post types!"
#~ msgstr "Вы не выбрали еще ни одного типа записей!"
#~ msgid "No comments available for deletion."
#~ msgstr "Нет комментариев для удаления."
#~ msgid ""
#~ "Are you sure that you desire to delete all comments from the database?"
#~ msgstr "Вы уверены, что хотите удалить все комментарии из базы данных?"
#~ msgid ""
#~ "Deleting comments will remove existing comment entries in the database "
#~ "and cannot be reverted without a database backup."
#~ msgstr ""
#~ "При удалении комментариев удаляются существующие записи комментариев в "
#~ "базе данных, они не могут быть восстановлены без резервного копирования "
#~ "базы данных."
#~ msgid "You have %s comments"
#~ msgstr "У вас есть %s комментариев"
#~ msgid "Yes, I'm sure"
#~ msgstr "Да, я уверен"
#~ msgid "No, return back"
#~ msgstr "Нет, вернуться"
#~ msgid ""
#~ "Are you sure that you desire to delete all comments from the database for "
#~ "the selected post types (%s)?"
#~ msgstr ""
#~ "Вы уверены, что хотите удалить все комментарии из базы данных для "
#~ "выбранных типов записей (%s)?"
#~ msgid "Webcraftic comments tweaks"
#~ msgstr "Webcraftic инструменты комментариев"
#~ msgid ""
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
#~ "installed, this plugin already has disable comments functions, so you can "
#~ "deactivate plugin \"Comments tweaks\"!"
#~ msgstr ""
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
#~ "неиспользуемые функции», этот плагин уже имеет функции отключения "
#~ "комментариев, поэтому вы можете отключить плагин «Инструменты "
#~ "комментариев»!"
#~ msgid "Disable all comments"
#~ msgstr "Отключить все комментарии"

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,193 @@
=== Disable Comments for Any Post Types (Remove comments) ===
Tags: disable comments, disable XML-RPC, remove comments, delete comments, no self pings, wp disable, disable pingback comments, comments manager, webcraftic update manager, clearfy, replace external links, remove comment form, comment form, remove comment form fields, bulk comments management, spam comments cleaner, delete comments by status, no page comment, wp disable comments
Contributors: webcraftic, alexkovalevv, creativemotion
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VDX7JNTQPNPFW
Requires at least: 5.6
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: trunk
License: GPLv2
Allows administrators to disable comments on their website. Comments can be disabled according to Post, Page, Media type.
== Description ==
<strong>Disable comments</strong> plugin is a useful tool for blog or site administrators that allows fully disabling or hiding comments for any post types, pages or attachments.
It removes the all comments related features and options:
* <strong>disable comments</strong> on frontend at all;
* <strong>remove comments</strong> option from WordPress dashboard menu;
* <strong>hide comments</strong> option from the admin bar;
* <strong>Turn off comments widgets.</strong>
In addition, this plugin can <strong>disable XML-RPC</strong> related functions in WordPress including disable pingbacks and disable trackbacks, and helps to prevent the attacks on the xmlrpc.php file. Lastly, it attempts to generate a “403 Denied” error for requests to the /xmlrpc.php URL, but does not affect that file or your server in any way.
If you want <strong>completely remove comments</strong>, you can do this individually for selected post types. You can easily bulk delete all WordPress comments in some clicks. No any other “Delete All Comments” plugins or phpMyAdmin needed.
You can disable comments but if you decide to leave them, you need to close comments external links from the search engines. By default when users places comments, the WordPress adds rel=”nofollow” attribute to the comment author URL and for all links in the comments text. However, already for a long time, search engines ignores this and follows links. It makes dozens of superfluous external links from comments that are do not bring anything good for your SEO. <strong>Disable Comments</strong> plugin makes all external links in WordPress comments invisible for search engines with Javascript and improves your blog or website SEO.
In addition, if you do not want to disable comments you may need to remove website field from the WordPress comment form. Note: you can remove comment author URL but this feature can be not work with some themes.
Generally, the <strong>Disable Comments</strong> plugin uses the intelligent algorithm to <strong>hide comments</strong> and <strong>remove comments</strong>. You just need to turn some toggles on.
If you come across any bugs or have suggestions with <strong>Disable Comments</strong>, please use the plugin support forum. I cannot fix them if I do not know about! Please check the FAQ for common issues.
== Frequently Asked Questions ==
= Nothing happens after I disable comments on all posts comment forms are still appears inside my posts. =
That is because your theme is not checking the comment status of posts in the correct way.
You may like to point your themes author to this explanation of what they are doing wrong, and how to fix it.
= How can I remove the text “comments are closed” at the bottom of articles when comments are disabled? =
The plugin tries to hide it (and any other comment-related elements) as well as possible.
If you still see this message, it means that your theme is overrides this behavior and you will have to edit its files manually for fix it. Two common approaches are to either delete or comment out the relevant lines in wp-content/your-theme/comments.php, or to add a declaration to wp-content/your-theme/style.css that hides the message from your visitors. In either case, make know what you are doing!
= I only want to disable comments on certain posts, not globally. What do I need to do? =
Do not install this plugin!
Go to the edit page for the post you want to disable comments. Scroll down to the “Discussion” box, where you will find the comment options for that post. If you do not see a “Discussion” box, then click on “Screen Options” at the top of your screen, and make sure the “Discussion” checkbox is checked.
You can also bulk-edit the comment status of multiple posts from the posts screen.
= I want to delete comments from my database. What do I need to do? =
When you will change the plugin settings, you will be prompt to delete comments from the database.
== Details ==
The Disable Comments plugin allows you <strong>completely disable the commenting feature in WordPress</strong>. When this option is on you will get the following changes:
<strong>* Easy Enable or disable Comments;</strong>
<strong>* Disable comments globally;</strong>
<strong>* Disable comments on certain Pages;</strong>
<strong>* Disable comments on posts Only;</strong>
<strong>* Disable comments on pages Only;</strong>
<strong>* Disable comments for any post types;</strong>
<strong>* Disable comments links in the Admin Menu and Admin Bar;</strong>
<strong>* Disable comments related sections (“Recent Comments”, “Discussion” etc.) and hide from the WordPress Dashboard;</strong>
<strong>* Disable comments related widgets (so your theme cannot to use them);</strong>
<strong>* Disable comments “Discussion” settings page;</strong>
<strong>* Disable comments in RSS/Atom feeds (and requests for comments RSS will be redirect to the parent post);</strong>
<strong>* Disable X-Pingback HTTP header and remove from all pages;</strong>
<strong>* Disable outgoing pingbacks;</strong>
<strong>* Making comments external links “nofollow” and invisible for search engines;</strong>
<strong>* Remove website/URL field from the comment form;</strong>
<strong>* Remove comments, Delete comments in one click.</strong>
We recently added brand new features into the <strong>Disable Comments plugin</strong>. These are <strong>Disable X-Pingback</strong> function, <strong>Replace external links</strong> and <strong>Remove website/url comment field</strong>.
Some functions was taken from the following popular plugins: <strong>Clearfy disable unused features</strong>, <strong>Bulk Comments Management</strong>, <strong>Spam Comments Cleaner</strong>, <strong>Delete Comments By Status</strong>, <strong>No Page Comment</strong>, <strong>WP Disable Comments</strong>, <strong>Hide “Comments are closed”</strong>, <strong>Hide Show Comment</strong>.
== Advanced Configuration ==
Site administrators and plugin/theme developers can modify some of the plugins behavior through the code:
Define DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE and set it to false to prevent the plugin from replacing themes comment template with an empty one.
These definitions can be make either in your main wp-config.php or in your themes functions.php file.
#### RECOMMENDED SEPARATE MODULES ####
We invite you to check out a few other related free plugins that our team has also produced that you may find especially useful:
* [Clearfy WordPress optimization plugin and disable ultimate tweaker](https://wordpress.org/plugins/clearfy/)
* [Disable updates, Disable automatic updates, Updates manager](https://wordpress.org/plugins/webcraftic-updates-manager/)
* [Cyrlitera transliteration of links and file names](https://wordpress.org/plugins/cyrlitera/)
* [Cyr-to-lat reloaded transliteration of links and file names](https://wordpress.org/plugins/cyr-and-lat/ "Cyr-to-lat reloaded")
* [Disable admin notices individually](https://wordpress.org/plugins/disable-admin-notices/ "Disable admin notices individually")
* [WordPress Assets manager, dequeue scripts, dequeue styles](https://wordpress.org/plugins/gonzales/ "WordPress Assets manager, dequeue scripts, dequeue styles")
* [Hide login page](https://wordpress.org/plugins/hide-login-page/ "Hide login page")
== Translations ==
* English - default, always included
* Russian
If you want to help with the translation, please contact me through this site or through the contacts inside the plugin.
== Installation ==
1. Upload the plugin folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs).
== Screenshots ==
1. Control panel (General)
2. Control panel (Remove comments)
== Changelog ==
= 1.2.0 (05.12.2024) =
* Added: Compatibility with Wordpress 6.7
= 1.1.9 (21.03.2024) =
* Added: Compatibility with Wordpress 6.5
* Added: Compatibility with php 8.3
= 1.1.8 (21.11.2023) =
* Added: Compatibility with Wordpress 6.4
* Added: Compatibility with php 8.2
= 1.1.7 (22.03.2023) =
* Fixed: Freemius framework conflict
* Added: Compatibility with Wordpress 6.2
= 1.1.6 (30.05.2022) =
* Added: Compatibility with Wordpress 6.0
= 1.1.5 (23.03.2022) =
* Added: Compatibility with Disable admin notices plugin
= 1.1.4 (23.03.2022) =
* Added: Compatibility with Wordpress 5.9
* Fixed: Minor bugs
= 1.1.3 (20.10.2021) =
* Added: Compatibility with Wordpress 5.8
* Fixed: Minor bugs
= 1.1.2 (16.12.2020) =
* Added: Subscribe form
* Fixed: Minor bugs
= 1.1.1 =
* Added: Compatibility with Wordpress 4.2 - 5.x
* Added: Multisite support
* Fixed: Minor bugs
= 1.0.9 =
* Fixed: Update core
= 1.0.8 =
* Fixed: Update core
* Fixed: Small bugs
* Fixed: Translations
= 1.0.7 =
* Fixed: Update core
* ADDED: Plugin options caching to reduce database queries for 90%. Clearfy became lighter and faster.
* ADDED: Compress and cache the plugin core files, to reduce the load on the admin panel
= 1.0.5 =
* Added a new feature: Added page for cleaning comments
* Fixed: Bugs with Woocommerce
= 1.0.4 =
* Update plugin core
* Fixed bug reduced plugin weight.
* Fixed JS error with external links option.
* Add french translation
= 1.0.3 =
* Update plugin core
= 1.0.2 =
* Fixed a bug where you selected the recommended mode, on some pages you see a white screen. Now you will not encounter this error.
= 1.0.1 =
* Plugin release

View File

@@ -0,0 +1,13 @@
<?php
// if uninstall.php is not called by WordPress, die
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
// remove plugin options
global $wpdb;
$wpdb->query( "DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE 'wbcr_comments_plus_%';" );
$wpdb->query( "DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE 'wbcr_cmp_%';" );