HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
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: //proc/1526/task/1923/cwd/zaklada/wp-content/plugins/responsive-lightbox/includes/functions.php
<?php
/**
 * Responsive Lightbox public functions
 *
 * Functions available for users and developers. May not be replaced.
 *
 * @since 2.0
 */
if ( ! defined( 'ABSPATH' ) )
	exit;

/**
 * Display gallery using shortcode.
 *
 * @param array $args Shortcode arguments
 * @return void
 */
function rl_gallery( $args = array() ) {
	$defaults = array(
		'id' => 0
	);

	// merge defaults with arguments
	$args = array_merge( $defaults, $args );

	// parse ID
	$args['id'] = (int) $args['id'];

	// is it gallery?
	if ( get_post_type( $args['id'] ) === 'rl_gallery' )
		echo do_shortcode( '[rl_gallery id="' . $args['id'] . '"]' );
	else
		echo '[rl_gallery id="' . $args['id'] . '"]';
}

/**
 * Get gallery shortcode images - wrapper.
 *
 * @param array $args Gallery arguments
 * @return array Gallery images
 */
function rl_get_gallery_shortcode_images( $args ) {
	return Responsive_Lightbox()->frontend->get_gallery_shortcode_images( $args );
}

/**
 * Get gallery fields - wrapper.
 *
 * @param string $type Gallery type
 * @return array Gallery fields
 */
function rl_get_gallery_fields( $type ) {
	return Responsive_Lightbox()->frontend->get_gallery_fields( $type );
}

/**
 * Get gallery fields combined with shortcode attributes - wrapper.
 *
 * @param array $fields Gallery fields
 * @param array $shortcode_atts Gallery shortcode attributes
 * @param bool $gallery Whether is it rl_gallery shortcode
 * @return array All combined field attributes
 */
function rl_get_gallery_fields_atts( $fields, $shortcode_atts, $gallery = true ) {
	return Responsive_Lightbox()->frontend->get_gallery_fields_atts( $fields, $shortcode_atts, $gallery );
}

/**
 * Get gallery images - wrapper.
 *
 * @param int $gallery_id Gallery ID
 * @param array $args Gellery args
 * @return array Gallery images
 */
function rl_get_gallery_images( $gallery_id, $args ) {
	if ( did_action( 'init' ) )
		return Responsive_Lightbox()->galleries->get_gallery_images( $gallery_id, $args );
	else
		return array();
}

/**
 * Add lightbox to images, galleries and videos.
 *
 * @param string $content HTML content
 * @return string
 */
function rl_add_lightbox( $content ) {
	return Responsive_Lightbox()->frontend->add_lightbox( $content );
}

/**
 * Get attachment id by url.
 * 
 * @param string $url
 * @return int
 */
function rl_get_attachment_id_by_url( $url ) {
	return Responsive_Lightbox()->frontend->get_attachment_id_by_url( $url );
}

/**
 * Get image size by url.
 *
 * @param string $url Image url
 * @return string
 */
function rl_get_image_size_by_url( $url ) {
	return Responsive_Lightbox()->frontend->get_image_size_by_url( $url );
}

/**
 * Check whether lightbox supports specified type.
 *
 * @param string $type Lightbox support type
 * @return bool|array 
 */
function rl_current_lightbox_supports( $type = '' ) {
	$script = Responsive_Lightbox()->options['settings']['script'];
	$scripts = Responsive_Lightbox()->settings->scripts;

	if ( $type !== '' ) {
		if ( array_key_exists( $script, $scripts ) && array_key_exists( 'supports', $scripts[$script] ) )
			return in_array( $type, $scripts[$script]['supports'], true );
	} else
		return $scripts[$script]['supports'];

	return false;
}