Skip to content

Commit

Permalink
Dump unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kprovance committed Jul 19, 2024
1 parent bf17ff9 commit 43c787a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
15 changes: 0 additions & 15 deletions redux-core/inc/classes/class-redux-filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,21 +305,6 @@ private function generate_default_files() {
if ( ! $this->is_dir( Redux_Core::$upload_dir ) ) {
$this->mkdir( Redux_Core::$upload_dir );
}

$hash_path = trailingslashit( Redux_Core::$upload_dir ) . 'hash';
if ( ! $this->file_exists( $hash_path ) ) {
$this->put_contents( $hash_path, Redux_Helpers::get_hash() );
}

$version_path = trailingslashit( Redux_Core::$upload_dir ) . 'version';
if ( ! $this->file_exists( $version_path ) ) {
$this->put_contents( $version_path, Redux_Core::$version );
} else {
$version_compare = $this->get_contents( $version_path );
if ( (string) Redux_Core::$version !== $version_compare ) {
$this->put_contents( $version_path, Redux_Core::$version );
}
}
}

/**
Expand Down
10 changes: 0 additions & 10 deletions redux-core/inc/classes/class-redux-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,6 @@ public static function cleanFilePath( string $path ): string { // phpcs:ignore W
return Redux_Functions_Ex::wp_normalize_path( $path );
}

/**
* Create unique hash.
*
* @return string
*/
public static function get_hash(): string {
$remote_addr = Redux_Core::$server['REMOTE_ADDR'] ?? '127.0.0.1';
return md5( network_site_url() . '-' . $remote_addr );
}

/**
* Get info for specified file.
*
Expand Down

0 comments on commit 43c787a

Please sign in to comment.