403Webshell
Server IP : 151.101.66.159  /  Your IP : 216.73.216.66
Web Server : Flywheel/5.1.0
System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64
User : root ( )
PHP Version : 7.4.33.18
Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wp-content/plugins/pods/components/Templates/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wp-content/plugins/pods/components/Templates/includes//functions-pod_reference.php
<?php

// Don't load directly.
if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

add_action( 'wp_ajax_pq_loadpod', 'pods_ajax_pq_loadpod' );

/**
 * @param bool|string $podname
 */
function pods_ajax_pq_loadpod() {
	// This is the AJAX entry point; pq_loadpod() is also called server-side (see element-pod_reference-content.php).
	check_ajax_referer( 'pods_pq_loadpod', 'nonce' );

	pq_loadpod();
}

/**
 * @param bool|string $podname
 *
 * @return array
 */
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function pq_loadpod( $podname = false ) {

	if ( ! pods_is_admin() ) {
		return pods_error( __( 'Unauthorized request', 'pods' ) );
	}
	if ( ! empty( $_POST['pod_reference']['pod'] ) ) {
		$podname = $_POST['pod_reference']['pod'];
	}
	if ( ! empty( $_POST['pod'] ) ) {
		$podname = $_POST['pod'];
	}
	$fields = [ __( 'No reference Pod selected', 'pods' ) ];

	if ( ! empty( $podname ) ) {
		$fields = pq_recurse_pod_fields( $podname );
	}
	if ( ! empty( $_POST['pod_reference']['pod'] ) || ! empty( $_POST['pod'] ) ) {
		header( 'Content-Type:application/json' );
		echo json_encode( $fields );
		die;
	}

	return $fields;
}

/**
 * @param        $pod_name
 * @param string $prefix
 * @param array  $pods_visited
 *
 * @return array
 */
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
function pq_recurse_pod_fields( $pod_name, $prefix = '', &$pods_visited = [] ) {

	$fields = [];
	if ( empty( $pod_name ) ) {
		return $fields;
	}

	$pod = pods_get_instance( $pod_name );

	if ( empty( $pod ) || ! $pod->valid() ) {
		return $fields;
	}

	$recurse_queue = [];

	$image_sizes   = get_intermediate_image_sizes();
	$image_sizes[] = 'full';

	$media_fields = [
		'title',
		'caption',
		'description',
		'alt_text',
		'width',
		'height',
		'filesize',
		'filename',
		'extension',
		'mime_type',
	];

	$pod_fields = $pod->fields();

	foreach ( $pod_fields as $name => $field ) {
		// Field type specific handling
		if ( 'file' === $field['type'] && 'attachment' === pods_v( 'file_uploader', $field ) ) {
			// Add base field name
			$fields[] = $prefix . $name;
			$fields[] = $prefix . $name . '._src';
			$fields[] = $prefix . $name . '._img';

			foreach ( $media_fields as $media_field ) {
				$fields[] = "{$prefix}{$name}._img.{$media_field}";
			}

			foreach ( $image_sizes as $image_size ) {
				$fields[] = "{$prefix}{$name}._src.{$image_size}";

				if ( 'multi' !== pods_v( 'file_format_type', $field ) ) {
					$fields[] = "{$prefix}{$name}._src_relative.{$image_size}";
					$fields[] = "{$prefix}{$name}._src_schemeless.{$image_size}";
				}

				$fields[] = "{$prefix}{$name}._img.{$image_size}";
			}
		} elseif ( ! empty( $field['table_info'] ) && ! empty( $field['table_info']['pod'] ) ) {
			$linked_pod = $field['table_info']['pod']['name'];
			if ( ! isset( $pods_visited[ $linked_pod ] ) || ! in_array( $name, $pods_visited[ $linked_pod ], true ) ) {
				$pods_visited[ $linked_pod ][] = $name;
				$recurse_queue[ $linked_pod ]  = "{$prefix}{$name}.";
			}
		} else {
			// Add base field name
			$fields[] = $prefix . $name;
		}
	}//end foreach

	sort( $fields );

	if ( post_type_supports( $pod_name, 'thumbnail' ) ) {
		$fields[] = "{$prefix}post_thumbnail";
		$fields[] = "{$prefix}post_thumbnail_url";

		foreach ( $media_fields as $media_field ) {
			$fields[] = "{$prefix}post_thumbnail.{$media_field}";
		}

		foreach ( $image_sizes as $image_size ) {
			$fields[] = "{$prefix}post_thumbnail.{$image_size}";
			$fields[] = "{$prefix}post_thumbnail_url.{$image_size}";
		}
	}

	foreach ( $recurse_queue as $recurse_name => $recurse_prefix ) {
		$fields[] = trim( $recurse_prefix, '.' );
		$fields   = array_merge( $fields, pq_recurse_pod_fields( $recurse_name, $recurse_prefix, $pods_visited ) );
	}

	return $fields;
}


Youez - 2016 - github.com/yon3zu
LinuXploit