Current Path : /storage/v11800/affypharma/public_html/wp-content/plugins/mailchimp-for-wp/includes/admin/migrations/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/affypharma/public_html/wp-content/plugins/mailchimp-for-wp/includes/admin/migrations/4.8.2-move-debug-log-to-subdirectory.php |
<?php
defined( 'ABSPATH' ) or exit;
// get old filename
$upload_dir = wp_upload_dir( null, false );
$old_filename = trailingslashit( $upload_dir['basedir'] ) . 'mc4wp-debug-log.php';
// if old file exists, move it to new location
if ( is_file( $old_filename ) ) {
$new_filename = $upload_dir['basedir'] . '/mailchimp-for-wp/debug-log.php';
$dir = dirname( $new_filename );
if ( ! is_dir( $dir ) ) {
mkdir( $dir, 0755, true );
}
rename( $old_filename, $new_filename );
}