HEX
Server: Apache/2.4.29 (Ubuntu)
System: Linux bareserver 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: root (0)
PHP: 7.2.24-0ubuntu0.18.04.17
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,
Upload Files
File: /var/www/html/site/newsite/wp-content/plugins/jupiterx-core/includes/utilities/shortcodes.php
<?php
/**
 * Utility Shortcodes.
 *
 * @package JupiterX_Core\Utilities
 */

add_shortcode( 'jupiterx_current_date', 'jupiterx_current_date_shortcode' );
/**
 * Return current date.
 *
 * @since 1.16.0
 *
 * @param array $atts shortcode attribute date format.
 *
 * @return string date format.
 * @SuppressWarnings(PHPMD.ElseExpression)
 */
function jupiterx_current_date_shortcode( $atts ) {

	/**
	 * Shortcode attributes.
	 * [current_date format=’d/m/Y’] =>  01/05/2020
	 * [current_date format=’F d, Y’] => Feb 04, 2020
	 */

	$atts = shortcode_atts(
		[
			'format' => '',
		], $atts
	);

	if ( ! empty( $atts['format'] ) ) {
		$date_format = $atts['format'];
	} else {
		$date_format = 'l jS \of F Y h:i:s A';
	}

	if ( 'z' === $date_format ) {
		return date_i18n( $date_format ) + 1;
	} else {
		return date_i18n( $date_format );
	}

}