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,37 @@
<?php
/**
* Activator for the Update manager
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 09.09.2017, Webcraftic
* @see Factory480_Activator
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class WUPM_Activation extends Wbcr_Factory480_Activator {
/**
* Runs activation actions.
*
* @since 1.0.0
*/
public function activate() {
}
/**
* Runs deactivation actions.
*
* @since 1.0.0
*/
public function deactivate() {
}
}

View File

@@ -0,0 +1,54 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* ajax action for switch option
*/
function wbcr_upm_change_flag() {
check_ajax_referer( 'wbcr_upm_change_flag' );
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( - 1, 403 );
}
$is_theme = false;
$app = WUPM_Plugin::app();
$slug = $app->request->post( 'theme', null, true );
if ( ! empty( $slug ) ) {
$is_theme = true;
} else {
$slug = $app->request->post( 'plugin', null, true );
}
$flag = $app->request->post( 'flag', null, true );
$new_value = (bool) $app->request->post( 'value' );
if ( empty( $slug ) or empty( $flag ) ) {
wp_send_json_error( [ 'error_message' => __( 'Required arguments of slug, flag is empty!', 'webcraftic-updates-manager' ) ] );
}
if ( $is_theme ) {
$plugin_filters = new WUPM_ThemeFilters( $app );
} else {
$plugin_filters = new WUPM_PluginFilters( $app );
}
$method = ( ( $new_value ) ? 'disable' : 'enable' ) . $flag;
if ( ! method_exists( $plugin_filters, $method ) ) {
wp_send_json_error( [ 'error_message' => __( 'Method %s is not found!', 'webcraftic-updates-manager' ) ] );
}
$plugin_filters->$method( $slug );
$plugin_filters->save();
wp_send_json_success();
}
add_action( 'wp_ajax_wbcr-upm-change-flag', 'wbcr_upm_change_flag' );

View File

@@ -0,0 +1,156 @@
/**
* General styles
* @author Alex Kovalev <alex.kovalevv@gmail.com>
* @copyright Alex Kovalev 23.08.2017
*/
#WBCR {
/* upm */
}
#WBCR .wp-list-table th,
#WBCR .wp-list-table .plugin-name {
font-size: 13px;
font-weight: 600;
}
#WBCR .wp-list-table.wbcr-upm-list-table-pro.wbcr-upm-column-premium td {
background: #f9f2f0 !important;
}
#WBCR .wp-list-table.wbcr-upm-list-table-pro.wbcr-upm-column-premium td .factory-buttons-way,
#WBCR .wp-list-table.wbcr-upm-list-table-pro.wbcr-upm-column-premium td input[type="checkbox"] {
border-color: #fff;
background: #fff;
}
#WBCR .wp-list-table th.wbcr-upm-column-premium,
#WBCR .wp-list-table td.wbcr-upm-column-premium {
background: #f9f2f0 !important;
}
#WBCR .wp-list-table th.wbcr-upm-column-premium .factory-buttons-way,
#WBCR .wp-list-table td.wbcr-upm-column-premium .factory-buttons-way,
#WBCR .wp-list-table th.wbcr-upm-column-premium input[type="checkbox"],
#WBCR .wp-list-table td.wbcr-upm-column-premium input[type="checkbox"] {
border-color: #fff;
background: #fff;
}
#WBCR .wp-list-table .plugin-update-tr.active td,
#WBCR .wp-list-table.plugins .active th.check-column {
border-left: 4px solid #e6e6e6 !important;
padding-left: 8px !important;
}
#WBCR .wp-list-table.plugins .row-actions,
#WBCR .wp-list-table.plugins .second {
padding: 0 0 5px;
color: #949292;
}
#WBCR .wp-list-table.plugins .active td,
#WBCR .wp-list-table.plugins .active th {
background-color: #ffffff;
}
#WBCR .wp-list-table.plugins,
#WBCR .wp-list-table.plugins td,
#WBCR .wp-list-table.plugins th,
#WBCR .wp-list-table .row-actions .network_active,
#WBCR .wp-list-table .row-actions .network_only {
color: #777;
}
#WBCR .wp-list-table .widefat ol,
#WBCR .wp-list-table .widefat p,
#WBCR .wp-list-table .widefat tfoot tr td,
#WBCR .wp-list-table .widefat tfoot tr th,
#WBCR .wp-list-table .widefat thead tr td,
#WBCR .wp-list-table .widefat thead tr th,
#WBCR .wp-list-table .widefat ul {
color: #7d7d7d;
}
#WBCR .wp-list-table #disable_updates,
#WBCR .wp-list-table #disable_auto_updates,
#WBCR .wp-list-table #disable_translation_updates,
#WBCR .wp-list-table #hide_item {
width: 100px;
}
#WBCR .column-flags .factory-checkbox {
display: inline-flex;
}
#WBCR .wp-list-table.autoupdate th {
white-space: normal !important;
}
#WBCR .wp-list-table.autoupdate .plugin-title {
white-space: normal !important;
}
#WBCR .wp-list-table__plugins .plugin-title {
max-width: 12rem;
}
#WBCR .wbcr-upm-group-header-pro {
position: relative;
display: inline-block;
}
#WBCR .wbcr-upm-group-header-pro:after {
display: inline-block;
position: relative;
content: 'PRO';
background: #ff5722;
border-radius: 4px;
color: #fff;
font-size: 10px;
line-height: 1;
font-style: normal;
padding: 4px 6px;
margin-left: 4px;
vertical-align: top;
top: 0;
left: auto;
right: 0;
z-index: 11;
}
#WBCR #disable_translation_updates,
#WBCR #hide_item {
position: relative;
}
#WBCR #disable_translation_updates.wbcr-upm-column-pro:after,
#WBCR #hide_item.wbcr-upm-column-pro:after {
display: inline-block;
position: absolute;
content: 'PRO';
background: #ff5722;
border-radius: 4px;
color: #fff;
font-size: 10px;
line-height: 1;
font-style: normal;
padding: 4px 6px;
margin-left: 4px;
vertical-align: top;
top: -10px;
left: auto;
right: 0;
z-index: 11;
}
#WBCR .factory-checkbox.wbcr-upm-icon-pro:after {
display: inline-block;
position: relative;
content: 'PRO';
background: #ff5722;
border-radius: 4px;
color: #fff;
font-size: 10px;
line-height: 1;
font-style: normal;
padding: 4px 6px;
margin-left: 4px;
vertical-align: top;
top: -8px;
left: -10px;
right: auto;
z-index: 11;
}
#WBCR .wp-list-table.autoupdate .check-column {
padding: 10px 9px;
}
.factory-checkbox-disabled input,
.factory-checkbox-disabled button {
pointer-events: none;
cursor: not-allowed;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
/*# sourceMappingURL=general.css.map */

View File

@@ -0,0 +1,33 @@
/**
* Plugins page interface
* @author Webcraftic <wordpress.webraftic@gmail.com>
* @copyright Webcraftic 03.09.2018
*/
/* wordpress default plugins page */
.wbcr-upm-plugin-status,
tbody .check-column:not(.hide-placeholder):after {
display: block;
content: "\f463";
line-height: 1;
font-family: dashicons;
text-decoration: inherit;
font-weight: 400;
font-style: normal;
vertical-align: top;
text-align: center;
margin: 4px 0 0 8px;
color: #b4b9be;
border: 1px solid #b4b9be;
font-size: 14px;
height: 14px;
width: 14px;
}
.wbcr-upm-plugin-status.wbcr-upm-red {
color: rgba(170, 0, 0, 0.58);
border-color: rgba(170, 0, 0, 0.45);
}
.wbcr-upm-plugin-status.wbcr-upm-purple {
color: #ac62b9;
border-color: #a767b3;
}
/*# sourceMappingURL=plugins.css.map */

View File

@@ -0,0 +1,21 @@
/* update manager button */
/*#wpbody .search-form:not(.hide-placeholder):before {
display: inline-block;
content: 'Update manager';
margin-left: 4px;
padding: 4px 8px;
position: relative;
top: -3px;
text-decoration: none;
border: 1px solid #ccc;
border-radius: 2px;
background: #f7f7f7;
text-shadow: none;
font-weight: 600;
font-size: 13px;
line-height: normal;
color: #0073aa;
cursor: pointer;
outline: 0;
}*/
/*# sourceMappingURL=themes.css.map */

View File

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

View File

@@ -0,0 +1,98 @@
jQuery(function($) {
var initAjaxControls = function() {
function toggleRedLine(val){
var row = $(this).parents('tr');
if( !row.hasClass('row-global-disabled') ){
var disable_display = row.find('#wbcr_updates_manager_hide_item').val();
var disable_all_updates = row.find('#wbcr_updates_manager_disable_updates').val();
if(disable_display !== undefined) disable_display = parseInt(disable_display);
if(disable_all_updates !== undefined) disable_all_updates = parseInt(disable_all_updates);
if(!disable_all_updates && (disable_display === undefined || !disable_display)){
row.removeClass('inactive').addClass('active');
}else{
row.removeClass('active').addClass('inactive');
}
}
}
$('.factory-ajax-checkbox').on('change', function(ev) {
var action = $(this).data('action');
var new_value = $(this).val();
var data = {};
data['_wpnonce'] = wbcr_upm_ajax.nonce;
data['action'] = 'wbcr-upm-change-flag';
data['theme'] = $(this).data('theme-slug');
if( !data['theme'] ) {
data['plugin'] = $(this).data('plugin-slug');
}
data['flag'] = $(this).data('action');
data['value'] = new_value;
if( $(this).data('inverse') ){
data['value'] = 0 + ! parseInt(new_value);
}
var disable_group = $(this).data('disable-group');
if( disable_group ) {
if( new_value == true ) {
$("." + disable_group).find('button, input').prop('disabled', true);
toggleRedLine.apply(this);
} else {
$("." + disable_group).each(function(k, v) {
if( !$(v).hasClass('global-disabled') ) {
$(v).find('button, input').prop('disabled', false);
}
toggleRedLine.apply(this);
});
}
}
$.ajax({
url: ajaxurl,
method: 'post',
data: data,
success: function(response) {
if( !response || !response.success ) {
if( response.data.error_message ) {
$.wbcr_factory_templates_134.app.showNotice('Error: [' + response.data.error_message + ']', 'danger');
}
return false;
}
/*var noticeId = $.wbcr_factory_templates_134.app.showNotice('Settings successfully updated', 'success');
setTimeout(function() {
$.wbcr_factory_templates_134.app.hideNotice(noticeId);
}, 5000);*/
},
error: function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(xhr.responseText);
console.log(thrownError);
$.wbcr_factory_templates_134.app.showNotice('Error: [' + thrownError + '] Status: [' + xhr.status + '] Error massage: [' + xhr.responseText + ']', 'danger');
}
});
});
$('.wbcr_um_select_item').on('change', function(){
$('.wbcr_um_select_all').prop('checked', false);
});
$('.wbcr_um_select_all').on('change', function(){
if($(this).prop('checked')){
$('.wbcr_um_select_item').prop('checked', true);
}else{
$('.wbcr_um_select_item').prop('checked', false);
}
});
};
initAjaxControls();
});

View File

@@ -0,0 +1,39 @@
/**
* Plugins interface
* @author Webcraftic <wordpress.webraftic@gmail.com>
* @copyright (c) 10.09.2017, Webcraftic
* @version 1.0
*/
jQuery(function($) {
window.um_add_plugin_icons = function(info) {
$('#the-list tr[data-plugin]').each(function(k, v) {
var title = window.wbcr_upm_plugins_label_l10n['default'];
var plugin_path = $(v).data('plugin'),
slug_parts = plugin_path.split('/'),
slug = slug_parts[0],
update_class = '',
is_auto_update = false,
is_update_disabled = false;
if( (info['filters']['disable_auto_updates'] === undefined || !info['filters']['disable_auto_updates'][slug]) ) {
is_auto_update = true;
}
if( (info['filters']['disable_updates'] !== undefined && info['filters']['disable_updates'][slug]) ) {
is_update_disabled = true;
}
if( is_auto_update ) {
update_class = 'wbcr-upm-purple';
title = window.wbcr_upm_plugins_label_l10n['auto_update'];
}
if( is_update_disabled ) {
update_class = 'wbcr-upm-red';
title = window.wbcr_upm_plugins_label_l10n['disable_updates'];
}
$(v).find('.check-column').addClass('hide-placeholder').append('<span class="dashicons dashicons-update wbcr-upm-plugin-status ' + update_class + '" title="' + title + '"></span>');
});
};
});

View File

@@ -0,0 +1,238 @@
<?php
/**
* Admin boot
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright Webcraftic 25.05.2017
* @version 1.0
*/
require_once WUPM_PLUGIN_DIR . '/admin/includes/class-plugin-filters.php';
require_once WUPM_PLUGIN_DIR . '/admin/includes/class-theme-filters.php';
if ( ! defined( 'LOADING_UPDATES_MANAGER_AS_ADDON' ) ) {
function wbcr_upm_set_plugin_meta( $links, $file ) {
if ( $file == WUPM_PLUGIN_BASE ) {
$url = 'https://clearfy.pro';
if ( get_locale() == 'ru_RU' ) {
$url = 'https://ru.clearfy.pro';
}
$url .= '?utm_source=wordpress.org&utm_campaign=' . WUPM_Plugin::app()->getPluginName();
$links[] = '<a href="' . $url . '" style="color: #FF5722;font-weight: bold;" target="_blank">' . __( 'Get ultimate plugin free', 'webcraftic-updates-manager' ) . '</a>';
}
return $links;
}
if ( ! defined( 'LOADING_UPDATES_MANAGER_AS_ADDON' ) ) {
add_filter( 'plugin_row_meta', 'wbcr_upm_set_plugin_meta', 10, 2 );
}
/**
* Rating widget url
*
* @param string $page_url
* @param string $plugin_name
*
* @return string
*/
function wbcr_upm_rating_widget_url( $page_url, $plugin_name ) {
if ( ! defined( 'LOADING_UPDATES_MANAGER_AS_ADDON' ) && ( $plugin_name == WUPM_Plugin::app()->getPluginName() ) ) {
return 'https://goo.gl/Be2hQU';
}
return $page_url;
}
add_filter( 'wbcr_factory_pages_480_imppage_rating_widget_url', 'wbcr_upm_rating_widget_url', 10, 2 );
/**
* Удаляем лишние виджеты из правого сайдбара в интерфейсе плагина
*
* - Виджет с премиум рекламой
* - Виджет с рейтингом
* - Виджет с маркерами информации
*/
add_filter( 'wbcr/factory/pages/impressive/widgets', function ( $widgets, $position, $plugin ) {
if ( WUPM_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_upm_group_options( $options ) {
$options[] = [
'name' => 'plugin_updates',
'title' => __( 'Disable plugin updates', 'webcraftic-updates-manager' ),
'tags' => [ 'disable_all_updates' ],
'values' => [ 'disable_all_updates' => 'disable_plugin_updates' ]
];
$options[] = [
'name' => 'theme_updates',
'title' => __( 'Disable theme updates', 'webcraftic-updates-manager' ),
'tags' => [ 'disable_all_updates' ],
'values' => [ 'disable_all_updates' => 'disable_theme_updates' ]
];
$options[] = [
'name' => 'auto_tran_update',
'title' => __( 'Disable Automatic Translation Updates', 'webcraftic-updates-manager' ),
'tags' => [ 'disable_all_updates' ]
];
$options[] = [
'name' => 'wp_update_core',
'title' => __( 'Disable wordPress core updates', 'webcraftic-updates-manager' ),
'tags' => [ 'disable_all_updates' ],
'values' => [ 'disable_all_updates' => 'disable_core_updates' ]
];
$options[] = [
'name' => 'enable_update_vcs',
'title' => __( 'Enable updates for VCS Installations', 'webcraftic-updates-manager' ),
'tags' => []
];
$options[] = [
'name' => 'plugins_update_filters',
'title' => __( 'Plugin filters', 'webcraftic-updates-manager' ),
'tags' => []
];
$options[] = [
'name' => 'updates_nags_only_for_admin',
'title' => __( 'Updates nags only for Admin', 'webcraftic-updates-manager' ),
'tags' => [ 'recommended' ]
];
$options[] = [
'name' => 'disable_core_notifications',
'title' => __( 'Core notifications', 'webcraftic-updates-manager' ),
'tags' => []
];
$options[] = [
'name' => 'notify_updated',
'title' => __( 'Notify me when update successful installed', 'webcraftic-updates-manager' ),
'tags' => []
];
$options[] = [
'name' => 'notify_email',
'title' => __( 'Email address', 'webcraftic-updates-manager' ),
'tags' => []
];
return $options;
}
add_filter( "wbcr_clearfy_group_options", 'wbcr_upm_group_options' );
function wbcr_upm_allow_quick_mods( $mods ) {
$mods['disable_all_updates'] = [
'title' => __( 'One click disable all updates', 'webcraftic-updates-manager' ),
'icon' => 'dashicons-update'
];
return $mods;
}
add_filter( "wbcr_clearfy_allow_quick_mods", 'wbcr_upm_allow_quick_mods' );
}
/**
* Ошибки совместимости с похожими плагинами
*/
function wbcr_upm_admin_conflict_notices_error( $notices, $plugin_name ) {
if ( $plugin_name != WUPM_Plugin::app()->getPluginName() ) {
return $notices;
}
$warnings = [];
$default_notice = WUPM_Plugin::app()->getPluginTitle() . ': ' . __( 'We found that you have the plugin %s installed. The functions of this plugin already exist in %s. Please deactivate plugin %s to avoid conflicts between plugins\' functions.', 'webcraftic-updates-manager' );
$default_notice .= ' ' . __( 'If you do not want to deactivate the plugin %s for some reason, we strongly recommend do not use the same plugins\' functions at the same time!', 'webcraftic-updates-manager' );
if ( is_plugin_active( 'companion-auto-update/companion-auto-update.php' ) ) {
$warnings[] = sprintf( $default_notice, 'Companion Auto Update', WUPM_Plugin::app()->getPluginTitle(), 'Companion Auto Update', 'Companion Auto Update' );
}
if ( is_plugin_active( 'disable-updates/disable-updates.php' ) ) {
$warnings[] = sprintf( $default_notice, 'Disable Updates', WUPM_Plugin::app()->getPluginTitle(), 'Disable Updates', 'Disable Updates' );
}
if ( is_plugin_active( 'disable-wordpress-updates/disable-updates.php' ) ) {
$warnings[] = sprintf( $default_notice, 'Disable All WordPress Updates', WUPM_Plugin::app()->getPluginTitle(), 'Disable All WordPress Updates', 'Disable All WordPress Updates' );
}
if ( is_plugin_active( 'stops-core-theme-and-plugin-updates/main.php' ) ) {
$warnings[] = sprintf( $default_notice, 'Easy Updates Manager', WUPM_Plugin::app()->getPluginTitle(), 'Easy Updates Manager', 'Easy Updates Manager' );
}
if ( empty( $warnings ) ) {
return $notices;
}
$notice_text = '';
foreach ( (array) $warnings as $warning ) {
$notice_text .= '<p>' . $warning . '</p>';
}
$notices[] = [
'id' => 'ump_plugin_compatibility',
'type' => 'error',
'dismissible' => true,
'dismiss_expires' => 0,
'text' => $notice_text
];
return $notices;
}
add_filter( 'wbcr/factory/admin_notices', 'wbcr_upm_admin_conflict_notices_error', 10, 2 );
/**
* Подключаем скрипты для создания лейблов для списка плагинов
*/
add_action( 'admin_enqueue_scripts', function ( $handles ) {
if ( ! current_user_can( 'install_plugins' ) || ! in_array( $handles, [ 'plugins.php', 'plugins-network.php' ] ) ) {
return;
}
wp_enqueue_style( 'wbcr-upm-plugins', WUPM_PLUGIN_URL . '/admin/assets/css/plugins.css', [], WUPM_Plugin::app()->getPluginVersion() );
wp_enqueue_script( 'wbcr-upm-plugins-js', WUPM_PLUGIN_URL . '/admin/assets/js/plugins.js', [ 'jquery' ], WUPM_Plugin::app()->getPluginVersion() );
} );
/**
* Добавляем код локализации скриптов для создания лейблов в списке плагинов
*/
add_action( 'admin_footer', function () {
if ( ! current_user_can( 'install_plugins' ) || ! in_array( get_current_screen()->id, [
'plugins',
'plugins-network'
] ) ) {
return;
}
$pluginFilters = new WUPM_PluginFilters( WUPM_Plugin::app() );
$filters = $pluginFilters->getPlugins();
$l10n = [
'default' => __( "Auto-update disabled", 'webcraftic-updates-manager' ),
'auto_update' => __( "Auto-update enabled", 'webcraftic-updates-manager' ),
'disable_updates' => __( "Update disabled", 'webcraftic-updates-manager' ),
'disable_tran_update' => __( "Translation update disabled", 'webcraftic-updates-manager' )
];
?>
<script>
// l10n strings
window.wbcr_upm_plugins_label_l10n = window.wbcr_upm_plugins_label_l10n || <?php echo wp_json_encode( $l10n ); ?>;
jQuery(function($) {
var info = <?= json_encode( [
'filters' => $filters,
] ); ?>;
um_add_plugin_icons(info);
});
</script>
<?php
} );

View File

@@ -0,0 +1,157 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
abstract class WUPM_AbstractFilters {
protected $plugin;
protected $update_filters;
protected $is_disable_updates;
protected $is_auto_updates;
protected $is_disable_translation_updates;
function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->plugin = $plugin;
$this->load();
}
/**
* disable all updates for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function disableUpdates( $item_slug ) {
if ( ! $this->is_disable_updates ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_updates'] ) ) {
if ( ! isset( $this->update_filters['disable_updates'][ $item_slug ] ) ) {
$this->update_filters['disable_updates'][ $item_slug ] = true;
}
} else {
$this->update_filters['disable_updates'] = [];
$this->update_filters['disable_updates'][ $item_slug ] = true;
}
$this->save();
}
}
}
/**
* enable all updates for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function enableUpdates( $item_slug ) {
if ( ! $this->is_disable_updates ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_updates'] ) && isset( $this->update_filters['disable_updates'][ $item_slug ] ) ) {
unset( $this->update_filters['disable_updates'][ $item_slug ] );
$this->save();
}
}
}
}
/**
* disable auto-update for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function disableAutoUpdates( $item_slug ) {
if ( $this->is_auto_updates ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_auto_updates'] ) ) {
if ( ! isset( $this->update_filters['disable_auto_updates'][ $item_slug ] ) ) {
$this->update_filters['disable_auto_updates'][ $item_slug ] = true;
}
} else {
$this->update_filters['disable_auto_updates'] = [];
$this->update_filters['disable_auto_updates'][ $item_slug ] = true;
}
$this->save();
}
}
}
/**
* enable auto-update for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function enableAutoUpdates( $item_slug ) {
if ( $this->is_auto_updates ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_auto_updates'] ) && isset( $this->update_filters['disable_auto_updates'][ $item_slug ] ) ) {
unset( $this->update_filters['disable_auto_updates'][ $item_slug ] );
$this->save();
}
}
}
}
/**
* enable translation updates for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function enableTranslationUpdates( $item_slug ) {
if ( ! $this->is_disable_translation_updates ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_translation_updates'] ) && isset( $this->update_filters['disable_translation_updates'][ $item_slug ] ) ) {
unset( $this->update_filters['disable_translation_updates'][ $item_slug ] );
$this->save();
}
}
}
}
/**
* disable translation updates for item
*
* @param $item_slug string - theme or plugin slug (without main file path)
*/
public function disableTranslationUpdates( $item_slug ) {
if ( ! $this->is_disable_translation_updates ) {
if ( ! empty( $item_slug ) ) {
if ( ! isset( $this->update_filters['disable_translation_updates'] ) ) {
$this->update_filters['disable_translation_updates'] = [];
}
$this->update_filters['disable_translation_updates'][ $item_slug ] = true;
$this->save();
}
}
}
/**
* Default filters data
*
* @return array
*/
protected function getDefaultOptions() {
return [
'disable_updates' => [],
'disable_auto_updates' => [],
'disable_translation_updates' => [],
'disable_display' => [],
];
}
/**
* load filters data from db
*/
abstract public function load();
/**
* save filters data to db
*/
abstract public function save();
}

View File

@@ -0,0 +1,163 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once WUPM_PLUGIN_DIR . '/admin/includes/class-abstract-filters.php';
class WUPM_PluginFilters extends WUPM_AbstractFilters {
public function load() {
$updates_mode = $this->plugin->getPopulateOption( 'plugin_updates' );
$this->is_disable_updates = $updates_mode == 'disable_plugin_updates';
$this->is_auto_updates = $updates_mode == 'enable_plugin_auto_updates';
$this->is_disable_translation_updates = $this->plugin->getPopulateOption( 'auto_tran_update' );
$default_options = $this->getDefaultOptions();
$options = $this->plugin->getPopulateOption( 'plugins_update_filters' );
$this->update_filters = array_merge( $default_options, (array) $options );
$this->update_filters = apply_filters( 'wbcr/upm/plugin_filters', $this->update_filters );
$this->ignorePersistentPlugins( $this->update_filters );
}
public function save() {
$this->plugin->updatePopulateOption( 'plugins_update_filters', $this->update_filters );
}
/**
* Disable plugin display in default page Plugins
*
* @param $item_slug - plugin slug (without main file path)
*/
public function disableDisplay( $item_slug ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_display'] ) ) {
if ( ! isset( $this->update_filters['disable_display'][ $item_slug ] ) ) {
$this->update_filters['disable_display'][ $item_slug ] = true;
}
} else {
$this->update_filters['disable_display'] = [];
$this->update_filters['disable_display'][ $item_slug ] = true;
}
$this->save();
}
}
/**
* Enable plugin display in default page Plugins
*
* @param $item_slug - plugin slug (without main file path)
*/
public function enableDisplay( $item_slug ) {
if ( ! empty( $item_slug ) ) {
if ( isset( $this->update_filters['disable_display'] ) && isset( $this->update_filters['disable_display'][ $item_slug ] ) ) {
unset( $this->update_filters['disable_display'][ $item_slug ] );
$this->save();
}
}
}
public function getFilters() {
return $this->update_filters;
}
/**
* Метод возвращает список вычесленных опций для переданных плагинов
*
* @param array|bool $plugin_list - list of plugin slug
*
* @return array
*/
public function getPlugins( $plugin_list = false ) {
// get all plugins
if ( $plugin_list === false ) {
$plugin_list = [];
$all_plugins = get_plugins();
foreach ( $all_plugins as $slug => $plugin ) {
$slug_parts = explode( '/', $slug );
$actual_slug = array_shift( $slug_parts );
$plugin_list[] = $actual_slug;
}
}
$result = $this->getDefaultOptions();
$all_update_disabled = $this->plugin->getPopulateOption( 'plugin_updates' ) === 'disable_plugin_updates';
$update_tran_disabled = $this->plugin->getPopulateOption( 'auto_tran_update' );
$auto_update_disabled = $this->plugin->getPopulateOption( 'plugin_updates' ) !== 'enable_plugin_auto_updates';;
foreach ( $plugin_list as $plugin_slug ) {
// individual rules
$result['disable_updates'][ $plugin_slug ] = false;
if ( isset( $this->update_filters['disable_updates'][ $plugin_slug ] ) and $this->update_filters['disable_updates'][ $plugin_slug ] ) {
$result['disable_updates'][ $plugin_slug ] = true;
}
$result['disable_auto_updates'][ $plugin_slug ] = false;
if ( isset( $this->update_filters['disable_auto_updates'][ $plugin_slug ] ) and $this->update_filters['disable_auto_updates'][ $plugin_slug ] ) {
$result['disable_auto_updates'][ $plugin_slug ] = true;
}
$result['disable_translation_updates'][ $plugin_slug ] = false;
if ( isset( $this->update_filters['disable_translation_updates'][ $plugin_slug ] ) and $this->update_filters['disable_translation_updates'][ $plugin_slug ] ) {
$result['disable_translation_updates'][ $plugin_slug ] = true;
}
if ( isset( $this->update_filters['disable_display'][ $plugin_slug ] ) and $this->update_filters['disable_display'][ $plugin_slug ] ) {
$result['disable_updates'][ $plugin_slug ] = true;
$result['disable_auto_updates'][ $plugin_slug ] = true;
$result['disable_translation_updates'][ $plugin_slug ] = true;
}
// global rules
if ( $all_update_disabled ) {
$result['disable_updates'][ $plugin_slug ] = true;
$result['disable_auto_updates'][ $plugin_slug ] = true;
$result['disable_translation_updates'][ $plugin_slug ] = true;
} else {
if ( $update_tran_disabled ) {
$result['disable_translation_updates'][ $plugin_slug ] = true;
}
if ( $auto_update_disabled ) {
$result['disable_auto_updates'][ $plugin_slug ] = true;
}
}
}
$result = $this->ignorePersistentPlugins( $result );
return $result;
}
/** исключает специальные плагины из фильтров
*
* @param $plugins
*
* @return mixed
*/
private function ignorePersistentPlugins( $plugins ) {
$persistPlugins = self::getPersistentPlugins();
foreach ( $persistPlugins as $persistPlugin ) {
$slug_parts = explode( '/', $persistPlugin );
$actual_slug = array_shift( $slug_parts );
if ( array_key_exists( $actual_slug, (array) $plugins['disable_updates'] ) ) {
unset( $plugins['disable_updates'][ $actual_slug ] );
}
}
return $plugins;
}
/**
* @return array список специальных плагинов
*/
static public function getPersistentPlugins() {
return [
"wp-plugin-clearfy/clearfy.php",
"clearfy/clearfy.php",
"wp-plugin-update-manager/webcraftic-updates-manager.php",
"webcraftic-updates-manager/webcraftic-updates-manager.php"
];
}
}

View File

@@ -0,0 +1,50 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once WUPM_PLUGIN_DIR . '/admin/includes/class-abstract-filters.php';
class WUPM_ThemeFilters extends WUPM_AbstractFilters {
public function load() {
$updates_mode = $this->plugin->getPopulateOption( 'theme_updates' );
$this->is_disable_updates = $updates_mode == 'disable_theme_updates';
$this->is_auto_updates = $updates_mode == 'enable_theme_auto_updates';
$this->is_disable_translation_updates = $this->plugin->getPopulateOption( 'auto_tran_update' );
$default_options = $this->getDefaultOptions();
$options = $this->plugin->getPopulateOption( 'themes_update_filters' );
$this->update_filters = array_merge( $default_options, (array) $options );
}
public function save() {
$this->plugin->updatePopulateOption( 'themes_update_filters', $this->update_filters );
}
public function disableUpdates( $item_slug ) {
parent::disableUpdates( $item_slug );
$this->clearThemeUpdateCache();
}
public function enableUpdates( $item_slug ) {
parent::enableUpdates( $item_slug );
$this->clearThemeUpdateCache();
}
public function clearThemeUpdateCache() {
$last_update = get_site_transient( 'update_themes' );
if ( ! is_object( $last_update ) ) {
$last_update = new stdClass;
}
// set expired time
$last_update->last_checked = 0;
set_site_transient( 'update_themes', $last_update );
}
}

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,150 @@
<?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 WUPM_AdvancedPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
* {@inheritDoc}
*
* @var string
*/
public $id = "updates_advanced";
/**
* {@inheritDoc}
*
* @var string
*/
public $type = "page";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_parent_page = 'updates';
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-cloud';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* WUPM_AdvancedPage constructor.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Advanced', 'webcraftic-updates-manager' );
parent::__construct( $plugin );
}
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_ScriptList $scripts
* @param \Wbcr_Factory480_StyleList $styles
*/
public function assets( $scripts, $styles ) {
parent::assets( $scripts, $styles );
// Add Clearfy styles for HMWP pages
if ( defined( 'WCL_PLUGIN_ACTIVE' ) ) {
$this->styles->add( WCL_PLUGIN_URL . '/admin/assets/css/general.css' );
}
}
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
public function warningNotice() {
parent::warningNotice();
if ( isset( $_GET['wbcr_force_update'] ) ) {
$concat = __( 'Please, wait 90 sec. to see the forced automatic update result.', 'webcraftic-updates-manager' ) . '<br>';
$this->printWarningNotice( $concat );
}
}
public function showPageContent() {
?>
<div style="padding: 20px;">
<h4><?php _e( 'Force Automatic Updates', 'webcraftic-updates-manager' ); ?></h4>
<p><?php _e( 'This will attempt to force automatic updates. This is useful for debugging.', 'webcraftic-updates-manager' ); ?></p>
<a href="<?php $this->actionUrl( 'force-plugins-update' ) ?>" class="button button-default"><?php _e( 'Force update', 'webcraftic-updates-manager' ); ?></a>
</div>
<?php
}
public function forcePluginsUpdateAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
return;
}
$shedule_auto_update = function () {
wp_schedule_single_event( time() + 10, 'wp_update_plugins' );
wp_schedule_single_event( time() + 10, 'wp_version_check' );
wp_schedule_single_event( time() + 10, 'wp_update_themes' );
wp_schedule_single_event( time() + 45, 'wp_maybe_auto_update' );
if ( get_option( 'auto_updater.lock', false ) ) {
update_option( 'auto_updater.lock', time() - HOUR_IN_SECONDS * 2 );
}
};
if ( WUPM_Plugin::app()->isNetworkAdmin() ) {
foreach ( WUPM_Plugin::app()->getActiveSites() as $site ) {
switch_to_blog( $site->blog_id );
$shedule_auto_update();
restore_current_blog();
}
} else {
$shedule_auto_update();
}
$this->redirectToAction( 'index', [ 'wbcr_force_update' => 1 ] );
}
}

View File

@@ -0,0 +1,21 @@
<?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 WUPM_MoreFeaturesPage extends \WBCR\Factory_Templates_134\Pages\MoreFeatures {
}

View File

@@ -0,0 +1,566 @@
<?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 WUPM_PluginsPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
*{@inheritDoc}
*
* @var string
*/
public $id = "plugins";
/**
* {@inheritDoc}
*
* @var string
*/
public $type = "page";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_parent_page = 'updates';
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-cloud';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* @var
*/
private $is_disable_updates;
/**
* @var
*/
private $is_auto_updates;
private $is_disable_translation_updates;
/**
* @var array
*/
private $plugins_update_filters = [];
/**
* WUPM_PluginsPage constructor.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Plugins', 'webcraftic-updates-manager' );
parent::__construct( $plugin );
$updates_mode = $this->getPopulateOption( 'plugin_updates' );
$this->is_disable_updates = $updates_mode == 'disable_plugin_updates';
$this->is_auto_updates = $updates_mode == 'enable_plugin_auto_updates';
$this->is_disable_translation_updates = $this->getPopulateOption( 'auto_tran_update' );
$this->plugins_update_filters = $this->getPopulateOption( 'plugins_update_filters' );
}
public function warningNotice() {
parent::warningNotice();
$concat = '';
if ( $this->is_disable_updates ) {
$concat .= __( '- To disable updates individually choose the “Manual or automatic plugin updates” option then save settings and comeback to this page.', 'webcraftic-updates-manager' ) . '<br>';
}
if ( ! $this->is_auto_updates ) {
$concat .= __( '- To configure plugin auto updates individually, choose the “Enable auto updates” option then save settings and comeback to this page.', 'webcraftic-updates-manager' );
}
if ( ! empty( $concat ) ) {
$this->printWarningNotice( $concat );
}
}
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_ScriptList $scripts
* @param \Wbcr_Factory480_StyleList $styles
*/
public function assets( $scripts, $styles ) {
parent::assets( $scripts, $styles );
$this->styles->add( WUPM_PLUGIN_URL . '/admin/assets/css/general.css' );
$this->scripts->add( WUPM_PLUGIN_URL . '/admin/assets/js/ajax-components.js' );
$this->scripts->localize(
'wbcr_upm_ajax',
array(
'nonce' => wp_create_nonce( 'wbcr_upm_change_flag')
)
);
// Add Clearfy styles for HMWP pages
if ( defined( 'WCL_PLUGIN_ACTIVE' ) ) {
$this->styles->add( WCL_PLUGIN_URL . '/admin/assets/css/general.css' );
}
}
public function savePluginsUpdateFilters() {
$this->plugin->updatePopulateOption( 'plugins_update_filters', $this->plugins_update_filters );
}
public function disablePluginUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( isset( $this->plugins_update_filters['disable_updates'] ) ) {
if ( ! isset( $this->plugins_update_filters['disable_updates'][ $plugin_slug ] ) ) {
$this->plugins_update_filters['disable_updates'][ $plugin_slug ] = true;
}
} else {
$this->plugins_update_filters['disable_updates'] = [];
$this->plugins_update_filters['disable_updates'][ $plugin_slug ] = true;
}
$this->savePluginsUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function enablePluginUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( isset( $this->plugins_update_filters['disable_updates'] ) && isset( $this->plugins_update_filters['disable_updates'][ $plugin_slug ] ) ) {
unset( $this->plugins_update_filters['disable_updates'][ $plugin_slug ] );
$this->savePluginsUpdateFilters();
}
}
}
$this->redirectToAction( 'index' );
}
public function disablePluginAutoupdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( $this->is_auto_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( isset( $this->plugins_update_filters['disable_auto_updates'] ) ) {
if ( ! isset( $this->plugins_update_filters['disable_auto_updates'][ $plugin_slug ] ) ) {
$this->plugins_update_filters['disable_auto_updates'][ $plugin_slug ] = true;
}
} else {
$this->plugins_update_filters['disable_auto_updates'] = [];
$this->plugins_update_filters['disable_auto_updates'][ $plugin_slug ] = true;
}
$this->savePluginsUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function enablePluginAutoupdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( $this->is_auto_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( isset( $this->plugins_update_filters['disable_auto_updates'] ) && isset( $this->plugins_update_filters['disable_auto_updates'][ $plugin_slug ] ) ) {
unset( $this->plugins_update_filters['disable_auto_updates'][ $plugin_slug ] );
$this->savePluginsUpdateFilters();
}
}
}
$this->redirectToAction( 'index' );
}
public function enablePluginTranslationUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_translation_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( isset( $this->plugins_update_filters['disable_translation_updates'] ) && isset( $this->plugins_update_filters['disable_translation_updates'][ $plugin_slug ] ) ) {
unset( $this->plugins_update_filters['disable_translation_updates'][ $plugin_slug ] );
$this->savePluginsUpdateFilters();
}
}
}
$this->redirectToAction( 'index' );
}
public function disablePluginTranslationUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_translation_updates ) {
$plugin_slug = $this->request->get( 'plugin_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $plugin_slug );
if ( ! empty( $plugin_slug ) ) {
if ( ! isset( $this->plugins_update_filters['disable_translation_updates'] ) ) {
$this->plugins_update_filters['disable_translation_updates'] = [];
}
$this->plugins_update_filters['disable_translation_updates'][ $plugin_slug ] = true;
$this->savePluginsUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function showPageContent() {
if ( isset( $_POST['wbcr_upm_apply'] ) ) {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$bulk_action = $this->request->post( 'wbcr_upm_bulk_actions', null, true );
$plugin_slugs = $this->request->post( 'plugin_slugs', [], true );
$plugin_slugs = array_map( 'strip_tags', $plugin_slugs );
check_admin_referer( $this->getResultId() . '_form' );
// validate $bulk_action
if ( ! empty( $bulk_action ) and ! in_array( $bulk_action, [
'disable_updates',
'enable_updates',
'enable_auto_updates',
'disable_auto_updates',
'disable_translation_updates',
'enable_translation_updates',
'disable_display',
'enable_display'
] ) ) {
$bulk_action = null;
}
if ( ! $this->is_disable_updates ) {
if ( ! empty( $bulk_action ) && ! empty( $plugin_slugs ) && is_array( $plugin_slugs ) ) {
foreach ( (array) $plugin_slugs as $slug ) {
if ( $bulk_action == 'enable_updates' && isset( $this->plugins_update_filters['disable_updates'] ) && isset( $this->plugins_update_filters['disable_updates'][ $slug ] ) ) {
unset( $this->plugins_update_filters['disable_updates'][ $slug ] );
}
if ( $bulk_action == 'enable_auto_updates' ) {
if ( $this->is_auto_updates ) {
if ( isset( $this->plugins_update_filters['disable_auto_updates'] ) && isset( $this->plugins_update_filters['disable_auto_updates'][ $slug ] ) ) {
unset( $this->plugins_update_filters['disable_auto_updates'][ $slug ] );
}
}
} else {
if ( $bulk_action == 'disable_auto_updates' && ! $this->is_auto_updates ) {
continue;
}
$this->plugins_update_filters[ $bulk_action ][ $slug ] = true;
}
if ( $bulk_action == 'disable_translation_updates' ) {
if ( ! $this->is_disable_translation_updates ) {
$this->plugins_update_filters['disable_translation_updates'][ $slug ] = true;
}
}
if ( $bulk_action == 'enable_translation_updates' && array_key_exists( $slug, $this->plugins_update_filters['disable_translation_updates'] ) ) {
if ( ! $this->is_disable_translation_updates ) {
unset( $this->plugins_update_filters['disable_translation_updates'][ $slug ] );
}
}
}
}
}
if ( ! empty( $bulk_action ) && ! empty( $plugin_slugs ) && is_array( $plugin_slugs ) ) {
foreach ( (array) $plugin_slugs as $slug ) {
if ( $bulk_action == 'disable_display' ) {
if ( ! isset( $this->plugins_update_filters['disable_display'] ) ) {
$this->plugins_update_filters['disable_display'] = [];
}
$this->plugins_update_filters['disable_display'][ $slug ] = true;
}
if ( $bulk_action == 'enable_display' && isset( $this->plugins_update_filters['disable_display'] ) && isset( $this->plugins_update_filters['disable_display'][ $slug ] ) ) {
unset( $this->plugins_update_filters['disable_display'][ $slug ] );
}
}
}
$this->savePluginsUpdateFilters();
}
$is_premium = defined( 'WUPMP_PLUGIN_ACTIVE' );
?>
<div class="wbcr-factory-page-group-header">
<strong><?php _e( 'Plugins list', 'webcraftic-updates-manager' ) ?></strong>
<p>
<?php _e( 'This page you can individually disable plugin updates and auto updates.', 'webcraftic-updates-manager' ) ?>
</p>
</div>
<style>
#the-list tr.inactive .check-column {
border-left: 3px solid #D54E21;
}
#the-list tr.inactive {
background: #FEF7F1;
}
</style>
<form method="post" style="padding: 20px;">
<?php wp_nonce_field( $this->getResultId() . '_form' ) ?>
<p>
<select name="wbcr_upm_bulk_actions" id="wbcr_upm_bulk_actions">
<option value="0"><?php _e( 'Bulk actions', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_updates"><?php _e( 'Disable updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_updates"><?php _e( 'Enable updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_auto_updates"><?php _e( 'Enable auto-updates', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_auto_updates"><?php _e( 'Disable auto-updates', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_translation_updates"<?= ( ! $is_premium ? ' disabled' : '' ) ?>><?php _e( 'Disable translation updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_translation_updates"<?= ( ! $is_premium ? ' disabled' : '' ) ?>><?php _e( 'Enable translation updates', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_display"<?= ( ! $is_premium ? ' disabled' : '' ) ?>><?php _e( 'Hide plugin', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_display"<?= ( ! $is_premium ? ' disabled' : '' ) ?>><?php _e( 'Show plugin', 'webcraftic-updates-manager' ); ?></option>
</select>
<input type="submit" name="wbcr_upm_apply" id="wbcr_upm_apply" class='button button-alt' value='<?php _e( "Apply", "webcraftic-updates-manager" ); ?>'>
</p>
<table class="wp-list-table widefat autoupdate striped plugins wp-list-table__plugins">
<thead>
<tr>
<th id='cb' class='manage-column column-cb check-column'>
<input class="wbcr_um_select_all" type="checkbox">
</th>
<th id='name' class='manage-column column-name column-primary'>
<strong><?php _e( 'Plugin', 'webcraftic-updates-manager' ); ?></strong></th>
<th id="disable_updates">
<strong><?php _e( 'Disable updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
<th id="disable_auto_updates">
<strong><?php _e( 'Auto-updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
<th id="disable_translation_updates"<?= ( ! $is_premium ? ' class="wbcr-upm-column-pro"' : '' ) ?>>
<strong><?php _e( 'Translation updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
<th id="hide_item"<?= ( ! $is_premium ? ' class="wbcr-upm-column-pro"' : '' ) ?>>
<strong><?php _e( 'Hide plugin', 'webcraftic-updates-manager' ); ?></strong>
</th>
</tr>
</thead>
<tbody id="the-list">
<?php
$prefix = $this->plugin->getPrefix();
foreach ( get_plugins() as $key => $value ):
$slug = $key;
$slug_parts = explode( '/', $slug );
$actual_slug = array_shift( $slug_parts );
$slug_hash = md5( $slug );
$description = $name = 'Empty';
foreach ( (array) $value as $k => $v ) {
if ( $k == "Name" ) {
$name = $v;
}
if ( $k == "Description" ) {
$description = $v;
}
}
$class = 'active';
$is_disable_updates = false;
$is_auto_updates = true;
$is_disable_translation_update = false;
$is_disable_display = false;
if ( ! empty( $this->plugins_update_filters ) ) {
if ( isset( $this->plugins_update_filters['disable_auto_updates'] ) && isset( $this->plugins_update_filters['disable_auto_updates'][ $actual_slug ] ) ) {
$is_auto_updates = false;
}
if ( ( isset( $this->plugins_update_filters['disable_updates'] ) && isset( $this->plugins_update_filters['disable_updates'][ $actual_slug ] ) ) ) {
$is_disable_updates = true;
}
}
if ( $this->is_disable_updates ) {
$is_disable_updates = true;
}
if ( ! empty( $this->plugins_update_filters ) ) {
if ( isset( $this->plugins_update_filters['disable_translation_updates'] ) && isset( $this->plugins_update_filters['disable_translation_updates'][ $actual_slug ] ) ) {
$is_disable_translation_update = true;
}
}
if ( isset( $this->plugins_update_filters['disable_display'] ) && isset( $this->plugins_update_filters['disable_display'][ $actual_slug ] ) ) {
$is_disable_display = true;
}
if ( $is_disable_display or $is_disable_updates ) {
$class = 'inactive';
}
if ( $this->is_disable_updates ) {
$class = 'inactive row-global-disabled';
}
?>
<tr id="post-<?= esc_attr( $slug_hash ) ?>" class="<?= $class ?>">
<td scope="row" class="check-column">
<label class="screen-reader-text" for="cb-select-<?= esc_attr( $slug_hash ) ?>"><?php _e( 'Select', 'webcraftic-updates-manager' ) ?><?= esc_html( $name ) ?></label>
<input id="cb-select-<?= esc_attr( $slug_hash ) ?>" type="checkbox" name="plugin_slugs[]" value="<?= esc_attr( $actual_slug ) ?>">
<label></label>
<div class="locked-indicator"></div>
</td>
<td class="plugin-title column-primary">
<strong class="plugin-name">
<?= esc_html( $name ) ?>
</strong>
</td>
<!-- отключить все обновления -->
<td class="column-flags">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= 'group-all-' . $slug_hash; ?>">
<?php
$disabled = $this->is_disable_updates;
if ( $is_disable_display ) {
$disabled = true;
}
$checked = false;
if ( $is_disable_updates ) {
$checked = true;
}
if ( in_array( $key, WUPM_PluginFilters::getPersistentPlugins() ) ) {
// deny disable update for update manager
$disabled = true;
}
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ? 'active' : '' ); ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_updates" class="factory-result factory-ajax-checkbox"
data-disable-group="<?= 'group-' . $slug_hash; ?>" data-action="Updates" data-plugin-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
<!-- отключить авто-обновления -->
<td class="column-flags">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= 'group-' . $slug_hash; ?> <?= 'group-all-' . $slug_hash; ?> <?= ( ! $this->is_auto_updates ) ? 'global-disabled' : ''; ?> ">
<?php
$disabled = false;
if ( ! $this->is_auto_updates or $is_disable_updates or $is_disable_display ) {
$disabled = true;
}
$checked = $is_auto_updates;
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ) ? 'disabled' : ''; ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_auto_updates" class="factory-result factory-ajax-checkbox"
data-action="AutoUpdates" data-inverse="1" data-plugin-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
<!-- отключить обновления переводов -->
<td class="column-flags <?= ( ! $is_premium ) ? "wbcr-upm-column-premium" : ""; ?>">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= 'group-' . $slug_hash; ?> <?= 'group-all-' . $slug_hash; ?> <?= ( ! $is_premium or $this->is_disable_translation_updates ? 'global-disabled' : '' ); ?>">
<?php
$disabled = false;
if ( ! $is_premium or $is_disable_updates or $this->is_disable_translation_updates or $is_disable_display ) {
$disabled = true;
}
$checked = ! $is_disable_translation_update;
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ) ? 'active' : ''; ?>" <?= ( $disabled ) ? 'disabled' : ''; ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ) ? 'active' : ''; ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_translation_updates" class="factory-result factory-ajax-checkbox"
data-action="TranslationUpdates" data-inverse="1" data-plugin-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
<!-- скрыть плагин -->
<td class="column-flags <?= ( ! $is_premium ? "wbcr-upm-column-premium" : "" ); ?>">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= ( ! $is_premium ? 'global-disabled' : '' ); ?>">
<?php
$checked = $is_disable_display;
$disabled = false;
if ( ! $is_premium ) {
$disabled = true;
}
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ? 'active' : '' ); ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_hide_item" class="factory-result factory-ajax-checkbox"
data-disable-group="<?= 'group-all-' . $slug_hash; ?>" data-action="Display" data-plugin-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</form>
<?php
}
}

View File

@@ -0,0 +1,508 @@
<?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 WUPM_ThemesPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
* {@inheritDoc}
*
* @var string
*/
public $id = "themes";
/**
* {@inheritDoc}
*
* @var string
*/
public $type = "page";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_parent_page = 'updates';
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-cloud';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* {@inheritDoc}
*
* @var
*/
private $is_disable_updates;
/**
* {@inheritDoc}
*
* @var
*/
private $is_auto_updates;
/**
* @var mixed|void
*/
private $is_disable_translation_updates;
/**
* @var array
*/
private $themes_update_filters = [];
/**
* @param Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Themes', 'webcraftic-updates-manager' );
parent::__construct( $plugin );
$updates_mode = $this->getPopulateOption( 'theme_updates' );
$this->is_disable_updates = $updates_mode == 'disable_theme_updates';
$this->is_auto_updates = $updates_mode == 'enable_theme_auto_updates';
$this->is_disable_translation_updates = $this->getPopulateOption( 'auto_tran_update' );
$this->themes_update_filters = $this->getPopulateOption( 'themes_update_filters' );
}
public function warningNotice() {
parent::warningNotice();
$concat = '';
if ( $this->is_disable_updates ) {
$concat .= __( '- To disable updates individually choose the “Manual or automatic theme updates” option then save settings and comeback to this page.', 'webcraftic-updates-manager' ) . '<br>';
}
if ( ! $this->is_auto_updates ) {
$concat .= __( '- To configure theme auto updates individually, choose the “Enable auto updates” option then save settings and comeback to this page.', 'webcraftic-updates-manager' );
}
if ( ! empty( $concat ) ) {
$this->printWarningNotice( $concat );
}
}
/**
* Requests assets (js and css) for the page.
*
* @since 1.0.0
* @return void
* @see FactoryPages480_AdminPage
*
*/
public function assets( $scripts, $styles ) {
parent::assets( $scripts, $styles );
$this->styles->add( WUPM_PLUGIN_URL . '/admin/assets/css/general.css' );
$this->scripts->add( WUPM_PLUGIN_URL . '/admin/assets/js/ajax-components.js' );
// Add Clearfy styles for HMWP pages
if ( defined( 'WCL_PLUGIN_ACTIVE' ) ) {
$this->styles->add( WCL_PLUGIN_URL . '/admin/assets/css/general.css' );
}
}
public function saveThemesUpdateFilters() {
$this->plugin->updateOption( 'themes_update_filters', $this->themes_update_filters );
}
public function disableThemeUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_updates ) {
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( isset( $this->themes_update_filters['disable_updates'] ) ) {
if ( ! isset( $this->themes_update_filters['disable_updates'][ $theme_slug ] ) ) {
$this->themes_update_filters['disable_updates'][ $theme_slug ] = true;
}
} else {
$this->themes_update_filters['disable_updates'] = [];
$this->themes_update_filters['disable_updates'][ $theme_slug ] = true;
}
$this->saveThemesUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function enableThemeUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( ! $this->is_disable_updates ) {
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( isset( $this->themes_update_filters['disable_updates'] ) && isset( $this->themes_update_filters['disable_updates'][ $theme_slug ] ) ) {
unset( $this->themes_update_filters['disable_updates'][ $theme_slug ] );
$this->saveThemesUpdateFilters();
}
}
}
$this->redirectToAction( 'index' );
}
public function disableThemeAutoupdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( $this->is_auto_updates ) {
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( isset( $this->themes_update_filters['disable_auto_updates'] ) ) {
if ( ! isset( $this->themes_update_filters['disable_auto_updates'][ $theme_slug ] ) ) {
$this->themes_update_filters['disable_auto_updates'][ $theme_slug ] = true;
}
} else {
$this->themes_update_filters['disable_auto_updates'] = [];
$this->themes_update_filters['disable_auto_updates'][ $theme_slug ] = true;
}
$this->saveThemesUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function enableThemeAutoupdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
if ( $this->is_auto_updates ) {
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( isset( $this->themes_update_filters['disable_auto_updates'] ) && isset( $this->themes_update_filters['disable_auto_updates'][ $theme_slug ] ) ) {
unset( $this->themes_update_filters['disable_auto_updates'][ $theme_slug ] );
$this->saveThemesUpdateFilters();
}
}
}
$this->redirectToAction( 'index' );
}
public function disableThemeTranslationUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( ! isset( $this->themes_update_filters['disable_translation_updates'] ) ) {
$this->themes_update_filters['disable_translation_updates'] = [];
}
$this->themes_update_filters['disable_translation_updates'][ $theme_slug ] = true;
$this->saveThemesUpdateFilters();
}
$this->redirectToAction( 'index' );
}
public function enableThemeTranslationUpdatesAction() {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$theme_slug = $this->request->get( 'theme_slug', null, true );
check_admin_referer( $this->getResultId() . '_' . $theme_slug );
if ( ! empty( $theme_slug ) ) {
if ( isset( $this->themes_update_filters['disable_translation_updates'] ) && isset( $this->themes_update_filters['disable_translation_updates'][ $theme_slug ] ) ) {
unset( $this->themes_update_filters['disable_translation_updates'][ $theme_slug ] );
$this->saveThemesUpdateFilters();
}
}
$this->redirectToAction( 'index' );
}
public function showPageContent() {
if ( isset( $_POST['wbcr_upm_apply'] ) ) {
if ( ! current_user_can( 'install_plugins' ) ) {
wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
}
$bulk_action = $this->request->post( 'wbcr_upm_bulk_actions', null, true );
$theme_slugs = $this->request->post( 'theme_slugs', [], true );
$theme_slugs = array_map( 'strip_tags', $theme_slugs );
check_admin_referer( $this->getResultId() . '_form' );
// validate $bulk_action
if ( ! empty( $bulk_action ) and ! in_array( $bulk_action, [
'disable_updates',
'enable_updates',
'enable_auto_updates',
'disable_auto_updates',
'disable_translation_updates',
'enable_translation_updates',
] ) ) {
$bulk_action = null;
}
if ( ! $this->is_disable_updates ) {
if ( ! empty( $bulk_action ) && ! empty( $theme_slugs ) && is_array( $theme_slugs ) ) {
foreach ( (array) $theme_slugs as $slug ) {
if ( $bulk_action == 'enable_updates' && isset( $this->themes_update_filters['disable_updates'] ) && isset( $this->themes_update_filters['disable_updates'][ $slug ] ) ) {
unset( $this->themes_update_filters['disable_updates'][ $slug ] );
}
if ( $bulk_action == 'enable_auto_updates' ) {
if ( $this->is_auto_updates ) {
if ( isset( $this->themes_update_filters['disable_auto_updates'] ) && isset( $this->themes_update_filters['disable_auto_updates'][ $slug ] ) ) {
unset( $this->themes_update_filters['disable_auto_updates'][ $slug ] );
}
}
} else {
if ( $bulk_action == 'disable_auto_updates' && ! $this->is_auto_updates ) {
continue;
}
$this->themes_update_filters[ $bulk_action ][ $slug ] = true;
}
if ( $bulk_action == 'disable_translation_updates' ) {
if ( ! $this->is_disable_translation_updates ) {
$this->themes_update_filters['disable_translation_updates'][ $slug ] = true;
}
}
if ( $bulk_action == 'enable_translation_updates' && array_key_exists( $slug, $this->themes_update_filters['disable_translation_updates'] ) ) {
if ( ! $this->is_disable_translation_updates ) {
unset( $this->themes_update_filters['disable_translation_updates'][ $slug ] );
}
}
}
$this->saveThemesUpdateFilters();
}
}
}
$is_premium = defined( 'WUPMP_PLUGIN_ACTIVE' );
?>
<div class="wbcr-factory-page-group-header">
<strong<?= ( ! $is_premium ? ' class="wbcr-upm-group-header-pro"' : '' ); ?>><?php _e( 'Themes list', 'webcraftic-updates-manager' ) ?></strong>
<p>
<?php _e( 'This page you can individually disable theme updates and auto updates.', 'webcraftic-updates-manager' ) ?>
</p>
</div>
<style>
#the-list tr.inactive .check-column {
border-left: 3px solid #D54E21;
}
#the-list tr.inactive {
background: #FEF7F1;
}
</style>
<form method="post" style="padding: 20px;">
<?php wp_nonce_field( $this->getResultId() . '_form' ) ?>
<p>
<select name="wbcr_upm_bulk_actions" id="wbcr_upm_bulk_actions" <?= ( ! $is_premium ? 'disabled' : '' ); ?>>
<option value="0"><?php _e( 'Bulk actions', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_updates"><?php _e( 'Disable updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_updates"><?php _e( 'Enable updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_auto_updates"><?php _e( 'Enable auto-updates', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_auto_updates"><?php _e( 'Disable auto-updates', 'webcraftic-updates-manager' ); ?></option>
<option value="disable_translation_updates"><?php _e( 'Disable translation updates', 'webcraftic-updates-manager' ); ?></option>
<option value="enable_translation_updates"><?php _e( 'Enable translation updates', 'webcraftic-updates-manager' ); ?></option>
</select>
<input type="submit" name="wbcr_upm_apply" id="wbcr_upm_apply" class='button button-alt' value='<?php _e( "Apply", "webcraftic-updates-manager" ); ?>' <?= ( ! $is_premium ) ? 'disabled' : ''; ?>>
</p>
<table class="wp-list-table wbcr-upm-list-table-pro widefat autoupdate striped plugins <?= ( ! $is_premium ? "wbcr-upm-column-premium" : "" ); ?>">
<thead>
<tr>
<th id='cb' class='manage-column column-cb check-column'>
<input class="wbcr_um_select_all" type="checkbox">
</th>
<th id='name' class='manage-column column-name column-primary'>
<strong><?php _e( 'Theme', 'webcraftic-updates-manager' ); ?></strong></th>
<th id="disable_updates">
<strong><?php _e( 'Disable updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
<th id="disable_auto_updates">
<strong><?php _e( 'Auto-updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
<th id="disable_translation_updates">
<strong><?php _e( 'Translation updates', 'webcraftic-updates-manager' ); ?></strong>
</th>
</tr>
</thead>
<tbody id="the-list">
<?php
$prefix = $this->plugin->getPrefix();
foreach ( wp_get_themes() as $key => $value ):
$actual_slug = $key;
$slug_hash = md5( $actual_slug );
$description = $name = 'Empty';
if ( $value->Name ) {
$name = $value->Name;
}
if ( $value->Description ) {
$description = $value->Description;
}
$class = 'active';
$is_disable_updates = false;
$is_auto_updates = true;
$is_disable_translation_update = false;
if ( ! empty( $this->themes_update_filters ) ) {
if ( isset( $this->themes_update_filters['disable_auto_updates'] ) && isset( $this->themes_update_filters['disable_auto_updates'][ $actual_slug ] ) ) {
$is_auto_updates = false;
}
if ( ( isset( $this->themes_update_filters['disable_updates'] ) && isset( $this->themes_update_filters['disable_updates'][ $actual_slug ] ) ) ) {
$class = 'inactive';
$is_disable_updates = true;
}
}
if ( $this->is_disable_updates ) {
$class = 'inactive row-global-disabled';
$is_disable_updates = true;
}
if ( ! empty( $this->themes_update_filters ) ) {
if ( isset( $this->themes_update_filters['disable_translation_updates'] ) && isset( $this->themes_update_filters['disable_translation_updates'][ $actual_slug ] ) ) {
$is_disable_translation_update = true;
}
}
?>
<tr id="post-<?= esc_attr( $slug_hash ) ?>" class="<?= $class ?>">
<td scope="row" class="check-column">
<label class="screen-reader-text" for="cb-select-<?= esc_attr( $slug_hash ) ?>"><?php _e( 'Select', 'webcraftic-updates-manager' ) ?><?= esc_html( $name ) ?></label>
<input id="cb-select-<?= esc_attr( $slug_hash ) ?>" class="wbcr_um_select_item" type="checkbox" name="theme_slugs[]" value="<?= esc_attr( $actual_slug ) ?>" <?= ( ! $is_premium ? 'disabled' : '' ); ?>>
<label></label>
<div class="locked-indicator"></div>
</td>
<td class="plugin-title column-primary">
<strong class="plugin-name">
<?= esc_html( $name ) ?>
</strong>
</td>
<!-- отключить все обновления -->
<td class="column-flags">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group">
<?php
$disabled = $this->is_disable_updates;
$checked = false;
if ( $is_disable_updates ) {
$checked = true;
}
if ( ! $is_premium ) {
$disabled = true;
}
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ) ? 'active' : ''; ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_updates" class="factory-result factory-ajax-checkbox"
data-disable-group="<?= 'group-' . $slug_hash; ?>" data-action="Updates" data-theme-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
<!-- отключить авто-обновления -->
<td class="column-flags">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= 'group-' . $slug_hash; ?> <?= ( ! $is_premium or ! $this->is_auto_updates ) ? 'global-disabled' : ''; ?>">
<?php
$disabled = false;
if ( ! $is_premium or ! $this->is_auto_updates or $is_disable_updates ) {
$disabled = true;
}
$checked = false;
if ( $is_auto_updates ) {
$checked = true;
}
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ) ? 'active' : ''; ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_auto_updates" class="factory-result factory-ajax-checkbox"
data-action="AutoUpdates" data-inverse="1" data-theme-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
<!-- отключить обновления переводов -->
<td class="column-flags">
<div class="factory-checkbox factory-from-control-checkbox factory-buttons-way btn-group <?= 'group-' . $slug_hash; ?> <?= ( ! $is_premium or $this->is_disable_translation_updates ) ? 'global-disabled' : ''; ?>">
<?php
$disabled = false;
if ( ! $is_premium or $is_disable_updates or $this->is_disable_translation_updates ) {
$disabled = true;
}
$checked = false;
if ( ! $is_disable_translation_update ) {
$checked = true;
}
?>
<button type="button" class="btn btn-default btn-small btn-sm factory-on <?= ( $checked ? 'active' : '' ); ?>" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'On', 'webcraftic-updates-manager' ); ?></button>
<button type="button" class="btn btn-default btn-small btn-sm factory-off <?= ( ! $checked ) ? 'active' : ''; ?>" data-value="0" <?= ( $disabled ? 'disabled' : '' ); ?>><?php _e( 'Off', 'webcraftic-updates-manager' ); ?></button>
<input type="checkbox" style="display: none" id="wbcr_updates_manager_disable_translation_updates" class="factory-result factory-ajax-checkbox"
data-action="TranslationUpdates" data-inverse="1" data-theme-slug="<?= $actual_slug ?>" value="<?= (int) $checked ?>" <?= ( $checked ? 'checked' : '' ); ?> <?= ( $disabled ? 'disabled' : '' ); ?>>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</form>
<?php
}
}

View File

@@ -0,0 +1,285 @@
<?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 WUPM_UpdatesPage extends WBCR\Factory_Templates_134\Pages\PageBase {
/**
* {@inheritDoc}
*
* @var string
*/
public $id = "updates";
/**
* {@inheritDoc}
*
* @var string
*/
public $page_menu_dashicon = 'dashicons-cloud';
/**
* {@inheritDoc}
*
* @var bool
*/
public $available_for_multisite = true;
/**
* {@inheritDoc}
*
* @since 1.1.0
* @var bool
*/
public $show_right_sidebar_in_options = true;
/**
* WUPM_UpdatesPage constructor.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*
* @param \Wbcr_Factory480_Plugin $plugin
*/
public function __construct( Wbcr_Factory480_Plugin $plugin ) {
$this->menu_title = __( 'Updates manager', 'webcraftic-updates-manager' );
$this->page_menu_short_description = __( 'Manage all site updates', 'webcraftic-updates-manager' );
if ( ! defined( 'LOADING_UPDATES_MANAGER_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_UPDATES_MANAGER_AS_ADDON' ) ? __( 'Updates', 'webcraftic-updates-manager' ) : __( 'Updates manager', 'webcraftic-updates-manager' );
}*/
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @return string|void
*/
public function getPageTitle() {
return defined( 'LOADING_UPDATES_MANAGER_AS_ADDON' ) ? __( 'Updates', 'webcraftic-updates-manager' ) : __( 'General', 'webcraftic-updates-manager' );
}
/**
* {@inheritDoc}
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com> *
*
* @param \Wbcr_Factory480_ScriptList $scripts
* @param \Wbcr_Factory480_StyleList $styles
*/
public function assets( $scripts, $styles ) {
parent::assets( $scripts, $styles );
$this->styles->add( WUPM_PLUGIN_URL . '/admin/assets/css/general.css' );
// Add Clearfy styles for HMWP pages
if ( defined( 'WCL_PLUGIN_ACTIVE' ) ) {
$this->styles->add( WCL_PLUGIN_URL . '/admin/assets/css/general.css' );
}
}
/**
* Permalinks options.
*
* @since 1.0.0
* @return mixed[]
*/
public function getPageOptions() {
$is_premium = defined( 'WUPMP_PLUGIN_ACTIVE' );
$options = [];
$options[] = [
'type' => 'html',
'html' => '<div class="wbcr-factory-page-group-header"><strong>' . __( 'General settings for WordPress, plugins and themes updates', 'webcraftic-updates-manager' ) . '</strong><p>' . __( 'This page, you can enable or disable automatic updates. To test the automatic updates, click the "Advanced" tab.', 'webcraftic-updates-manager' ) . '</p></div>'
];
$options[] = [
'type' => 'dropdown',
'name' => 'plugin_updates',
'way' => 'buttons',
'title' => __( 'Plugin Updates', 'webcraftic-updates-manager' ),
'data' => [
[ 'enable_plugin_monual_updates', __( 'Manual updates', 'webcraftic-updates-manager' ) ],
[ 'enable_plugin_auto_updates', __( 'Enable auto updates', 'webcraftic-updates-manager' ) ],
[ 'disable_plugin_updates', __( 'Disable updates', 'webcraftic-updates-manager' ) ]
],
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'You can disable all plugin updates or choose manual or automatic update mode.', 'webcraftic-updates-manager' ),
'default' => 'enable_plugin_monual_updates'
];
$options[] = [
'type' => 'dropdown',
'name' => 'theme_updates',
'way' => 'buttons',
'title' => __( 'Theme Updates', 'webcraftic-updates-manager' ),
'data' => [
[ 'enable_theme_monual_updates', __( 'Manual updates', 'webcraftic-updates-manager' ) ],
[ 'enable_theme_auto_updates', __( 'Enable auto updates', 'webcraftic-updates-manager' ) ],
[ 'disable_theme_updates', __( 'Disable updates', 'webcraftic-updates-manager' ) ]
],
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'You can disable all themes updates or choose manual or automatic update mode.', 'webcraftic-updates-manager' ),
'default' => 'enable_theme_monual_updates'
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'auto_tran_update',
'title' => __( 'Disable Automatic Translation Updates', 'webcraftic-updates-manager' ),
//'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
//'hint' => __('', 'webcraftic-updates-manager') . '<br><br><b>Clearfy: </b>' . __('', 'webcraftic-updates-manager'),
'default' => false,
];
$options[] = [
'type' => 'dropdown',
'name' => 'wp_update_core',
'title' => __( 'WordPress Core Updates', 'webcraftic-updates-manager' ),
'data' => [
[ 'disable_core_updates', __( 'Disable updates', 'webcraftic-updates-manager' ) ],
[ 'disable_core_auto_updates', __( 'Disable auto updates', 'webcraftic-updates-manager' ) ],
[
'allow_minor_core_auto_updates',
__( 'Allow minor auto updates', 'webcraftic-updates-manager' )
],
[
'allow_major_core_auto_updates',
__( 'Allow major auto updates', 'webcraftic-updates-manager' )
],
[
'allow_dev_core_auto_updates',
__( 'Allow development auto updates', 'webcraftic-updates-manager' )
]
],
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'You can disable all core WordPress updates, or disable only automatic updates. Also you can select the update mode. By default (minor)', 'webcraftic-updates-manager' ) . '<br>-' . __( 'Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3).', 'webcraftic-updates-manager' ) . '<br>-' . __( 'Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3)..', 'webcraftic-updates-manager' ) . '<br>-' . __( 'Development - update automatically to Bleeding Edge releases.', 'webcraftic-updates-manager' ),
'default' => 'allow_minor_core_auto_updates',
'events' => [
'disable_core_updates' => [
'hide' => '.factory-control-disable_core_notifications'
],
'disable_core_auto_updates' => [
'show' => '.factory-control-disable_core_notifications'
],
'allow_minor_core_auto_updates' => [
'show' => '.factory-control-disable_core_notifications'
],
'allow_major_core_auto_updates' => [
'show' => '.factory-control-disable_core_notifications'
],
'allow_dev_core_auto_updates' => [
'show' => '.factory-control-disable_core_notifications'
],
]
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'enable_update_vcs',
'title' => __( 'Enable updates for VCS Installations', 'webcraftic-updates-manager' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'hint' => __( 'Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in the WordPress directory', 'webcraftic-updates-manager' ),
'default' => false,
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'updates_nags_only_for_admin',
'title' => __( 'Updates nags only for Admin', 'webcraftic-updates-manager' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'green' ],
'hint' => __( 'This plugin allows you to hide the update WordPress reminder from all users that are not assumed Administrators (cannot upgrade plugins).
If you have multiple users then this means those who are not admins dont need to see the message. Useful for CMS based sites, so the client doesnt see the notice.', 'webcraftic-updates-manager' ),
'default' => false,
];
$options[] = [
'type' => 'html',
'html' => '<div class="wbcr-factory-page-group-header"><strong>' . __( 'Email Notifications', 'webcraftic-updates-manager' ) . '</strong><p>' . __( 'Email notifications are send once a day, you can choose what notifications to send below.', 'webcraftic-updates-manager' ) . '</p></div>'
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'notify_update_available',
'title' => __( 'Update available', 'webcraftic-updates-manager' ),
'hint' => __( 'Send me emails when an update is available.', 'webcraftic-updates-manager' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'default' => false,
'cssClass' => ( ! $is_premium ) ? [ 'factory-checkbox-disabled wbcr-upm-icon-pro' ] : [],
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'notify_updated',
'title' => __( 'Successful update', 'webcraftic-updates-manager' ),
'hint' => __( 'Send me emails when something has been updated.', 'webcraftic-updates-manager' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'default' => false,
'cssClass' => ( ! $is_premium ) ? [ 'factory-checkbox-disabled wbcr-upm-icon-pro' ] : [],
];
$options[] = [
'type' => 'textbox',
'way' => 'buttons',
'name' => 'notify_email',
'title' => __( 'Email address', 'webcraftic-updates-manager' ),
'hint' => __( 'Seperate email addresses using commas.', 'webcraftic-updates-manager' ),
'default' => $this->plugin->isNetworkActive() ? get_site_option( 'admin_email' ) : get_option( 'admin_email' ),
'htmlAttrs' => ( ! $is_premium ) ? [ 'disabled' => 'disabled' ] : [],
];
$options[] = [
'type' => 'html',
'html' => '<div class="wbcr-factory-page-group-header factory-control-disable_core_notifications"><strong>' . __( 'Core notifications', 'webcraftic-updates-manager' ) . '</strong><p>' . __( 'Core notifications are handled by WordPress and not by this plugin. You can only disable them, changing your email address in the settings above will not affect these notifications.', 'webcraftic-updates-manager' ) . '</p></div>'
];
$options[] = [
'type' => 'checkbox',
'way' => 'buttons',
'name' => 'disable_core_notifications',
'title' => __( 'Core notifications', 'webcraftic-updates-manager' ),
'hint' => __( 'By default wordpress sends an email when a core update happend. Uncheck this box to disable these emails.', 'webcraftic-updates-manager' ),
'layout' => [ 'hint-type' => 'icon', 'hint-icon-color' => 'grey' ],
'default' => true,
'cssClass' => ( ! $is_premium ) ? [ 'factory-checkbox-disabled wbcr-upm-icon-pro' ] : [],
];
$formOptions = [];
$formOptions[] = [
'type' => 'form-group',
'items' => $options,
//'cssClass' => 'postbox'
];
return apply_filters( 'wbcr/upm/updates_form_options', $formOptions );
}
}

View File

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

View File

@@ -0,0 +1,52 @@
<?php
/**
* Этот файл инициализирует этот плагин, как аддон для плагина Clearfy.
*
* Файл будет подключен только в плагине Clearfy, используя особый вариант загрузки. Это более простое решение
* пришло на смену встроенной системы подключения аддонов в фреймворке.
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, git: https://github.com/alexkovalevv
* @copyright (c) 2018 Webraftic Ltd
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! defined( 'WUPM_PLUGIN_ACTIVE' ) ) {
define( 'WUPM_PLUGIN_VERSION', '1.1.9' );
define( 'WUPM_TEXT_DOMAIN', 'webcraftic-updates-manager' );
define( 'WUPM_PLUGIN_ACTIVE', true );
// Этот плагин загружен, как аддон для плагина Clearfy
define( 'LOADING_UPDATES_MANAGER_AS_ADDON', true );
if ( ! defined( 'WUPM_PLUGIN_DIR' ) ) {
define( 'WUPM_PLUGIN_DIR', dirname( __FILE__ ) );
}
if ( ! defined( 'WUPM_PLUGIN_BASE' ) ) {
define( 'WUPM_PLUGIN_BASE', plugin_basename( __FILE__ ) );
}
if ( ! defined( 'WUPM_PLUGIN_URL' ) ) {
define( 'WUPM_PLUGIN_URL', plugins_url( '', __FILE__ ) );
}
try {
// Global scripts
require_once( WUPM_PLUGIN_DIR . '/includes/3rd-party/class-clearfy-plugin.php' );
new WUPM_Plugin();
} catch( Exception $e ) {
$wupm_plugin_error_func = function () use ( $e ) {
$error = sprintf( "The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Webcraftic Updates Manager', $e->getMessage(), $e->getCode() );
echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
};
add_action( 'admin_notices', $wupm_plugin_error_func );
add_action( 'network_admin_notices', $wupm_plugin_error_func );
}
}

View File

@@ -0,0 +1,127 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Основной класс Updates manager с интеграций для плагина Clearfy
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 2018 Webraftic Ltd
*/
class WUPM_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();
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() {
require( WUPM_PLUGIN_DIR . '/includes/classes/class-configurate-updates.php' );
new WUPM_ConfigUpdates( self::$app );
}
/**
* Регистрирует классы страниц в плагине
*
* Мы указываем плагину, где найти файлы страниц и какое имя у их класса. Чтобы плагин
* выполнил подключение классов страниц. После регистрации, страницы будут доступные по url
* и в меню боковой панели администратора. Регистрируемые страницы будут связаны с текущим плагином
* все операции выполняемые внутри классов страниц, имеют отношение только текущему плагину.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
private function register_pages() {
$admin_path = WUPM_PLUGIN_DIR . '/admin/pages';
self::app()->registerPage( 'WUPM_UpdatesPage', $admin_path . '/class-page-updates.php' );
self::app()->registerPage( 'WUPM_PluginsPage', $admin_path . '/class-page-plugins.php' );
self::app()->registerPage( 'WUPM_ThemesPage', $admin_path . '/class-page-themes.php' );
self::app()->registerPage( 'WUPM_AdvancedPage', $admin_path . '/class-page-advanced.php' );
}
/**
* Исполныет сценарии плагина только для бекенда
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function admin_scripts() {
require_once( WUPM_PLUGIN_DIR . '/admin/activation.php' );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
require_once( WUPM_PLUGIN_DIR . '/admin/ajax/change-flag.php' );
}
require_once( WUPM_PLUGIN_DIR . '/admin/boot.php' );
$this->init_activation();
}
/**
* Инициализирует класс активации/деактивации плагина
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
protected function init_activation() {
include_once( WUPM_PLUGIN_DIR . '/admin/activation.php' );
self::app()->registerActivation( 'WUPM_Activation' );
}
}

View File

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

View File

@@ -0,0 +1,131 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Основной класс плагина Updates manager
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 19.02.2018, Webcraftic
*/
class WUPM_Plugin extends Wbcr_Factory480_Plugin {
/**
* @see self::app()
* @var Wbcr_Factory480_Plugin
*/
private static $app;
/**
* @since 1.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;
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|\WUPM_Plugin
*/
public static function app() {
return self::$app;
}
/**
* Выполняет конфигурацию плагина, после того, как все плагины будут загружены
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
public function plugins_loaded() {
require( WUPM_PLUGIN_DIR . '/includes/classes/class-configurate-updates.php' );
new WUPM_ConfigUpdates( self::$app );
}
/**
* Регистрирует классы страниц в плагине
*
* Мы указываем плагину, где найти файлы страниц и какое имя у их класса. Чтобы плагин
* выполнил подключение классов страниц. После регистрации, страницы будут доступные по url
* и в меню боковой панели администратора. Регистрируемые страницы будут связаны с текущим плагином
* все операции выполняемые внутри классов страниц, имеют отношение только текущему плагину.
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
* @throws \Exception
*/
private function register_pages() {
$admin_path = WUPM_PLUGIN_DIR . '/admin/pages';
self::app()->registerPage( 'WUPM_UpdatesPage', $admin_path . '/class-page-updates.php' );
self::app()->registerPage( 'WUPM_PluginsPage', $admin_path . '/class-page-plugins.php' );
self::app()->registerPage( 'WUPM_ThemesPage', $admin_path . '/class-page-themes.php' );
self::app()->registerPage( 'WUPM_AdvancedPage', $admin_path . '/class-page-advanced.php' );
self::app()->registerPage( 'WUPM_MoreFeaturesPage', $admin_path . '/class-page-more-features.php' );
}
/**
* Исполныет сценарии плагина только для бекенда
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
private function admin_scripts() {
require_once( WUPM_PLUGIN_DIR . '/admin/activation.php' );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
require_once( WUPM_PLUGIN_DIR . '/admin/ajax/change-flag.php' );
}
require_once( WUPM_PLUGIN_DIR . '/admin/boot.php' );
$this->init_activation();
}
/**
* Инициализирует класс активации/деактивации плагина
*
* @author Alexander Kovalev <alex.kovalevv@gmail.com>
*/
protected function init_activation() {
include_once( WUPM_PLUGIN_DIR . '/admin/activation.php' );
self::app()->registerActivation( 'WUPM_Activation' );
}
}

View File

@@ -0,0 +1,379 @@
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once WUPM_PLUGIN_DIR . '/admin/includes/class-plugin-filters.php';
/**
* This class configures the parameters seo
*
* @author Alex Kovalev <alex.kovalevv@gmail.com>, Github: https://github.com/alexkovalevv
* @copyright (c) 2017 Webraftic Ltd
*/
class WUPM_ConfigUpdates extends WBCR\Factory_Templates_134\Configurate {
public function registerActionsAndFilters() {
/**
* Plugin updates
*/
$plugins_update = $this->getPopulateOption( 'plugin_updates' );
switch ( $this->getPopulateOption( 'plugin_updates' ) ) {
case 'disable_plugin_updates':
// and disable version check
add_filter( 'site_transient_update_plugins', [ $this, 'lastCheckedNow' ], 50 );
add_action( 'admin_init', [ $this, 'adminInitForPlugins' ] );
add_filter( 'auto_update_plugin', '__return_false' );
break;
case 'enable_plugin_auto_updates':
// exclude some plugins in update list
add_filter( 'auto_update_plugin', [ $this, 'pluginsAutoUpdate' ], 50, 2 );
break;
}
if ( $plugins_update != 'disable_plugin_updates' ) {
add_filter( 'site_transient_update_plugins', [ $this, 'disablePluginNotifications' ], 50 );
add_filter( 'http_request_args', [ $this, 'httpRequestArgsRemovePlugins' ], 5, 2 );
}
/**
* Theme updates
*/
switch ( $this->getPopulateOption( 'theme_updates' ) ) {
case 'disable_theme_updates':
add_filter( 'site_transient_update_themes', [ $this, 'lastCheckedNow' ], 50 );
add_action( 'admin_init', [ $this, 'adminInitForThemes' ] );
add_filter( 'auto_update_theme', '__return_false' );
break;
case 'enable_theme_auto_updates':
add_filter( 'auto_update_theme', '__return_true', 1 );
break;
}
/**
* disable wp default translation update
*/
if ( $this->getPopulateOption( 'auto_tran_update' ) ) {
add_filter( 'auto_update_translation', '__return_false', 1 );
}
/**
* control WP Auto core update
*/
switch ( $this->getPopulateOption( 'wp_update_core' ) ) {
case 'disable_core_updates':
$this->disableAllCoreUpdates();
break;
case 'disable_core_auto_updates':
add_filter( 'allow_major_auto_core_updates', '__return_false' );
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
break;
case 'major':
add_filter( 'allow_major_auto_core_updates', '__return_true' );
break;
case 'development':
add_filter( 'allow_dev_auto_core_updates', '__return_true' );
break;
default:
add_filter( 'allow_minor_auto_core_updates', '__return_true' );
break;
}
/**
* disable wp default translation update
*/
if ( $this->getPopulateOption( 'enable_update_vcs' ) ) {
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );
}
/**
* disable updates nags for all users except admin
*/
if ( $this->getPopulateOption( 'updates_nags_only_for_admin' ) && ! current_user_can( 'update_core' ) ) {
remove_action( 'admin_notices', 'update_nag', 3 );
}
add_action( 'schedule_event', [ $this, 'filterCronEvents' ] );
}
/**
* Filter cron events
*
* @param $event
*
* @return bool
*/
public function filterCronEvents( $event ) {
$core_updates = $this->getPopulateOption( 'wp_update_core' ) == 'disable_core_updates';
//$plugins_updates = $this->getPopulateOption('plugin_updates') == 'disable_plugin_updates';
$themes_updates = $this->getPopulateOption( 'theme_updates' ) == 'disable_theme_updates';
if ( ! is_object( $event ) || empty( $event->hook ) ) {
return $event;
}
switch ( $event->hook ) {
case 'wp_version_check':
$event = $core_updates ? false : $event;
break;
case 'wp_update_themes':
$event = $themes_updates ? false : $event;
break;
case 'wp_maybe_auto_update':
$event = $core_updates ? false : $event;
break;
}
return $event;
}
/**
* Enables plugin automatic updates on an individual basis.
*
* @param bool $update Whether the item has automatic updates enabled
* @param object $item Object holding the asset to be updated
*
* @return bool True of automatic updates enabled, false if not
*/
public function pluginsAutoUpdate( $update, $item ) {
// Fix php warnings UM-29:
// Some users submit reports on php notifications "Undefined property: stdClass::$plugin"
if ( ! is_object( $item ) || ! isset( $item->plugin ) ) {
return false;
}
$slug_parts = explode( '/', $item->plugin );
$actual_slug = array_shift( $slug_parts );
$pluginFilters = new WUPM_PluginFilters( $this->plugin );
$filters = $pluginFilters->getFilters( [ $actual_slug ] );
if ( ! empty( $filters ) ) {
if ( isset( $filters['disable_auto_updates'][ $actual_slug ] ) and $filters['disable_auto_updates'][ $actual_slug ] ) {
return false;
}
}
return true;
}
/**
* Disables plugin updates on an individual basis.
*
* @param object $plugins Plugins that may have update notifications
*
* @return object Updated plugins list with updates
*/
public function disablePluginNotifications( $plugins ) {
if ( ! isset( $plugins->response ) || empty( $plugins->response ) ) {
return $plugins;
}
$pluginFilters = new WUPM_PluginFilters( $this->plugin );
foreach ( (array) $plugins->response as $slug => $plugin ) {
$slug_parts = explode( '/', $slug );
$actual_slug = array_shift( $slug_parts );
$filters = $pluginFilters->getPlugins( [ $actual_slug ] );
if ( isset( $filters['disable_updates'][ $actual_slug ] ) && $filters['disable_updates'][ $actual_slug ] ) {
unset( $plugins->response[ $slug ] );
}
}
return $plugins;
}
/**
* Disables plugin http requests on an individual basis.
*
* @param array $r Request array
* @param string $url URL requested
*
* @return array Updated Request array
*/
public function httpRequestArgsRemovePlugins( $r, $url ) {
if ( ! is_string( $url ) || 0 !== strpos( $url, 'https://api.wordpress.org/plugins/update-check/1.1/' ) ) {
return $r;
}
if ( isset( $r['body']['plugins'] ) ) {
$r_plugins = json_decode( $r['body']['plugins'], true );
$pluginFilters = new WUPM_PluginFilters( $this->plugin );
if ( isset( $r_plugins['plugins'] ) && ! empty( $r_plugins['plugins'] ) ) {
foreach ( $r_plugins['plugins'] as $slug => $plugin ) {
$slug_parts = explode( '/', $slug );
$actual_slug = array_shift( $slug_parts );
$filters = $pluginFilters->getPlugins( [ $actual_slug ] );
if ( isset( $filters['disable_updates'][ $actual_slug ] ) and $filters['disable_updates'][ $actual_slug ] ) {
unset( $r_plugins['plugins'][ $slug ] );
if ( false !== $key = array_search( $slug, $r_plugins['active'] ) ) {
unset( $r_plugins['active'][ $key ] );
$r_plugins['active'] = array_values( $r_plugins['active'] );
}
}
}
}
$r['body']['plugins'] = json_encode( $r_plugins );
}
return $r;
}
public function disableAllCoreUpdates() {
add_action( 'admin_init', [ $this, 'adminInitForCore' ] );
add_action( 'admin_init', [ $this, 'disableUpdateNag' ] );
/*
* Disable All Automatic Updates
* 3.7+
*
* @author sLa NGjI's @ slangji.wordpress.com
*/
add_filter( 'automatic_updater_disabled', '__return_true' );
add_filter( 'allow_minor_auto_core_updates', '__return_false' );
add_filter( 'allow_major_auto_core_updates', '__return_false' );
add_filter( 'allow_dev_auto_core_updates', '__return_false' );
add_filter( 'auto_update_core', '__return_false' );
add_filter( 'wp_auto_update_core', '__return_false' );
add_filter( 'auto_core_update_send_email', '__return_false' );
add_filter( 'send_core_update_notification_email', '__return_false' );
add_filter( 'automatic_updates_send_debug_email', '__return_false' );
add_filter( 'automatic_updates_is_vcs_checkout', '__return_true' );
// change update nag
add_filter( 'wp_get_update_data', [ $this, 'updateCounter' ], 10, 2 );
add_filter( 'site_transient_update_core', [ $this, 'hideCoreUpdateForm' ], 10, 2 );
}
/**
* callback for action "admin_init"
* remove update nag in admin pages
*/
function disableUpdateNag() {
remove_action( 'admin_notices', 'update_nag', 3 );
remove_action( 'admin_notices', 'maintenance_nag' );
remove_action( 'network_admin_notices', 'update_nag', 3 );
}
/**
* Initialize and load the plugin stuff
*
* @author scripts@schloebe.de
*/
function adminInitForPlugins() {
/*
* 2.8 to 3.0
*/
remove_action( 'load-plugins.php', 'wp_update_plugins' );
remove_action( 'load-update.php', 'wp_update_plugins' );
remove_action( 'admin_init', '_maybe_update_plugins' );
remove_action( 'wp_update_plugins', 'wp_update_plugins' );
wp_clear_scheduled_hook( 'wp_update_plugins' );
/*
* 3.0
*/
remove_action( 'load-update-core.php', 'wp_update_plugins' );
wp_clear_scheduled_hook( 'wp_update_plugins' );
}
function adminInitForThemes() {
/*
* 2.8 to 3.0
*/
remove_action( 'load-themes.php', 'wp_update_themes' );
remove_action( 'load-update.php', 'wp_update_themes' );
remove_action( 'admin_init', '_maybe_update_themes' );
remove_action( 'wp_update_themes', 'wp_update_themes' );
wp_clear_scheduled_hook( 'wp_update_themes' );
/*
* 3.0
*/
remove_action( 'load-update-core.php', 'wp_update_themes' );
wp_clear_scheduled_hook( 'wp_update_themes' );
}
/**
* Initialize and load the plugin stuff
*
* @author scripts@schloebe.de
*/
function adminInitForCore() {
/*
* 2.8 to 3.0
*/
remove_action( 'wp_version_check', 'wp_version_check' );
remove_action( 'admin_init', '_maybe_update_core' );
wp_clear_scheduled_hook( 'wp_version_check' );
/*
* 3.7+
*/
remove_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
remove_action( 'admin_init', 'wp_maybe_auto_update' );
remove_action( 'admin_init', 'wp_auto_update_core' );
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
}
public function lastCheckedNow( $transient ) {
global $wp_version;
include ABSPATH . WPINC . '/version.php';
$current = new stdClass;
$current->updates = [];
$current->version_checked = $wp_version;
$current->last_checked = time();
return $current;
}
/**
* callback for filter wp_get_update_data
* If disableAllCoreUpdates recalc the update badge
*
* @param $update_data
* @param $titles
*
* @return mixed $update_data
*/
function updateCounter( $update_data, $titles ) {
if ( $update_data['counts']['wordpress'] > 0 ) {
$new_num = $update_data['counts']['total'] = $update_data['counts']['total'] - $update_data['counts']['wordpress'];
preg_replace( '/[0-9]+/', $new_num, $titles['wordpress'] );
$update_data['counts']['wordpress'] = 0;
}
return $update_data;
}
/** Modify data about core available updates
* Hide update buttons on update page and dashboard home page
*
* @param $val
* @param $transient
*
* @return mixed $val
*/
function hideCoreUpdateForm( $val, $transient ) {
if ( is_object( $val ) ) {
$val->updates = [];
}
return $val;
}
}

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,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,478 @@
# 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:31+0300\n"
"PO-Revision-Date: 2019-04-28 06:31+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/ajax/change-flag.php:26
msgid "Required arguments of slug, flag is empty!"
msgstr "Argumentos requeridos de slug, bandera está vacía!"
#: admin/ajax/change-flag.php:38
#, php-format
msgid "Method %s is not found!"
msgstr "¡El método %s no se encuentra!"
#: admin/boot.php:55
#, php-format
msgid ""
"We found that you have the plugin %s installed. The functions of this plugin "
"already exist in %s. Please deactivate plugin %s to avoid conflicts between "
"plugins' functions."
msgstr ""
"Usted tiene el plugin %s instalado. Las funciones de este complemento ya "
"existen en %s. Desactive el complemento %s para evitar conflictos entre las "
"funciones ambos plugin."
#: admin/boot.php:56
#, php-format
msgid ""
"If you do not want to deactivate the plugin %s for some reason, we strongly "
"recommend do not use the same plugins' functions at the same time!"
msgstr ""
"Si no desea desactivar el plugin %s por algún motivo, le recomendamos que no "
"utilice las mismas funciones de ambos plugin al mismo tiempo."
#: admin/boot.php:100
msgid "Disable plugin updates"
msgstr "Deshabilitar actualizaciones de plugin"
#: admin/boot.php:106
msgid "Disable theme updates"
msgstr "Deshabilitar actualizaciones de temas"
#: admin/boot.php:112 admin/pages/updates.php:128
msgid "Disable Automatic Translation Updates"
msgstr "Deshabilitar actualizaciones de traducción automática"
#: admin/boot.php:117
msgid "Disable wordPress core updates"
msgstr "Deshabilitar las actualizaciones del Core WordPress."
#: admin/boot.php:123 admin/pages/updates.php:180
msgid "Enable updates for VCS Installations"
msgstr "Habilitar actualizaciones para instalaciones VCS"
#: admin/boot.php:128
msgid "Plugin filters"
msgstr "Filtros de plugin"
#: admin/boot.php:133 admin/pages/updates.php:190
msgid "Updates nags only for Admin"
msgstr "Actualizaciones de nags solo para admin"
#: admin/boot.php:138 admin/pages/updates.php:238 admin/pages/updates.php:245
msgid "Core notifications"
msgstr "Notificaciones genéricas"
#: admin/boot.php:143
msgid "Notify me when update successful installed"
msgstr "Notificarme cuando la actualización sea exitosa"
#: admin/boot.php:148 admin/pages/updates.php:229
msgid "Email address"
msgstr "Dirección de correo electrónico"
#: admin/boot.php:160
msgid "One click disable all updates"
msgstr "Deshabilitar todas las actualizaciones con un click"
#: admin/boot.php:181
msgid "Get ultimate plugin free"
msgstr "Obtener el ultimate plugin gratis"
#: admin/boot.php:230 admin/boot.php:275
msgid "Update manager"
msgstr "Gestor de actualizaciones"
#: admin/boot.php:238
msgid "Auto-update disabled"
msgstr "Actualización automática deshabilitada"
#: admin/boot.php:239
msgid "Auto-update enabled"
msgstr "Actualización automática habilitada"
#: admin/boot.php:240
msgid "Update disabled"
msgstr "Actualización deshabilitada"
#: admin/boot.php:241
msgid "Translation update disabled"
msgstr "Actualización de traducción desactivada"
#: admin/pages/advanced.php:43
msgid "Advanced"
msgstr "Avanzado"
#: admin/pages/advanced.php:71
msgid "Please, wait 90 sec. to see the forced automatic update result."
msgstr ""
"Por favor, espera 90 Seg. para ver resultados de la actualizacion automática "
"forzada."
#: admin/pages/advanced.php:81
msgid "Force Automatic Updates"
msgstr "Forzar actualizaciones automáticas"
#: admin/pages/advanced.php:83
msgid ""
"This will attempt to force automatic updates. This is useful for debugging."
msgstr ""
"Esto intentará forzar actualizaciones automáticas. Esto es útil para la "
"depuración."
#: admin/pages/advanced.php:84
msgid "Force update"
msgstr "Forzar actualización"
#: admin/pages/plugins.php:72
msgid "Plugins"
msgstr "Plugins"
#: admin/pages/plugins.php:91
msgid ""
"- To disable updates individually choose the “Manual or automatic plugin "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para deshabilitar las actualizaciones individualmente, elija la opción "
"\"Actualizaciones de plugins manuales o automáticas\", luego guarde las "
"configuraciones y vuelva a esta página."
#: admin/pages/plugins.php:95
msgid ""
"- To configure plugin auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para configurar las actualizaciones automáticas de plugin de forma "
"individual, elija la opción \"Habilitar actualizaciones automáticas\" y "
"luego guarde la configuración y vuelva a esta página."
#: admin/pages/plugins.php:326
msgid "Plugins list"
msgstr "Lista de plugins"
#: admin/pages/plugins.php:329
msgid "This page you can individually disable plugin updates and auto updates."
msgstr ""
"Esta página puede deshabilitar individualmente las actualizaciones de "
"complementos y actualizaciones automáticas."
#: admin/pages/plugins.php:345 admin/pages/themes.php:321
msgid "Bulk actions"
msgstr "Acciones a granel"
#: admin/pages/plugins.php:346 admin/pages/plugins.php:366
#: admin/pages/themes.php:322 admin/pages/themes.php:340
#: admin/pages/updates.php:102 admin/pages/updates.php:117
#: admin/pages/updates.php:139
msgid "Disable updates"
msgstr "Deshabilitar actualizaciones"
#: admin/pages/plugins.php:347 admin/pages/themes.php:323
msgid "Enable updates"
msgstr "Activar actualizaciones"
#: admin/pages/plugins.php:348 admin/pages/themes.php:324
msgid "Enable auto-updates"
msgstr "Activar auto actualizaciones"
#: admin/pages/plugins.php:349 admin/pages/themes.php:325
msgid "Disable auto-updates"
msgstr "Deshabilitar las actualizaciones automáticas"
#: admin/pages/plugins.php:350 admin/pages/themes.php:326
msgid "Disable translation updates"
msgstr "Deshabilitar actualizaciones de traducción"
#: admin/pages/plugins.php:351 admin/pages/themes.php:327
msgid "Enable translation updates"
msgstr "Habilitar actualizaciones de traducción"
#: admin/pages/plugins.php:352 admin/pages/plugins.php:375
msgid "Hide plugin"
msgstr "Ocultar plugin"
#: admin/pages/plugins.php:353
msgid "Show plugin"
msgstr "Mostrar plugin"
#: admin/pages/plugins.php:355 admin/pages/themes.php:329
msgid "Apply"
msgstr "Aplicar"
#: admin/pages/plugins.php:364
msgid "Plugin"
msgstr "Plugin"
#: admin/pages/plugins.php:369 admin/pages/themes.php:343
msgid "Auto-updates"
msgstr "Actualizaciones automáticas"
#: admin/pages/plugins.php:372 admin/pages/themes.php:346
msgid "Translation updates"
msgstr "Actualizaciones de traducción"
#: admin/pages/plugins.php:441 admin/pages/themes.php:396
msgid "Select"
msgstr "Seleccionar"
#: admin/pages/plugins.php:469 admin/pages/plugins.php:486
#: admin/pages/plugins.php:502 admin/pages/plugins.php:518
#: admin/pages/themes.php:420 admin/pages/themes.php:439
#: admin/pages/themes.php:458
msgid "On"
msgstr "On"
#: admin/pages/plugins.php:470 admin/pages/plugins.php:487
#: admin/pages/plugins.php:503 admin/pages/plugins.php:519
#: admin/pages/themes.php:421 admin/pages/themes.php:440
#: admin/pages/themes.php:459
msgid "Off"
msgstr "Off"
#: admin/pages/themes.php:69
msgid "Themes"
msgstr "Plantillas"
#: admin/pages/themes.php:88
msgid ""
"- To disable updates individually choose the “Manual or automatic theme "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para deshabilitar las actualizaciones por separado, elija la opción "
"“Actualizaciones de temas manuales o automáticas”, luego guarde las "
"configuraciones y vuelva a esta página."
#: admin/pages/themes.php:92
msgid ""
"- To configure theme auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para configurar las actualizaciones automáticas del tema individualmente, "
"elija la opción \"Habilitar actualizaciones automáticas\" y luego guarde la "
"configuración y vuelva a esta página."
#: admin/pages/themes.php:302
msgid "Themes list"
msgstr "Listado de Plantillas"
#: admin/pages/themes.php:305
msgid "This page you can individually disable theme updates and auto updates."
msgstr ""
"En esta página puedes deshabilitar individualmente las actualizaciones de "
"temas y actualizaciones automáticas."
#: admin/pages/themes.php:338
msgid "Theme"
msgstr "Plantilla"
#: admin/pages/updates.php:43
msgid "Updates manager"
msgstr "Gestor de actualizaciones"
#: admin/pages/updates.php:44
msgid "Manage all site updates"
msgstr "Administrar todas las actualizaciones del sitio"
#: admin/pages/updates.php:57
msgid "Updates"
msgstr "Actualizaciones"
#: admin/pages/updates.php:57
msgid "General"
msgstr "General"
#: admin/pages/updates.php:91
msgid "General settings for WordPress, plugins and themes updates"
msgstr ""
"Configuraciones generales para WordPress, complementos y actualizaciones de "
"temas."
#: admin/pages/updates.php:91
msgid ""
"This page, you can enable or disable automatic updates. To test the "
"automatic updates, click the \"Advanced\" tab."
msgstr ""
"En esta página, puede habilitar o deshabilitar actualizaciones automáticas. "
"Para probar las actualizaciones automáticas, haga clic en la pestaña "
"\"Avanzado \"."
#: admin/pages/updates.php:98
msgid "Plugin Updates"
msgstr "Actualizaciones de plugins"
#: admin/pages/updates.php:100 admin/pages/updates.php:115
msgid "Manual updates"
msgstr "Actualizaciones manuales"
#: admin/pages/updates.php:101 admin/pages/updates.php:116
msgid "Enable auto updates"
msgstr "Habilitar actualizaciones automáticas"
#: admin/pages/updates.php:105
msgid ""
"You can disable all plugin updates or choose manual or automatic update mode."
msgstr ""
"Puede deshabilitar todas las actualizaciones de plugins o elegir el modo de "
"actualización manual o automática."
#: admin/pages/updates.php:113
msgid "Theme Updates"
msgstr "Actualizaciones del tema"
#: admin/pages/updates.php:120
msgid ""
"You can disable all themes updates or choose manual or automatic update mode."
msgstr ""
"Puede desactivar todas las actualizaciones de temas o elegir el modo de "
"actualización manual o automática."
#: admin/pages/updates.php:137
msgid "WordPress Core Updates"
msgstr "Actualizaciones del Core WordPress"
#: admin/pages/updates.php:140
msgid "Disable auto updates"
msgstr "Deshabilitar actualizaciones automáticas"
#: admin/pages/updates.php:143
msgid "Allow minor auto updates"
msgstr "Permitir actualizaciones automáticas menores"
#: admin/pages/updates.php:147
msgid "Allow major auto updates"
msgstr "Permitir actualizaciones automáticas importantes"
#: admin/pages/updates.php:151
msgid "Allow development auto updates"
msgstr "Permitir actualizaciones automáticas de desarrollo"
#: admin/pages/updates.php:155
msgid ""
"You can disable all core WordPress updates, or disable only automatic "
"updates. Also you can select the update mode. By default (minor)"
msgstr ""
"deshabilitar actualizaciones básicas de WordPress o deshabilitar solo las "
"actualizaciones automáticas. También puede seleccionar el modo de "
"actualización. Por defecto (menor)"
#: admin/pages/updates.php:155
msgid "Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3)."
msgstr ""
"Mayor - se actualiza automáticamente a las versiones principales (por "
"ejemplo, 4.1, 4.2, 4.3)."
#: admin/pages/updates.php:155
msgid ""
"Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3).."
msgstr ""
"Menor - se actualiza automáticamente a versiones menores (por ejemplo, "
"4.1.1, 4.1.2, 4.1.3).."
#: admin/pages/updates.php:155
msgid "Development - update automatically to Bleeding Edge releases."
msgstr ""
"Desarrollo - actualizar automáticamente a las versiones de Bleeding Edge."
#: admin/pages/updates.php:182
msgid ""
"Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in "
"the WordPress directory"
msgstr ""
"Habilite las actualizaciones automáticas incluso si se encuentra una carpeta "
"VCS (.git, .hg, .svn) en el directorio de WordPress"
#: admin/pages/updates.php:192
msgid ""
"This plugin allows you to hide the update WordPress reminder from all users "
"that are not assumed Administrators (cannot upgrade plugins).\n"
"\n"
"If you have multiple users then this means those who are not admins dont "
"need to see the message. Useful for CMS based sites, so the client doesnt "
"see the notice."
msgstr ""
"Este plugin te permite ocultar el recordatorio de actualización de WordPress "
"a todos los usuarios que no se consideren administradores (no se pueden "
"actualizar los complementos).\n"
"\n"
"Si tiene varios usuarios, esto significa que aquellos que no son "
"administradores no necesitan ver el mensaje. Útil para sitios basados en CMS "
"donde usuarios no admin no veran el aviso."
#: admin/pages/updates.php:200
msgid "Email Notifications"
msgstr "Notificaciones Email"
#: admin/pages/updates.php:200
msgid ""
"Email notifications are send once a day, you can choose what notifications "
"to send below."
msgstr ""
"Las notificaciones vía Email se envían una vez al día, puede elegir qué "
"notificaciones enviar a continuación."
#: admin/pages/updates.php:207
msgid "Update available"
msgstr "Actualización disponible"
#: admin/pages/updates.php:208
msgid "Send me emails when an update is available."
msgstr ""
"Enviarme correos electrónicos cuando haya una actualización disponible."
#: admin/pages/updates.php:218
msgid "Successful update"
msgstr "Actualización exitosa"
#: admin/pages/updates.php:219
msgid "Send me emails when something has been updated."
msgstr "Enviarme correos electrónicos cuando algo se haya actualizado."
#: admin/pages/updates.php:230
msgid "Seperate email addresses using commas."
msgstr "Separe las direcciones de correo con comas."
#: admin/pages/updates.php:238
msgid ""
"Core notifications are handled by WordPress and not by this plugin. You can "
"only disable them, changing your email address in the settings above will "
"not affect these notifications."
msgstr ""
"Las notificaciones genéricas son manejadas por WordPress y no por este "
"complemento. Solo puede deshabilitarlas, cambiar su dirección de correo "
"electrónico en la configuración anterior no afectará estas notificaciones."
#: admin/pages/updates.php:246
msgid ""
"By default wordpress sends an email when a core update happend. Uncheck this "
"box to disable these emails."
msgstr ""
"Por defecto, wordpress envía un correo electrónico cuando se produce una "
"actualización del núcleo. Desmarque esta casilla para deshabilitar estos "
"correos electrónicos."
#: webcraftic-updates-manager.php:78
msgid "Webcraftic Updates Manager"
msgstr "Gestor de Actualizaciones Webcraftic"

View File

@@ -0,0 +1,306 @@
msgid ""
msgstr ""
"Project-Id-Version: Clearfy\n"
"POT-Creation-Date: 2018-09-06 18:34+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:21
#, php-format
msgid ""
"We found that you have the plugin %s installed. The functions of this plugin "
"already exist in %s. Please deactivate plugin %s to avoid conflicts between "
"plugins' functions."
msgstr ""
"We hebben geconstateerd dat de plugin %s is geïnstalleerd. De functies van "
"deze plugin bestaan al in %s. Deactiveer plugin %s om conflicten tussen de "
"functies van de plugins te voorkomen."
#: admin/boot.php:22
#, php-format
msgid ""
"If you do not want to deactivate the plugin %s for some reason, we strongly "
"recommend do not use the same plugins' functions at the same time!"
msgstr ""
"Als u de plugin %s, om eender welke reden niet wilt deactiveren, raden wij u "
"ten zeerste aan om niet dezelfde plugin functies tegelijkertijd te gebruiken!"
#: admin/boot.php:70
msgid "Disable plugin updates"
msgstr "Schakel plugin updates uit"
#: admin/boot.php:76
msgid "Disable theme updates"
msgstr "Schakel thema updates uit"
#: admin/boot.php:82 admin/pages/updates.php:122
msgid "Disable Automatic Translation Updates"
msgstr "Schakel Automatische vertaal-updates uit"
#: admin/boot.php:87
msgid "Disable wordPress core updates"
msgstr "Schakel WordPress core-updates uit"
#: admin/boot.php:93 admin/pages/updates.php:156
msgid "Enable updates for VCS Installations"
msgstr "Schakel updates voor VCS-installaties in"
#: admin/boot.php:98
msgid "Plugin filters"
msgstr "Plugin filters"
#: admin/boot.php:103 admin/pages/updates.php:166
msgid "Updates nags only for Admin"
msgstr "Update meldingen enkel voor Admin"
#: admin/boot.php:115
msgid "One click disable all updates"
msgstr "Alle updates uitschakelen in één klik"
#: admin/boot.php:136
msgid "Get ultimate plugin free"
msgstr "Krijg ultieme plugin gratis"
#: admin/pages/advanced.php:37
msgid "Advanced"
msgstr "Gevorderd"
#: admin/pages/advanced.php:65
msgid "Please, wait 90 sec. to see the forced automatic update result."
msgstr ""
"Wacht alstublieft 90 sec. om het geforceerde automatische update resultaat te "
"zien."
#: admin/pages/advanced.php:75
msgid "Force Automatic Updates"
msgstr "Forceer Automatische Updates"
#: admin/pages/advanced.php:77
msgid ""
"This will attempt to force automatic updates. This is useful for debugging."
msgstr ""
"Hiermee wordt geprobeerd automatische updates te forceren. Dit is handig om "
"fouten op te sporen."
#: admin/pages/advanced.php:78
msgid "Force update"
msgstr "Forceer update"
#: admin/pages/plugins.php:63
msgid "Plugins"
msgstr "Plugins"
#: admin/pages/plugins.php:81
msgid ""
"- To disable updates individually choose the “Manual or automatic plugin "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Om updates afzonderlijk uit te schakelen, kiest u de optie \"Handmatige of "
"automatische plugin updates\", slaat u vervolgens de instellingen op en keert "
"u terug naar deze pagina."
#: admin/pages/plugins.php:85
msgid ""
"- To configure plugin auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
#: admin/pages/plugins.php:238
msgid "Plugins list"
msgstr "Lijst met plugins"
#: admin/pages/plugins.php:241
msgid "This page you can individually disable plugin updates and auto updates."
msgstr ""
"Op deze pagina kunt u plugin updates en automatische updates individueel "
"uitschakelen."
#: admin/pages/plugins.php:257
msgid "Bulk actions"
msgstr "Bulk acties"
#: admin/pages/plugins.php:258 admin/pages/plugins.php:333
#: admin/pages/plugins.php:338 admin/pages/updates.php:96
#: admin/pages/updates.php:111 admin/pages/updates.php:132
msgid "Disable updates"
msgstr "Schakel updates uit"
#: admin/pages/plugins.php:259 admin/pages/plugins.php:335
msgid "Enable updates"
msgstr "Schakel updates in"
#: admin/pages/plugins.php:260 admin/pages/plugins.php:345
#: admin/pages/plugins.php:351
msgid "Enable auto-updates"
msgstr "Schakel auto-updates in"
#: admin/pages/plugins.php:261 admin/pages/plugins.php:343
#: admin/pages/plugins.php:349
msgid "Disable auto-updates"
msgstr "Automatische updates uitschakelen"
#: admin/pages/plugins.php:263
msgid "Apply"
msgstr "Toepassen"
#: admin/pages/plugins.php:270
msgid "Plugin"
msgstr "Plugin"
#: admin/pages/plugins.php:272
msgid "Description"
msgstr "Beschrijving"
#: admin/pages/plugins.php:319
msgid "Select"
msgstr "Selecteer"
#: admin/pages/updates.php:37
msgid "Updates manager"
msgstr "Updates manager"
#: admin/pages/updates.php:51
msgid "Updates"
msgstr "Updates"
#: admin/pages/updates.php:52
msgid "General"
msgstr "Algemeen"
#: admin/pages/updates.php:85
msgid "General settings for WordPress, plugins and themes updates"
msgstr "Algemene instellingen voor WordPress, plugins en thema updates"
#: admin/pages/updates.php:85
msgid ""
"This page, you can enable or disable automatic updates. To test the automatic "
"updates, click the \"Advanced\" tab."
msgstr ""
"Op deze pagina kunt u automatische updates in- of uitschakelen. Klik op het "
"tabblad 'Geavanceerd' om de automatische updates te testen."
#: admin/pages/updates.php:92
msgid "Plugin Updates"
msgstr "Plugin Updates"
#: admin/pages/updates.php:94 admin/pages/updates.php:109
msgid "Manual updates"
msgstr "Manuele updates"
#: admin/pages/updates.php:95 admin/pages/updates.php:110
msgid "Enable auto updates"
msgstr "Schakel automatische updates in"
#: admin/pages/updates.php:99
msgid ""
"You can disable all plugin updates or choose manual or automatic update mode."
msgstr ""
"U kunt alle plugin updates uitschakelen of de handmatige of automatische "
"update modus kiezen."
#: admin/pages/updates.php:107
msgid "Theme Updates"
msgstr "Thema Updates"
#: admin/pages/updates.php:114
msgid ""
"You can disable all themes updates or choose manual or automatic update mode."
msgstr ""
"U kunt alle thema updates uitschakelen of de handmatige of automatische update "
"modus kiezen."
#: admin/pages/updates.php:130
msgid "WordPress Core Updates"
msgstr "WordPress Core Updates"
#: admin/pages/updates.php:133
msgid "Disable auto updates"
msgstr "Schakel automatische updates uit"
#: admin/pages/updates.php:136
msgid "Allow minor auto updates"
msgstr "Sta kleine automatische updates toe"
#: admin/pages/updates.php:140
msgid "Allow major auto updates"
msgstr "Sta grote automatische updates toe"
#: admin/pages/updates.php:144
msgid "Allow development auto updates"
msgstr "Automatische updates van de toepassing toestaan"
#: admin/pages/updates.php:148
msgid ""
"You can disable all core WordPress updates, or disable only automatic updates. "
"Also you can select the update mode. By default (minor)"
msgstr ""
"U kunt alle essentiële WordPress updates uitschakelen of alleen automatische "
"updates uitschakelen. U kunt ook de update modus selecteren. Standaard (gering)"
#: admin/pages/updates.php:148
msgid "Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3)."
msgstr ""
"Belangrijk - update automatisch naar belangrijke releases (bijv. 4.1, 4.2, "
"4.3)."
#: admin/pages/updates.php:148
msgid ""
"Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3).."
msgstr ""
"Gering - update automatisch naar kleine releases (bijv. 4.1.1, 4.1.2, 4.1.3)..."
#: admin/pages/updates.php:148
msgid "Development - update automatically to Bleeding Edge releases."
msgstr "Ontwikkeling - update automatisch naar Bleeding Edge-releases."
#: admin/pages/updates.php:158
msgid ""
"Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in "
"the WordPress directory"
msgstr ""
"Inschakel Automatische updates, zelfs als een VCS-map (.git, .hg, .svn) werd "
"gevonden in de WordPress directory"
#: admin/pages/updates.php:168
msgid ""
"This plugin allows you to hide the update WordPress reminder from all users "
"that are not assumed Administrators (cannot upgrade plugins).\n"
"\n"
"If you have multiple users then this means those who are not admins dont need "
"to see the message. Useful for CMS based sites, so the client doesnt see the "
"notice."
msgstr ""
"Met deze plugin kunt u de herinnering update WordPress verbergen voor alle "
"gebruikers die niet worden verondersteld beheerders te zijn (kan geen plugins "
"upgraden)."
#: webcraftic-updates-manager.php:18
msgid ""
"We found that you have the \"Clearfy - disable unused features\" plugin "
"installed, this plugin already has update manager functions, so you can "
"deactivate plugin \"Update manager\"!"
msgstr ""
"We hebben geconstateerd dat de plugin \"Clearfy - uitschakelen ongebruikte "
"functies\" is geïnstalleerd, deze plugin heeft al functies voor updaten "
"manager, dus u kunt de plugin \"Update manager\" deactiveren!"
#: webcraftic-updates-manager.php:75
msgid "Webcraftic Updates Manager"
msgstr "Webcraftic Updates Manager"

View File

@@ -0,0 +1,311 @@
msgid ""
msgstr ""
"Project-Id-Version: clearfy\n"
"POT-Creation-Date: 2018-09-06 18:34+0300\n"
"PO-Revision-Date: 2018-09-06 18:34+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:21
#, php-format
msgid ""
"We found that you have the plugin %s installed. The functions of this plugin "
"already exist in %s. Please deactivate plugin %s to avoid conflicts between "
"plugins' functions."
msgstr ""
"Descobrimos que você tem o plugin %s instalado. As funções deste plugin já "
"existem em %s . Por favor, desative o plugin %s para evitar conflitos entre "
"as funções dos plugins."
#: admin/boot.php:22
#, php-format
msgid ""
"If you do not want to deactivate the plugin %s for some reason, we strongly "
"recommend do not use the same plugins' functions at the same time!"
msgstr ""
"Se você não quiser desativar o plugin %s por algum motivo, recomendamos que "
"não use as funções dos mesmos plugins ao mesmo tempo!"
#: admin/boot.php:70
msgid "Disable plugin updates"
msgstr "Desativar atualizações de plugins"
#: admin/boot.php:76
msgid "Disable theme updates"
msgstr "Desativar atualizações de tema"
#: admin/boot.php:82 admin/pages/updates.php:122
msgid "Disable Automatic Translation Updates"
msgstr "Desativar Atualizações Automáticas de Tradução"
#: admin/boot.php:87
msgid "Disable wordPress core updates"
msgstr "Desativar atualizações do núcleo do wordPress"
#: admin/boot.php:93 admin/pages/updates.php:156
msgid "Enable updates for VCS Installations"
msgstr "Ativar atualizações para instalações do VCS"
#: admin/boot.php:98
msgid "Plugin filters"
msgstr "Filtros de Plugin"
#: admin/boot.php:103 admin/pages/updates.php:166
msgid "Updates nags only for Admin"
msgstr "Atualiza nags apenas para o administrador"
#: admin/boot.php:115
msgid "One click disable all updates"
msgstr "Um clique desativa todas as atualizações"
#: admin/boot.php:136
msgid "Get ultimate plugin free"
msgstr "Obtenha o melhor plugin grátis"
#: admin/pages/advanced.php:37
msgid "Advanced"
msgstr "Avançado"
#: admin/pages/advanced.php:65
msgid "Please, wait 90 sec. to see the forced automatic update result."
msgstr ""
"Por favor, aguarde 90 seg. para ver o resultado da atualização automática "
"forçada."
#: admin/pages/advanced.php:75
msgid "Force Automatic Updates"
msgstr "Forçar atualizações automáticas"
#: admin/pages/advanced.php:77
msgid ""
"This will attempt to force automatic updates. This is useful for debugging."
msgstr ""
"Isso tentará forçar atualizações automáticas. Isso é útil para depuração."
#: admin/pages/advanced.php:78
msgid "Force update"
msgstr "Forçar atualização"
#: admin/pages/plugins.php:63
msgid "Plugins"
msgstr "Plugins"
#: admin/pages/plugins.php:81
msgid ""
"- To disable updates individually choose the “Manual or automatic plugin "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para desabilitar as atualizações individualmente, escolha a opção "
"“Atualizações manuais ou automáticas do plug-in” e salve as configurações e "
"o retorno a esta página."
#: admin/pages/plugins.php:85
msgid ""
"- To configure plugin auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
"- Para configurar as atualizações automáticas do plug-in individualmente, "
"escolha a opção \"Ativar atualizações automáticas\" e salve as configurações "
"e o retorno a esta página."
#: admin/pages/plugins.php:238
msgid "Plugins list"
msgstr "Lista de plugins"
#: admin/pages/plugins.php:241
msgid "This page you can individually disable plugin updates and auto updates."
msgstr ""
"Nesta página você pode desativar individualmente atualizações de plugins e "
"atualizações automáticas."
#: admin/pages/plugins.php:257
msgid "Bulk actions"
msgstr "Ações em massa"
#: admin/pages/plugins.php:258 admin/pages/plugins.php:333
#: admin/pages/plugins.php:338 admin/pages/updates.php:96
#: admin/pages/updates.php:111 admin/pages/updates.php:132
msgid "Disable updates"
msgstr "Desativar atualizações"
#: admin/pages/plugins.php:259 admin/pages/plugins.php:335
msgid "Enable updates"
msgstr "Ativar atualizações"
#: admin/pages/plugins.php:260 admin/pages/plugins.php:345
#: admin/pages/plugins.php:351
msgid "Enable auto-updates"
msgstr "Ativar atualizações automáticas"
#: admin/pages/plugins.php:261 admin/pages/plugins.php:343
#: admin/pages/plugins.php:349
msgid "Disable auto-updates"
msgstr "Desativar atualizações automáticas"
#: admin/pages/plugins.php:263
msgid "Apply"
msgstr "Aplique"
#: admin/pages/plugins.php:270
msgid "Plugin"
msgstr "Plugar"
#: admin/pages/plugins.php:272
msgid "Description"
msgstr "Descrição"
#: admin/pages/plugins.php:319
msgid "Select"
msgstr "Selecione"
#: admin/pages/updates.php:37
msgid "Updates manager"
msgstr "Gerente de atualizações"
#: admin/pages/updates.php:51
msgid "Updates"
msgstr "Atualizações"
#: admin/pages/updates.php:52
msgid "General"
msgstr "Geral"
#: admin/pages/updates.php:85
msgid "General settings for WordPress, plugins and themes updates"
msgstr "Configurações gerais para WordPress, plugins e atualizações de temas"
#: admin/pages/updates.php:85
msgid ""
"This page, you can enable or disable automatic updates. To test the "
"automatic updates, click the \"Advanced\" tab."
msgstr ""
"Nesta página, você pode ativar ou desativar atualizações automáticas. Para "
"testar as atualizações automáticas, clique na guia \"Avançado \"."
#: admin/pages/updates.php:92
msgid "Plugin Updates"
msgstr "Atualizações de Plugin"
#: admin/pages/updates.php:94 admin/pages/updates.php:109
msgid "Manual updates"
msgstr "Atualizações manuais"
#: admin/pages/updates.php:95 admin/pages/updates.php:110
msgid "Enable auto updates"
msgstr "Ativar atualizações automáticas"
#: admin/pages/updates.php:99
msgid ""
"You can disable all plugin updates or choose manual or automatic update mode."
msgstr ""
"Você pode desativar todas as atualizações de plug-ins ou escolher o modo de "
"atualização manual ou automática."
#: admin/pages/updates.php:107
msgid "Theme Updates"
msgstr "Atualizações do tema"
#: admin/pages/updates.php:114
msgid ""
"You can disable all themes updates or choose manual or automatic update mode."
msgstr ""
"Você pode desativar todas as atualizações de temas ou escolher o modo de "
"atualização manual ou automática."
#: admin/pages/updates.php:130
msgid "WordPress Core Updates"
msgstr "Atualizações do WordPress Core"
#: admin/pages/updates.php:133
msgid "Disable auto updates"
msgstr "Desativar atualizações automáticas"
#: admin/pages/updates.php:136
msgid "Allow minor auto updates"
msgstr "Permitir atualizações automáticas menores"
#: admin/pages/updates.php:140
msgid "Allow major auto updates"
msgstr "Permitir atualizações automáticas importantes"
#: admin/pages/updates.php:144
msgid "Allow development auto updates"
msgstr "Permitir atualizações automáticas de desenvolvimento"
#: admin/pages/updates.php:148
msgid ""
"You can disable all core WordPress updates, or disable only automatic "
"updates. Also you can select the update mode. By default (minor)"
msgstr ""
"Você pode desativar todas as atualizações básicas do WordPress ou "
"desabilitar somente as atualizações automáticas. Além disso, você pode "
"selecionar o modo de atualização. Por padrão (menor)"
#: admin/pages/updates.php:148
msgid "Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3)."
msgstr ""
"Major - atualiza automaticamente para as principais versões (por exemplo, "
"4.1, 4.2, 4.3)."
#: admin/pages/updates.php:148
msgid ""
"Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3).."
msgstr ""
"Menor - atualiza automaticamente para lançamentos menores (por exemplo, "
"4.1.1, 4.1.2, 4.1.3)."
#: admin/pages/updates.php:148
msgid "Development - update automatically to Bleeding Edge releases."
msgstr ""
"Desenvolvimento - atualize automaticamente para as versões do Bleeding Edge."
#: admin/pages/updates.php:158
msgid ""
"Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in "
"the WordPress directory"
msgstr ""
"Habilite Atualizações Automáticas mesmo se uma pasta VCS (.git, .hg, .svn) "
"for encontrada no diretório WordPress"
#: admin/pages/updates.php:168
msgid ""
"This plugin allows you to hide the update WordPress reminder from all users "
"that are not assumed Administrators (cannot upgrade plugins).\n"
"\n"
"If you have multiple users then this means those who are not admins dont "
"need to see the message. Useful for CMS based sites, so the client doesnt "
"see the notice."
msgstr ""
"Este plug-in permite ocultar o lembrete de atualização do WordPress de todos "
"os usuários que não são considerados Administradores (não é possível "
"atualizar plugins). N nSe você tiver vários usuários, isso significa que "
"aqueles que não são administradores não precisam ver a mensagem. Útil para "
"sites baseados em CMS, para que o cliente não veja o aviso."
#: webcraftic-updates-manager.php:18
msgid ""
"We found that you have the \"Clearfy - disable unused features\" plugin "
"installed, this plugin already has update manager functions, so you can "
"deactivate plugin \"Update manager\"!"
msgstr ""
"Descobrimos que você tem o \"Clearfy - desativar os recursos não utilizados "
"\" plugin instalado, este plugin já tem funções de gerenciador de "
"atualização, assim você pode desativar o plugin \"Update manager \"!"
#: webcraftic-updates-manager.php:75
msgid "Webcraftic Updates Manager"
msgstr "Gerenciador de Atualizações do Webcraftic"

View File

@@ -0,0 +1,501 @@
msgid ""
msgstr ""
"Project-Id-Version: clearfy\n"
"POT-Creation-Date: 2018-10-16 23:25+0300\n"
"PO-Revision-Date: 2018-10-16 23:26+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/ajax/change-flag.php:26
msgid "Required arguments of slug, flag is empty!"
msgstr "Не переданы обязательные аругменты slug, flag"
#: admin/ajax/change-flag.php:38
#, php-format
msgid "Method %s is not found!"
msgstr "Метод %s не найден!"
#: admin/boot.php:23
#, php-format
msgid ""
"We found that you have the plugin %s installed. The functions of this plugin "
"already exist in %s. Please deactivate plugin %s to avoid conflicts between "
"plugins' functions."
msgstr ""
"Мы обнаружили, что у вас установлен плагин %s, функции этого плагина уже "
"есть в %s. Пожалуйста, деактивируйте плагин %s во избежание конфликтов между "
"функциями плагинов."
#: admin/boot.php:24
#, php-format
msgid ""
"If you do not want to deactivate the plugin %s for some reason, we strongly "
"recommend do not use the same plugins' functions at the same time!"
msgstr ""
"Если по какой-то причине вы не хотите деактивировать плагин %s, то мы "
"настоятельно рекомендуем не использовать похожие функции плагинов "
"одновременно!"
#: admin/boot.php:68
msgid "Disable plugin updates"
msgstr "Отключить обновления плагинов"
#: admin/boot.php:74
msgid "Disable theme updates"
msgstr "Отключить обновления тем"
#: admin/boot.php:80 admin/pages/updates.php:128
msgid "Disable Automatic Translation Updates"
msgstr "Отключить автоматические обновления переводов"
#: admin/boot.php:85
msgid "Disable wordPress core updates"
msgstr "Отключить обновления ядра Wordpress"
#: admin/boot.php:91 admin/pages/updates.php:180
msgid "Enable updates for VCS Installations"
msgstr "Включить обновления для установок VCS"
#: admin/boot.php:96
msgid "Plugin filters"
msgstr "Фильтры плагинов"
#: admin/boot.php:101 admin/pages/updates.php:190
msgid "Updates nags only for Admin"
msgstr "Показывать уведомления об обновлении Wordpress только для админа"
#: admin/boot.php:106 admin/pages/updates.php:238 admin/pages/updates.php:245
msgid "Core notifications"
msgstr "Оповещения ядра WP"
#: admin/boot.php:111
msgid "Notify me when update successful installed"
msgstr "Уведомлять когда обновления установлены"
#: admin/boot.php:116 admin/pages/updates.php:229
msgid "Email address"
msgstr "Е-мейл"
#: admin/boot.php:128
msgid "One click disable all updates"
msgstr "Отключить все обновления в один клик"
#: admin/boot.php:149
msgid "Get ultimate plugin free"
msgstr "Получите полную версию плагина бесплатно"
#: admin/boot.php:200 admin/boot.php:247
msgid "Update manager"
msgstr "Менеджер обновлений"
#: admin/boot.php:208
msgid "Auto-update disabled"
msgstr "Автообновление выключено"
#: admin/boot.php:209
msgid "Auto-update enabled"
msgstr "Автообновление включено"
#: admin/boot.php:210
msgid "Update disabled"
msgstr "Обновление отключено"
#: admin/boot.php:211
msgid "Translation update disabled"
msgstr "Обновление переводов отключено"
#: admin/pages/advanced.php:43
msgid "Advanced"
msgstr "Дополнительно"
#: admin/pages/advanced.php:71
msgid "Please, wait 90 sec. to see the forced automatic update result."
msgstr ""
"Пожалуйста, подождите 90 сек., чтобы увидеть результат принудительного "
"автоматического обновления."
#: admin/pages/advanced.php:81
msgid "Force Automatic Updates"
msgstr "Принудительное автоматическое обновление"
#: admin/pages/advanced.php:83
msgid ""
"This will attempt to force automatic updates. This is useful for debugging."
msgstr ""
"Эта возможность вам понадобится для проверки автоматических обновлений. "
"Настройте автоматические обновления и нажмите на эту кнопку, чтобы проверить "
"работают они или нет."
#: admin/pages/advanced.php:84
msgid "Force update"
msgstr "Запустить обновление"
#: admin/pages/plugins.php:72
msgid "Plugins"
msgstr "Плагины"
#: admin/pages/plugins.php:91
msgid ""
"- To disable updates individually choose the “Manual or automatic plugin "
"updates” option then save settings and comeback to this page."
msgstr ""
"Чтобы индивидуально отключить обновления, выберите опцию “Ручные или "
"автоматические обновления плагинов”, сохраните настройки и вернитесь на эту "
"страницу."
#: admin/pages/plugins.php:95
msgid ""
"- To configure plugin auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
"Чтобы индивидуально настроить автоматические обновления плагинов, выберите "
"опцию “Автоматические обновления”, сохраните настройки и вернитесь на эту "
"страницу."
#: admin/pages/plugins.php:326
msgid "Plugins list"
msgstr "Ваш список плагинов"
#: admin/pages/plugins.php:329
msgid "This page you can individually disable plugin updates and auto updates."
msgstr ""
"На этой странице вы можете индивидуально отключить обновления и "
"автообновления плагинов."
#: admin/pages/plugins.php:345 admin/pages/themes.php:321
msgid "Bulk actions"
msgstr "Массовые действия"
#: admin/pages/plugins.php:346 admin/pages/themes.php:322
#: admin/pages/updates.php:102 admin/pages/updates.php:117
#: admin/pages/updates.php:139
msgid "Disable updates"
msgstr "Отключить все обновления"
#: admin/pages/plugins.php:347 admin/pages/themes.php:323
msgid "Enable updates"
msgstr "Включить обновления"
#: admin/pages/plugins.php:348 admin/pages/themes.php:324
msgid "Enable auto-updates"
msgstr "Включить авто-обновления"
#: admin/pages/plugins.php:349 admin/pages/themes.php:325
msgid "Disable auto-updates"
msgstr "Отключить авто-обновления"
#: admin/pages/plugins.php:350 admin/pages/themes.php:326
msgid "Disable translation updates"
msgstr "Отключить обновление переводов"
#: admin/pages/plugins.php:351 admin/pages/themes.php:327
msgid "Enable translation updates"
msgstr "Включить обновление переводов"
#: admin/pages/plugins.php:352 admin/pages/plugins.php:373
msgid "Hide plugin"
msgstr "Скрыть плагин"
#: admin/pages/plugins.php:353
msgid "Show plugin"
msgstr "Показывать плагин"
#: admin/pages/plugins.php:355 admin/pages/themes.php:329
msgid "Apply"
msgstr "Применить"
#: admin/pages/plugins.php:362
msgid "Plugin"
msgstr "Плагин"
#: admin/pages/plugins.php:364 admin/pages/themes.php:338
#: admin/pages/updates.php:57
msgid "Updates"
msgstr "Обновления"
#: admin/pages/plugins.php:367 admin/pages/themes.php:341
msgid "Auto-updates"
msgstr "Авто-обновление"
#: admin/pages/plugins.php:370 admin/pages/themes.php:344
msgid "Translation updates"
msgstr "Обновление переводов"
#: admin/pages/plugins.php:432 admin/pages/themes.php:394
msgid "Select"
msgstr "Выбор"
#: admin/pages/plugins.php:453 admin/pages/plugins.php:472
#: admin/pages/plugins.php:491 admin/pages/plugins.php:507
#: admin/pages/themes.php:418 admin/pages/themes.php:437
#: admin/pages/themes.php:456
msgid "On"
msgstr "Вкл"
#: admin/pages/plugins.php:454 admin/pages/plugins.php:473
#: admin/pages/plugins.php:492 admin/pages/plugins.php:508
#: admin/pages/themes.php:419 admin/pages/themes.php:438
#: admin/pages/themes.php:457
msgid "Off"
msgstr "Выкл"
#: admin/pages/themes.php:69
msgid "Themes"
msgstr "Темы"
#: admin/pages/themes.php:88
msgid ""
"- To disable updates individually choose the “Manual or automatic theme "
"updates” option then save settings and comeback to this page."
msgstr ""
"Чтобы индивидуально отключить обновления, выберите опцию “Ручные или "
"автоматические обновления плагинов”, сохраните настройки и вернитесь на эту "
"страницу."
#: admin/pages/themes.php:92
msgid ""
"- To configure theme auto updates individually, choose the “Enable auto "
"updates” option then save settings and comeback to this page."
msgstr ""
"Чтобы индивидуально настроить автоматические обновления тем, выберите опцию "
"“Автоматические обновления”, сохраните настройки и вернитесь на эту страницу."
#: admin/pages/themes.php:302
msgid "Themes list"
msgstr "Ваш список тем"
#: admin/pages/themes.php:305
msgid "This page you can individually disable theme updates and auto updates."
msgstr ""
"На этой странице вы можете индивидуально отключить обновления и "
"автообновления тем."
#: admin/pages/themes.php:336
msgid "Theme"
msgstr "Тема"
#: admin/pages/updates.php:43
msgid "Updates manager"
msgstr "Менеджер обновлений"
#: admin/pages/updates.php:44
msgid "Manage all site updates"
msgstr "Упр. обновлениями сайта"
#: admin/pages/updates.php:57
msgid "General"
msgstr "Основные"
#: admin/pages/updates.php:91
msgid "General settings for WordPress, plugins and themes updates"
msgstr "Общие настройки для обновлений WordPress, плагинов и тем"
#: admin/pages/updates.php:91
msgid ""
"This page, you can enable or disable automatic updates. To test the "
"automatic updates, click the \"Advanced\" tab."
msgstr ""
"На этой странице можете включить или отключить автоматические обновления. "
"Чтобы протестировать работу автоматических обновлений, перейдите на вкладку "
"\"Дополнительно\"."
#: admin/pages/updates.php:98
msgid "Plugin Updates"
msgstr "Обновления плагина"
#: admin/pages/updates.php:100 admin/pages/updates.php:115
msgid "Manual updates"
msgstr "Ручные"
#: admin/pages/updates.php:101 admin/pages/updates.php:116
msgid "Enable auto updates"
msgstr "Автоматические"
#: admin/pages/updates.php:105
msgid ""
"You can disable all plugin updates or choose manual or automatic update mode."
msgstr ""
"Вы можете отключить все обновления плагинов или выбрать режим ручного или "
"автоматического обновления."
#: admin/pages/updates.php:113
msgid "Theme Updates"
msgstr "Обновления тем"
#: admin/pages/updates.php:120
msgid ""
"You can disable all themes updates or choose manual or automatic update mode."
msgstr ""
"Вы можете отключить все обновления тем или выбрать режим ручного или "
"автоматического обновления."
#: admin/pages/updates.php:137
msgid "WordPress Core Updates"
msgstr "Базовые обновления Wordpress"
#: admin/pages/updates.php:140
msgid "Disable auto updates"
msgstr "Отключить автоматические обновления"
#: admin/pages/updates.php:143
msgid "Allow minor auto updates"
msgstr "Разрешить незначительные автоматические обновления"
#: admin/pages/updates.php:147
msgid "Allow major auto updates"
msgstr "Разрешить основные автоматические обновления"
#: admin/pages/updates.php:151
msgid "Allow development auto updates"
msgstr "Разрешить разрабатываемые автоматические обновления"
#: admin/pages/updates.php:155
msgid ""
"You can disable all core WordPress updates, or disable only automatic "
"updates. Also you can select the update mode. By default (minor)"
msgstr ""
"Вы можете отключить все основные обновления WordPress или отключить только "
"автоматические обновления. Также вы можете выбрать режим обновления. По "
"умолчанию (младший)"
#: admin/pages/updates.php:155
msgid "Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3)."
msgstr ""
"Основные - автоматически обновления основных версий (4.1, 4.2, 4.3 и т.д)."
#: admin/pages/updates.php:155
msgid ""
"Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3).."
msgstr ""
"Незначительные - автоматически обновления промежуточных версий (4.1.1, "
"4.1.2, 4.1.3 и т.д)."
#: admin/pages/updates.php:155
msgid "Development - update automatically to Bleeding Edge releases."
msgstr "Разрабатываемые - автоматические обновления до финальных выпусков."
#: admin/pages/updates.php:182
msgid ""
"Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in "
"the WordPress directory"
msgstr ""
"Включить автоматическое обновление, даже если папка VCS (.git, .hg, .svn) "
"была найдена в каталоге WordPress"
#: admin/pages/updates.php:192
msgid ""
"This plugin allows you to hide the update WordPress reminder from all users "
"that are not assumed Administrators (cannot upgrade plugins).\n"
"\n"
"If you have multiple users then this means those who are not admins dont "
"need to see the message. Useful for CMS based sites, so the client doesnt "
"see the notice."
msgstr ""
"Этот опция позволяет вам скрыть напоминание о обновлении WordPress для всех "
"пользователей, которые не являются администраторами (не могут обновлять "
"плагины).\n"
"\n"
"Если у вас несколько пользователей, это означает, что те, кто не являются "
"админами, не должны видеть уведомления об обновлениях."
#: admin/pages/updates.php:200
msgid "Email Notifications"
msgstr "Оповещения ядра WP"
#: admin/pages/updates.php:200
msgid ""
"Email notifications are send once a day, you can choose what notifications "
"to send below."
msgstr ""
"Оповещения отправляются раз в день, ниже Вы можете выбрать какие сообщения "
"получать."
#: admin/pages/updates.php:207
msgid "Update available"
msgstr "Доступно обновления"
#: admin/pages/updates.php:208
msgid "Send me emails when an update is available."
msgstr "Уведомлять когда обновления доступны."
#: admin/pages/updates.php:218
msgid "Successful update"
msgstr "При успешном обновлении"
#: admin/pages/updates.php:219
msgid "Send me emails when something has been updated."
msgstr "Присылать оповещение когда обновления установлены."
#: admin/pages/updates.php:230
msgid "Seperate email addresses using commas."
msgstr "Адреса электронной почты через запятую."
#: admin/pages/updates.php:238
msgid ""
"Core notifications are handled by WordPress and not by this plugin. You can "
"only disable them, changing your email address in the settings above will "
"not affect these notifications."
msgstr ""
"Почтовые сообщения отправляются ядром Вордпресс, а не этим плагином. Вы "
"можете только отключить их, изменение вашего почтового адреса в настройках "
"выше не влияет на эти оповещения."
#: admin/pages/updates.php:246
msgid ""
"By default wordpress sends an email when a core update happend. Uncheck this "
"box to disable these emails."
msgstr ""
"По умолчанию сайт присылает сообщение когда ядро Вордпресс обновилось. "
"Снимите галочку если не хотите получать его."
#: webcraftic-updates-manager.php:58
msgid "Webcraftic Updates Manager"
msgstr "Webcraftic менеджер обновлений"
#~ msgid "If off email notifications disabled for wp core updates"
#~ msgstr "Если Выкл оповещения на почту об обновлении ядра не будут приходить"
#~ msgid "theme"
#~ msgstr "тема"
#~ msgid "themes"
#~ msgstr "темы"
#~ msgid "Plugin update available."
#~ msgstr "Доступны обновления плагина."
#~ msgid "plugin"
#~ msgstr "плагин"
#~ msgid "plugins"
#~ msgstr "плагины"
#~ msgid "Plugins have been updated."
#~ msgstr "Плагины были обновлены."
#~ msgid "Themes have been updated."
#~ msgstr "Темы были обновлены."
#~ msgid ""
#~ "We found that you have the \"Clearfy - disable unused features\" plugin "
#~ "installed, this plugin already has update manager functions, so you can "
#~ "deactivate plugin \"Update manager\"!"
#~ msgstr ""
#~ "Мы обнаружили, что у вас установлен плагин «Clearfy - отключить "
#~ "неиспользуемые функции», этот плагин уже имеет функции менеджера "
#~ "обновлений, поэтому вы можете отключить плагин «Менеджер обновлений»!"
#~ msgid "Description"
#~ msgstr "Описание"

View File

@@ -0,0 +1,13 @@
<?php #comp-page builds: premium
/**
* Updates for altering the table used to store statistics data.
* Adds new columns and renames existing ones in order to add support for the new social buttons.
*/
class WUPMUpdate010008 extends Wbcr_Factory480_Update {
public function install()
{
//$this->plugin->
}
}

View File

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

View File

@@ -0,0 +1,141 @@
=== Disable updates, Updates manager, Disable automatic updates ===
Tags: disable updates, automatic updates, disable updates manager, easy updates manager, update control, updates manager, webcraftic update manager, wp disable, clearfy, Easy Updates Manager, Clearfy disable unused features</strong>, WP Disables Updates, Companion Auto Update, Disable All WordPress Updates, WP Updates Settings, WP Disable Automatic Updates
Contributors: webcraftic, creativemotion, alexkovalevv
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
Disables the theme, plugin and core update checking, the related cronjobs and notification system.
== Description ==
Webcraftic Updates Manager is a light yet powerful plugin which enables you to manage all types of updates on your single site install.
With loads of settings making endless possibilities for configuration, Webcraftic Updates Manager is an obvious choice for anyone wanting to take control of their websites updates.
FEATURES INCLUDE
<strong>Disable all updates</strong> This setting quite easily just overrides all other settings and disables everything.
<strong>Disable updates of the WordPress Core</strong> - This setting is used to toggle on and off the WordPress core updates.
<strong>Disable plugins updates</strong> This setting is used to disable all plugins updates on your website.
<strong>Disable themes updates</strong> This setting is used to disable all theme updates on your website.
<strong>Enable Major Releases</strong> This setting toggles whether or not you want the major WordPress core versions to automatically update themselves.
<strong>Enable Minor Releases</strong> This setting toggles whether or not you want the minor WordPress core versions to automatically update themselves.
<strong>Enable Development Updates</strong> This setting toggles whether or not you want the bleeding edge version of WordPress to automatically update itself.
<strong>Enable automatic plugins updates</strong> This setting can either automatically update all your plugins, or automatically update any select plugins you want.
<strong>Enable automatic themes updates</strong> This setting can either automatically update all your themes, or automatically update any select themes you want.
<strong>Disable translation updates</strong> This setting can unable automatic updating for translation updates.
<strong>Disable automatic updates for plugins.</strong>
<strong>Disable automatic updates for themes.</strong>
<strong>Disable automatic updates for core.</strong>
Some functions are taken from the following popular plugins <strong>Easy Updates Manager</strong>, <strong>Clearfy disable unused features</strong>, <strong>WP Disables Updates</strong>, <strong>Companion Auto Update</strong>, <strong>Disable All WordPress Updates</strong>, <strong>WP Updates Settings</strong>, <strong>WP Disable Automatic Updates</strong>
== Translations ==
* English - default, always included
* Russian
#### 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 Comments for Any Post Types (Remove Comments)](https://wordpress.org/plugins/comments-plus/)
* [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")
If you want to help with the translation, please contact me through this site or through the contacts inside the plugin.
== Installation ==
This section describes how to install the plugin and get it working.
1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use the Settings->Webcrfatic update manager screen to configure the plugin
== Screenshots ==
1. Control panel (Base options)
2. Control panel (Individualy updates)
== Changelog ==
= 1.1.9 (05.12.2024) =
* Added: Compatibility with Wordpress 6.7
* Added: Compatibility with php 8.3
= 1.1.8 (21.03.2024) =
* Added: Compatibility with Wordpress 6.4
* Added: Compatibility with php 8.2
= 1.1.7 (21.11.2023) =
* Added: Compatibility with Wordpress 6.4
* Added: Compatibility with php 8.2
= 1.1.6 (22.03.2023) =
* Fixed: Freemius framework conflict
* Added: Compatibility with Wordpress 6.2
= 1.1.5 (30.05.2022) =
* Added: Compatibility with Wordpress 6.0
= 1.1.4 (24.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: Improved plugin security
* Added: Compatibility with Wordpress 4.2 - 5.x
* Added: Multisite support
* Fixed: Minor bugs
= 1.0.7 =
* Fixed: Update core
* Fixed: It was not possible to close notifications about the incompatibility of plugins.
= 1.0.6 =
* Fixed: Update core
* Fixed: Small bugs
* Fixed: Translations
= 1.0.5 =
* Fixed: Compatibility with Clearfy plugin
* Fixed: Slowing down the plugins page when updates were disabled
* Fixed: The plugin interface did not work and the styles were not loaded due to security settings
* 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.4 =
* Fixed bug: admin area loads slower when theme and plugin updates: disabled
= 1.0.3 =
* Fixed: Core bugs
= 1.0.1 =
* Fixed bug whith update core
* Update core
* Add french translation
= 1.0.0 =
* Plugin release

View File

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

View File

@@ -0,0 +1,137 @@
<?php
/**
* Plugin Name: Webcraftic Updates manager
* Plugin URI: https://wordpress.org/plugins/webcraftic-updates-manager/
* Description: Manage all your WordPress updates, automatic updates, logs, and loads more.
* Author: Webcraftic <wordpress.webraftic@gmail.com>
* Version: 1.1.9
* Text Domain: webcraftic-updates-manager
* 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
$wupm_plugin_info = [
'prefix' => 'wbcr_updates_manager_',//wbcr_upm_
'plugin_name' => 'wbcr_updates_manager',
'plugin_title' => __('Webcraftic Updates Manager', 'webcraftic-updates-manager'),
// 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' => '105408901'],
// 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']
]
];
$wupm_compatibility = new Wbcr_Factory480_Requirements(__FILE__, array_merge($wupm_plugin_info, [
'plugin_already_activate' => defined('WUPM_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( !$wupm_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('WUPM_PLUGIN_ACTIVE', true);
define('WUPM_PLUGIN_VERSION', $wupm_compatibility->get_plugin_version());
define('WUPM_PLUGIN_DIR', dirname(__FILE__));
define('WUPM_PLUGIN_BASE', plugin_basename(__FILE__));
define('WUPM_PLUGIN_URL', plugins_url('', __FILE__));
/**
* -----------------------------------------------------------------------------
* PLUGIN INIT
* -----------------------------------------------------------------------------
*/
require_once(WUPM_PLUGIN_DIR . '/libs/factory/core/boot.php');
require_once(WUPM_PLUGIN_DIR . '/includes/class-plugin.php');
try {
new WUPM_Plugin(__FILE__, array_merge($wupm_plugin_info, [
'plugin_version' => WUPM_PLUGIN_VERSION,
'plugin_text_domain' => $wupm_compatibility->get_text_domain(),
]));
} catch( Exception $e ) {
// Plugin wasn't initialized due to an error
define('WUPM_PLUGIN_THROW_ERROR', true);
$wupm_plugin_error_func = function () use ($e) {
$error = sprintf("The %s plugin has stopped. <b>Error:</b> %s Code: %s", 'Webcraftic Updates manager', $e->getMessage(), $e->getCode());
echo '<div class="notice notice-error"><p>' . $error . '</p></div>';
};
add_action('admin_notices', $wupm_plugin_error_func);
add_action('network_admin_notices', $wupm_plugin_error_func);
}
// @formatter:on