HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
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/wordpress/wp-content/plugins/popups-for-divi/includes/helpers.php
<?php
/**
 * Helper functions (or utility functions) aid in keeping the code clean. They
 * do not add business logic but simplify other tasks, such as sanitation of
 * input values.
 *
 * @package PopupsForDivi
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;


/**
 * Returns an absolute URL to the requested resource inside the plugin folder.
 * When no resource is specified, the plugin folders root URL is returned (with
 * trailing slash). The result is always passed through esc_url().
 *
 * @since 3.0.0
 *
 * @param string $resource Optional. Path to a resource, relative to the plugin
 *                         root.
 *
 * @return string Escaped, absolute URL to the path inside the plugin folder.
 */
function pfd_url( $resource = '' ) {
	return esc_url( DIVI_POPUP_URL . $resource );
}

/**
 * Returns an absolute path to the requested resource inside the plugin folder.
 * When no resource is specified, the plugin folders root path is returned (with
 * trailing slash)..
 *
 * @since 3.0.0
 *
 * @param string $resource Optional. Path to a resource, relative to the plugin
 *                         root.
 *
 * @return string Escaped, absolute URL to the path inside the plugin folder.
 */
function pfd_path( $resource = '' ) {
	return DIVI_POPUP_PATH . $resource;
}

/**
 * Returns the state of the "debug_mode" flag.
 *
 * @since 2.0.0
 *
 * @return bool True, when the JS should be unminified. The production setting
 *              should return false.
 */
function pfd_flag_debug_mode() {
	$debug_mode = (bool) dm_get_const( 'WP_DEBUG' );

	/**
	 * Determine, if the JS snippet should be minified.
	 *
	 * @since 1.0.0
	 *
	 * @param bool $debug_mode True means, the snippet will stay un-minified.
	 */
	return apply_filters( 'divi_areas_enable_debug_mode', $debug_mode );
}