HEX
Server: LiteSpeed
System: Linux altar40.supremepanel40.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: sescorpcl (4477)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: /home/sescorpcl/public_html/wp-content/themes/sydney/inc/customizer/options/cpt-panels.php
<?php
/**
 * Register panels and sections for all public CPTs
 *
 * @package Sydney
 */

//Get post types (capability-filtered: viewable + has_archive, dedicated panels excluded)
$post_types = sydney_get_customizer_post_types();

//Register panels and sections
foreach ( $post_types as $current_post_type ) {

	//Panel
	$wp_customize->add_panel(
		'sydney_panel_cpt_' . $current_post_type->name,
		array(
			'title'     => $current_post_type->label,
			'priority'  => 50,
		)
	);

	//Singles section
	$wp_customize->add_section(
		'sydney_cpt_' . $current_post_type->name,
		array(
			'title'     => __( 'Singles', 'sydney' ),
			'panel'     => 'sydney_panel_cpt_' . $current_post_type->name,
		)
	);

	//Archives section
	$wp_customize->add_section(
		'sydney_cpt_' . $current_post_type->name . '_archives',
		array(
			'title'     => __( 'Archives', 'sydney' ),
			'panel'     => 'sydney_panel_cpt_' . $current_post_type->name,
		)
	);
}