HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vm8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: afleverb (1000)
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: //var/www/wintergenomics_site/wp-content/themes/radcliffe/inc/classes/class-radcliffe-customize.php
<?php

/* ---------------------------------------------------------------------------------------------
   CUSTOMIZER SETTINGS
   --------------------------------------------------------------------------------------------- */

if ( ! class_exists( 'Radcliffe_Customize' ) ) : 
	class Radcliffe_Customize {

		public static function register( $wp_customize ) {

			/* 	-----------------------------------------------------------------------------------
				Custom Logo Setting
			------------------------------------------------------------------------------------ */

			// Only display the Customizer section for the radcliffe_logo setting if it already has a value.
			// This means that site owners with existing logos can remove them, but new site owners can't add them.
			// Since v2, the core custom_logo setting (in the Site Identity Customizer panel) should be used instead.
			if ( get_theme_mod( 'radcliffe_logo' ) ) {

				$wp_customize->add_section( 'radcliffe_logo_section' , array(
					'title'       		=> __( 'Logo', 'radcliffe' ),
					'priority'    		=> 40,
					'description' 		=> __( 'Upload a logo to replace the default site name and description in the header','radcliffe' ),
				) );

				$wp_customize->add_setting( 'radcliffe_logo', array( 
					'sanitize_callback' => 'esc_url_raw'
				) );

				$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'radcliffe_logo', array(
					'label'    			=> __( 'Logo', 'radcliffe' ),
					'section'  			=> 'radcliffe_logo_section',
					'settings' 			=> 'radcliffe_logo',
				) ) );

			}

			/*	-----------------------------------------------------------------------------------
				Accent Color Setting
			------------------------------------------------------------------------------------ */

			$wp_customize->add_setting( 'accent_color', array(
				'default' 			=> '#ca2017', 
				'type' 				=> 'theme_mod', 
				'capability' 		=> 'edit_theme_options', 
				'sanitize_callback' => 'sanitize_hex_color'
			) );	
			
			$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'radcliffe_accent_color', array(
				'label' 			=> __( 'Accent Color', 'radcliffe' ),
				'section' 			=> 'colors',
				'settings' 			=> 'accent_color',
				'priority' 			=> 10,
			) ) );

		}

		// Function handling our header output of styles
		public static function header_output() {

			$default_color = '#ca2017';
			$accent = get_theme_mod( 'accent_color', $default_color );

			if ( $accent == $default_color || ! $accent ) return;

			// An array storing all of the elements with custom accent color, sorted by the CSS property to modify.
			$properties = apply_filters( 'radcliffe_accent_color_elements', array(
				'background-color' 		=> array(  'fieldset legend', ':root .has-accent-background-color', '.author-links a:hover', '.by-post-author', '.archive-nav a:hover', '.tagcloud a:hover', '.nav-toggle.active', '.mobile-menu a:hover', 'button:hover', '.button:hover', '.faux-button:hover', '.wp-block-button__link:hover', ':root .wp-block-file__button:hover', 'input[type="button"]:hover', 'input[type="reset"]:hover', 'input[type="submit"]:hover', '.main-menu li:hover > a', '.main-menu a:not(.search-toggle):focus', '.main-menu .focus > a', '.bypostauthor .by-post-author' ),
				'border-right-color'	=> array( '.tagcloud a:hover:before' ),
				'color' 				=> array( 'a', '.blog-title a:hover', 'a.post-header:hover .post-title', '.single .post-meta-top a:hover', ':root .has-accent-color', '.post-meta a:hover', '.post-author-inner h3 a:hover', '.comment-actions a', '.comment-actions a:hover', '.comment-header cite a:hover', '.comment-header span a:hover', '.comment-actions a:hover', '.comment-nav-below a:hover', '.archive-container a:hover', '#wp-calendar tfoot a:hover', '.credits a:hover', '.comments-nav-below a:hover' ),
			) );

			$css = '<!-- Customizer CSS --><style type="text/css">';
			foreach ( $properties as $property => $selectors ) {
				foreach ( $selectors as $selector ) {
					$css .= sprintf( '%s { %s: %s; }', $selector, $property, $accent );
				}
			}
			$css .= '</style><!-- /Customizer CSS -->';

			echo $css;

		}

	}

	// Setup the Theme Customizer settings and controls...
	add_action( 'customize_register', array( 'Radcliffe_Customize', 'register' ) );

	// Output custom CSS to live site
	add_action( 'wp_head', array( 'Radcliffe_Customize', 'header_output' ) );

endif;