HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux sci 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: tpdc (1002)
PHP: 7.4.3-4ubuntu2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/nsci/wp-content/themes/soledad/inc/theme-updates.php
<?php
// No direct access, please
function penci_is_new_update( $version = null ){
	if( ! is_admin() || get_theme_mod( 'penci_disable_notice_updates' ) ){
		return false;
	}
	
	$url = 'https://penci-api.s3.amazonaws.com/datas.json';
	// Namespace in case of collision, since transients don't support groups like object caching.
	$cache_key = md5( 'remote_apis|' . $url );
	$request = get_transient( $cache_key );

	if ( false === $request ) {
		$request = wp_remote_get( $url );

		if ( is_wp_error( $request ) ) {
			// Cache failures for a short time, will speed up page rendering in the event of remote failure. Cache for 15 mins = 60 * 15 = 900
			set_transient( $cache_key, $request, 900 );
			return false;
		}
		// Success, cache for a longer time - 24 hours = 60 * 60 * 24 = 86400
		set_transient( $cache_key, $request, 86400 );
	}

	if ( is_wp_error( $request ) ) {
		return false;
	}

	$body = wp_remote_retrieve_body( $request );
	$data = json_decode( $body );

	if ( ! empty( $data ) ) {
		$current_version = $data->soledad->version;
		if( isset( $current_version ) ){
			if( 'version' == $version ){
				return $current_version;
			}
			if( ! defined('PENCI_SOLEDAD_VERSION') || empty( PENCI_SOLEDAD_VERSION ) || version_compare( $current_version, PENCI_SOLEDAD_VERSION, '<=' ) ) {
				return false;
			} else {
				return true;
			}
		}
	}
}