PHP 8.2.30
Preview: class-wp-customize-themes-section.php Size: 6.79 KB
/home/byroehnu/kingslandgroupofschools.com.ng/wp-includes/customize/class-wp-customize-themes-section.php

<?php
/**
 * Customize API: WP_Customize_Themes_Section class
 *
 * @package WordPress
 * @subpackage Customize
 * @since 4.4.0
 */

/**
 * Customize Themes Section class.
 *
 * A UI container for theme controls, which are displayed within sections.
 *
 * @since 4.2.0
 *
 * @see WP_Customize_Section
 */
class WP_Customize_Themes_Section extends WP_Customize_Section {

	/**
	 * Section type.
	 *
	 * @since 4.2.0
	 * @var string
	 */
	public $type = 'themes';

	/**
	 * Theme section action.
	 *
	 * Defines the type of themes to load (installed, wporg, etc.).
	 *
	 * @since 4.9.0
	 * @var string
	 */
	public $action = '';

	/**
	 * Theme section filter type.
	 *
	 * Determines whether filters are applied to loaded (local) themes or by initiating a new remote query (remote).
	 * When filtering is local, the initial themes query is not paginated by default.
	 *
	 * @since 4.9.0
	 * @var string
	 */
	public $filter_type = 'local';

	/**
	 * Gets section parameters for JS.
	 *
	 * @since 4.9.0
	 * @return array Exported parameters.
	 */
	public function json() {
		$exported                = parent::json();
		$exported['action']      = $this->action;
		$exported['filter_type'] = $this->filter_type;

		return $exported;
	}

	/**
	 * Renders a themes section as a JS template.
	 *
	 * The template is only rendered by PHP once, so all actions are prepared at once on the server side.
	 *
	 * @since 4.9.0
	 */
	protected function render_template() {
		?>
		<li id="accordion-section-{{ data.id }}" class="theme-section">
			<button type="button" class="customize-themes-section-title themes-section-{{ data.id }}">{{ data.title }}</button>
			<?php if ( current_user_can( 'install_themes' ) || is_multisite() ) : // @todo Upload support. ?>
			<?php endif; ?>
			<div class="customize-themes-section themes-section-{{ data.id }} control-section-content themes-php">
				<div class="theme-overlay" tabindex="0" role="dialog" aria-label="<?php esc_attr_e( 'Theme Details' ); ?>"></div>
				<div class="theme-browser rendered">
					<div class="customize-preview-header themes-filter-bar">
						<?php $this->filter_bar_content_template(); ?>
					</div>
					<?php $this->filter_drawer_content_template(); ?>
					<div class="error unexpected-error" style="display: none; ">
						<p>
							<?php
							printf(
								/* translators: %s: Support forums URL. */
								__( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ),
								__( 'https://wordpress.org/support/forums/' )
							);
							?>
						</p>
					</div>
					<ul class="themes">
					</ul>
					<p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>
					<p class="no-themes-local">
						<?php
						printf(
							/* translators: %s: "Search WordPress.org themes" button text. */
							__( 'No themes found. Try a different search, or %s.' ),
							sprintf( '<button type="button" class="button-link search-dotorg-themes">%s</button>', __( 'Search WordPress.org themes' ) )
						);
						?>
					</p>
					<p class="spinner"></p>
				</div>
			</div>
		</li>
		<?php
	}

	/**
	 * Renders the filter bar portion of a themes section as a JS template.
	 *
	 * The template is only rendered by PHP once, so all actions are prepared at once on the server side.
	 * The filter bar container is rendered by {@see render_template()}.
	 *
	 * @since 4.9.0
	 */
	protected function filter_bar_content_template() {
		?>
		<button type="button" class="button button-primary customize-section-back customize-themes-mobile-back"><?php _e( 'Go to theme sources' ); ?></button>
		<# if ( 'wporg' === data.action ) { #>
			<div class="themes-filter-container">
				<label for="wp-filter-search-input-{{ data.id }}"><?php _e( 'Search themes' ); ?></label>
				<div class="search-form-input">
					<input type="search" id="wp-filter-search-input-{{ data.id }}" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search">
					<div class="search-icon" aria-hidden="true"></div>
					<span id="{{ data.id }}-live-search-desc" class="screen-reader-text">
						<?php
						/* translators: Hidden accessibility text. */
						_e( 'The search results will be updated as you type.' );
						?>
					</span>
				</div>
			</div>
		<# } else { #>
			<div class="themes-filter-container">
				<label for="{{ data.id }}-themes-filter"><?php _e( 'Search themes' ); ?></label>
				<div class="search-form-input">
					<input type="search" id="{{ data.id }}-themes-filter" aria-describedby="{{ data.id }}-live-search-desc" class="wp-filter-search wp-filter-search-themes" />
					<div class="search-icon" aria-hidden="true"></div>
					<span id="{{ data.id }}-live-search-desc" class="screen-reader-text">
						<?php
						/* translators: Hidden accessibility text. */
						_e( 'The search results will be updated as you type.' );
						?>
					</span>
				</div>
			</div>
		<# } #>
		<div class="filter-themes-wrapper">
			<# if ( 'wporg' === data.action ) { #>
			<button type="button" class="button feature-filter-toggle">
				<span class="filter-count-0"><?php _e( 'Filter themes' ); ?></span><span class="filter-count-filters">
					<?php
					/* translators: %s: Number of filters selected. */
					printf( __( 'Filter themes (%s)' ), '<span class="theme-filter-count">0</span>' );
					?>
				</span>
			</button>
			<# } #>
			<div class="filter-themes-count">
				<span class="themes-displayed">
					<?php
					/* translators: %s: Number of themes displayed. */
					printf( __( '%s themes' ), '<span class="theme-count">0</span>' );
					?>
				</span>
			</div>
		</div>
		<?php
	}

	/**
	 * Renders the filter drawer portion of a themes section as a JS template.
	 *
	 * The filter bar container is rendered by {@see render_template()}.
	 *
	 * @since 4.9.0
	 */
	protected function filter_drawer_content_template() {
		/*
		 * @todo Use the .org API instead of the local core feature list.
		 * The .org API is currently outdated and will be reconciled when the .org themes directory is next redesigned.
		 */
		$feature_list = get_theme_feature_list( false );
		?>
		<# if ( 'wporg' === data.action ) { #>
			<div class="filter-drawer filter-details">
				<?php foreach ( $feature_list as $feature_name => $features ) : ?>
					<fieldset class="filter-group">
						<legend><?php echo esc_html( $feature_name ); ?></legend>
						<div class="filter-group-feature">
							<?php foreach ( $features as $feature => $feature_name ) : ?>
								<input type="checkbox" id="filter-id-<?php echo esc_attr( $feature ); ?>" value="<?php echo esc_attr( $feature ); ?>" />
								<label for="filter-id-<?php echo esc_attr( $feature ); ?>"><?php echo esc_html( $feature_name ); ?></label>
							<?php endforeach; ?>
						</div>
					</fieldset>
				<?php endforeach; ?>
			</div>
		<# } #>
		<?php
	}
}

Directory Contents

Dirs: 0 × Files: 37

Name Size Perms Modified Actions
1.25 KB lrw-r--r-- 2022-05-18 19:24:14
Edit Download
639 B lrw-r--r-- 2022-05-18 19:24:14
Edit Download
2.96 KB lrw-r--r-- 2023-02-07 22:10:22
Edit Download
2.26 KB lrw-r--r-- 2020-06-17 01:07:14
Edit Download
3.13 KB lrw-r--r-- 2025-07-17 02:52:40
Edit Download
1.42 KB lrw-r--r-- 2023-09-08 13:32:24
Edit Download
5.16 KB lrw-r--r-- 2025-05-02 18:19:26
Edit Download
9.22 KB lrw-r--r-- 2025-03-06 04:27:22
Edit Download
588 B lrw-r--r-- 2017-07-27 04:41:44
Edit Download
7.84 KB lrw-r--r-- 2025-08-19 00:27:38
Edit Download
1.74 KB lrw-r--r-- 2023-07-11 03:00:22
Edit Download
1.18 KB lrw-r--r-- 2020-11-22 20:53:04
Edit Download
9.18 KB lrw-r--r-- 2025-08-19 00:27:38
Edit Download
1.10 KB lrw-r--r-- 2017-10-05 06:22:50
Edit Download
2.08 KB lrw-r--r-- 2023-02-07 22:10:22
Edit Download
7.97 KB lrw-r--r-- 2024-06-04 00:35:14
Edit Download
27.22 KB lrw-r--r-- 2025-09-30 20:28:32
Edit Download
2.25 KB lrw-r--r-- 2024-01-28 12:50:18
Edit Download
2.75 KB lrw-r--r-- 2023-02-23 16:06:20
Edit Download
1.10 KB lrw-r--r-- 2017-10-05 06:22:50
Edit Download
716 B lrw-r--r-- 2020-10-09 01:15:14
Edit Download
18.49 KB lrw-r--r-- 2022-01-19 01:29:06
Edit Download
3.23 KB lrw-r--r-- 2023-02-07 22:10:22
Edit Download
1.67 KB lrw-r--r-- 2020-02-26 18:30:08
Edit Download
1.65 KB lrw-r--r-- 2020-02-26 20:33:06
Edit Download
10.32 KB lrw-r--r-- 2022-09-12 19:47:14
Edit Download
13.52 KB lrw-r--r-- 2025-10-07 05:24:36
Edit Download
1.03 KB lrw-r--r-- 2017-12-01 04:11:00
Edit Download
5.04 KB lrw-r--r-- 2025-08-19 00:27:38
Edit Download
11.61 KB lrw-r--r-- 2023-09-14 05:25:16
Edit Download
3.31 KB lrw-r--r-- 2024-10-13 23:09:12
Edit Download
6.79 KB lrw-r--r-- 2025-03-18 17:15:22
Edit Download
1.17 KB lrw-r--r-- 2020-11-22 20:51:04
Edit Download
686 B lrw-r--r-- 2021-05-25 12:52:58
Edit Download
1.68 KB lrw-r--r-- 2023-02-07 22:10:22
Edit Download
2.58 KB lrw-r--r-- 2019-04-13 08:46:52
Edit Download
44.00 KB lrw-r--r-- 2026-02-28 03:18:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).