modified file smtp-mailer
This commit is contained in:
@ -0,0 +1,185 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Get selected filter type
|
||||
|
||||
|
||||
if( isset( $_GET['filter'] ) ) {
|
||||
|
||||
|
||||
$filter = sanitize_key( $_GET['filter'] );
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
$filter = 'plugins';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Select correct database row
|
||||
|
||||
|
||||
switch ( $filter ) {
|
||||
|
||||
|
||||
case 'themes':
|
||||
|
||||
|
||||
$db_table = 'notUpdateListTh';
|
||||
|
||||
|
||||
$filter_name = __( 'Themes', 'companion-auto-update' );
|
||||
|
||||
|
||||
$filterFunction = wp_get_themes();
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case 'plugins':
|
||||
|
||||
|
||||
$db_table = 'notUpdateList';
|
||||
|
||||
|
||||
$filter_name = __( 'Plugins', 'companion-auto-update' );
|
||||
|
||||
|
||||
$filterFunction = get_plugins();
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
|
||||
$db_table = 'notUpdateList';
|
||||
|
||||
|
||||
$filter_name = __( 'Plugins', 'companion-auto-update' );
|
||||
|
||||
|
||||
$filterFunction = get_plugins();
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="subsubsub">
|
||||
|
||||
|
||||
<li><a <?php if( $filter == 'plugins' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'pluginlist&filter=plugins' ); ?>'><?php _e( 'Plugins', 'companion-auto-update' ); ?></a></li> |
|
||||
|
||||
|
||||
<li><a <?php if( $filter == 'themes' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'pluginlist&filter=themes' ); ?>'><?php _e( 'Themes', 'companion-auto-update' ); ?></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style='clear: both;'></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if( $filter == 'themes' ) { ?>
|
||||
|
||||
|
||||
<div id="message" class="cau">
|
||||
|
||||
|
||||
We've had to (temporarily) disable the theme filter because it was causing issues on some installations. We'll try to get it working again in a future update.
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><?php echo sprintf( esc_html__( 'Prevent certain %s from updating automatically. %s that you select here will be skipped by Companion Auto Update and will require manual updating.', 'companion-auto-update' ), strtolower( $filter_name ), $filter_name ); ?></p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $wpdb;
|
||||
|
||||
|
||||
$table_name = $wpdb->prefix."auto_updates";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Save list
|
||||
|
||||
|
||||
if( isset( $_POST['submit'] ) ) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
check_admin_referer( 'cau_save_pluginlist' );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$noUpdateList = '';
|
||||
|
||||
|
||||
$i = 0;
|
||||
|
||||
|
||||
$noUpdateCount = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if( isset( $_POST['post'] ) ) {
|
||||
|
||||
|
||||
$noUpdateCount = count( $_POST['post'] );
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user