=' ) ) { $wp_customize->add_panel( 'background', array( 'priority' => 105, 'title' => __( 'Customize Background', 'aladdin' ), 'description' => __( 'Background.', 'aladdin' ), ) ); $wp_customize->add_panel( 'navigation', array( 'priority' => 106, 'title' => __( 'Menu', 'aladdin' ), 'description' => __( 'Navigation settings.', 'aladdin' ), ) ); //Sets postMessage support $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_section( 'colors' )->panel = 'custom_colors'; $wp_customize->get_section( 'colors' )->priority = '1'; $wp_customize->get_section( 'nav' )->panel = 'navigation'; $wp_customize->get_section( 'nav' )->priority = '1'; $wp_customize->get_section( 'background_image' )->priority = '90'; } } add_action( 'customize_register', 'aladdin_customize_register' ); /** * Add custom styles to the header. * * @since Aladdin 1.0.0 */ function aladdin_hook_css() { $defaults = aladdin_get_defaults(); $position = aladdin_column_dir(); $top = get_theme_mod('top', $defaults['top']); ?> array( 'href' => array(), 'title' => array() ), 'ul' => array(), 'li' => array(), 'br' => array(), 'em' => array(), 'strong' => array(), )); } /** * Sanitize hex color. * * @param string $value Value to sanitize. * @return sanitized value. * @since Aladdin 1.0.0 */ function aladdin_sanitize_content_width( $value ) { $value = absint($value); $value = ($value > 1349 ? 1349 : ($value < 500 ? 500 : $value)); return $value; } /** * Sanitize scroll button. * * @param string $value Value to sanitize. * @return sanitized value. * @since Aladdin 1.0.0 */ function aladdin_sanitize_scroll_button( $value ) { $possible_values = array( 'none', 'right', 'left', 'center'); return ( in_array( $value, $possible_values ) ? $value : 'right' ); } /** * Sanitize scroll css3 effect. * * @param string $value Value to sanitize. * @return sanitized value. * @since Aladdin 1.0.0 */ function aladdin_sanitize_scroll_effect( $value ) { $possible_values = array( 'none', 'move'); return ( in_array( $value, $possible_values ) ? $value : 'move' ); } /** * Sanitize opacity. * * @param string $value Value to sanitize. * @return sanitized value. * @since Aladdin 1.0.0 */ function aladdin_sanitize_opacity( $value ) { $possible_values = array ( '0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'); return ( in_array( $value, $possible_values ) ? $value : '0.3' ); } /** * Return string Sanitized backgroind position * * @since Aladdin 1.0.0 */ function aladdin_sanitize_background_position( $value ) { $possible_values = array( 'top', 'center', 'bottom'); return ( in_array( $value, $possible_values ) ? $value : 'top' ); }