updated plugin Companion Auto Update
version 3.8.0
This commit is contained in:
@ -3,14 +3,24 @@
|
||||
// Check if emails should be send or not
|
||||
function cau_check_updates_mail() {
|
||||
|
||||
// Notify of pending updates
|
||||
if( cau_get_db_value( 'send' ) == 'on' ) {
|
||||
cau_list_theme_updates(); // Check for theme updates
|
||||
cau_list_plugin_updates(); // Check for plugin updates
|
||||
}
|
||||
|
||||
if( cau_get_db_value( 'sendupdate' ) == 'on' && cau_get_db_value( 'plugins' ) == 'on' ) cau_plugin_updated(); // Check for updated plugins
|
||||
// Notify of completed updates
|
||||
if( cau_get_db_value( 'sendupdate' ) == 'on' && cau_get_db_value( 'plugins' ) == 'on' ) {
|
||||
cau_plugin_updated(); // Check for updated plugins
|
||||
}
|
||||
|
||||
if( cau_get_db_value( 'sendoutdated' ) == 'on' ) cau_list_outdated_software(); // Check for oudated plugins
|
||||
}
|
||||
|
||||
// Notify of out of date software
|
||||
function cau_outdated_notifier_mail() {
|
||||
if( cau_get_db_value( 'sendoutdated' ) == 'on' ) {
|
||||
cau_list_outdated_software(); // Check for oudated plugins
|
||||
}
|
||||
}
|
||||
|
||||
// Ge the emailadresses it should be send to
|
||||
@ -31,6 +41,7 @@ function cau_set_email() {
|
||||
return $emailArray;
|
||||
|
||||
}
|
||||
|
||||
// Mail format
|
||||
function cau_is_html() {
|
||||
|
||||
@ -65,6 +76,7 @@ function cau_outdated_message( $single, $plural, $list ) {
|
||||
$text .= "\n";
|
||||
|
||||
foreach ( $list as $plugin => $version ) {
|
||||
if( $version == '' ) $version = __( "Unknown", "companion-auto-update" );
|
||||
$text .= "- ".sprintf( esc_html__( "%s tested up to: %s", "companion-auto-update" ), $plugin, $version )."\n";
|
||||
}
|
||||
|
||||
@ -306,7 +318,7 @@ function cau_plugin_updated() {
|
||||
|
||||
$dateFormat = get_option( 'date_format' );
|
||||
$timestamp = date_i18n( $dateFormat, filemtime( $fullPath ) );
|
||||
$timestamp .= ' ‐ '.date( 'H:i', filemtime( $fullPath ) );
|
||||
$timestamp .= ' - '.date( 'H:i', filemtime( $fullPath ) );
|
||||
|
||||
if( $fileDate >= $lastday ) {
|
||||
|
||||
@ -348,7 +360,7 @@ function cau_plugin_updated() {
|
||||
|
||||
$dateFormat = get_option( 'date_format' );
|
||||
$timestamp = date_i18n( $dateFormat, filemtime( $fullPath ) );
|
||||
$timestamp .= ' ‐ '.date( 'H:i', filemtime( $fullPath ) );
|
||||
$timestamp .= ' - '.date( 'H:i', filemtime( $fullPath ) );
|
||||
|
||||
if( $fileDate >= $lastday ) {
|
||||
array_push( $themeNames, $path_parts['filename'] );
|
||||
|
Reference in New Issue
Block a user