<?php
/**
 * Setup Child Theme Styles
 */
function fotografenschmiede_vorlage_four_enqueue_styles() {
	wp_enqueue_style( 'fotografenschmiede_vorlage_four-style', get_stylesheet_directory_uri() . '/style.css', false, '1.0' );
}
// add_action( 'wp_enqueue_scripts', 'fotografenschmiede_vorlage_four_enqueue_styles', 20 );


/**
 * Setup Child Theme Palettes
 *
 * @param string $palettes registered palette json.
 * @return string
 */
function fotografenschmiede_vorlage_four_change_palette_defaults( $palettes ) {
	$palettes = '{"palette":[{"color":"#3b2f2a","slug":"palette1","name":"Palette Color 1"},{"color":"#b5a99a","slug":"palette2","name":"Palette Color 2"},{"color":"#e2cbb4","slug":"palette3","name":"Palette Color 3"},{"color":"#000000","slug":"palette4","name":"Palette Color 4"},{"color":"#f2ece7","slug":"palette5","name":"Palette Color 5"},{"color":"#cfc5bc","slug":"palette6","name":"Palette Color 6"},{"color":"#c8afa9","slug":"palette7","name":"Palette Color 7"},{"color":"#3b2f2a","slug":"palette8","name":"Palette Color 8"},{"color":"#f9f7f5","slug":"palette9","name":"Palette Color 9"},{"color":"#FfFfFf","slug":"palette10","name":"Palette Color Complement"},{"color":"#13612e","slug":"palette11","name":"Palette Color Success"},{"color":"#1159af","slug":"palette12","name":"Palette Color Info"},{"color":"#b82105","slug":"palette13","name":"Palette Color Alert"},{"color":"#f7630c","slug":"palette14","name":"Palette Color Warning"},{"color":"#f5a524","slug":"palette15","name":"Palette Color Rating"}],"second-palette":[{"color":"#2B6CB0","slug":"palette1","name":"Palette Color 1"},{"color":"#215387","slug":"palette2","name":"Palette Color 2"},{"color":"#1A202C","slug":"palette3","name":"Palette Color 3"},{"color":"#2D3748","slug":"palette4","name":"Palette Color 4"},{"color":"#4A5568","slug":"palette5","name":"Palette Color 5"},{"color":"#718096","slug":"palette6","name":"Palette Color 6"},{"color":"#EDF2F7","slug":"palette7","name":"Palette Color 7"},{"color":"#F7FAFC","slug":"palette8","name":"Palette Color 8"},{"color":"#ffffff","slug":"palette9","name":"Palette Color 9"},{"color":"#FfFfFf","slug":"palette10","name":"Palette Color Complement"},{"color":"#13612e","slug":"palette11","name":"Palette Color Success"},{"color":"#1159af","slug":"palette12","name":"Palette Color Info"},{"color":"#b82105","slug":"palette13","name":"Palette Color Alert"},{"color":"#f7630c","slug":"palette14","name":"Palette Color Warning"},{"color":"#f5a524","slug":"palette15","name":"Palette Color Rating"}],"third-palette":[{"color":"#2B6CB0","slug":"palette1","name":"Palette Color 1"},{"color":"#215387","slug":"palette2","name":"Palette Color 2"},{"color":"#1A202C","slug":"palette3","name":"Palette Color 3"},{"color":"#2D3748","slug":"palette4","name":"Palette Color 4"},{"color":"#4A5568","slug":"palette5","name":"Palette Color 5"},{"color":"#718096","slug":"palette6","name":"Palette Color 6"},{"color":"#EDF2F7","slug":"palette7","name":"Palette Color 7"},{"color":"#F7FAFC","slug":"palette8","name":"Palette Color 8"},{"color":"#ffffff","slug":"palette9","name":"Palette Color 9"},{"color":"#FfFfFf","slug":"palette10","name":"Palette Color Complement"},{"color":"#13612e","slug":"palette11","name":"Palette Color Success"},{"color":"#1159af","slug":"palette12","name":"Palette Color Info"},{"color":"#b82105","slug":"palette13","name":"Palette Color Alert"},{"color":"#f7630c","slug":"palette14","name":"Palette Color Warning"},{"color":"#f5a524","slug":"palette15","name":"Palette Color Rating"}],"active":"palette"}';
	return $palettes;
}
add_filter( 'kadence_global_palette_defaults', 'fotografenschmiede_vorlage_four_change_palette_defaults', 20 );

/**
 * Setup Child Theme Defaults
 *
 * @param array $defaults registered option defaults with kadence theme.
 * @return array
 */
function fotografenschmiede_vorlage_four_change_option_defaults( $defaults ) {
	$new_defaults = '{"initial_version":"1.2.26","base_font":{"size":{"desktop":1},"lineHeight":{"desktop":1.6},"family":"Karla","google":true,"weight":"normal","variant":"regular","color":"palette4","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"sans-serif","flag":true},"heading_font":{"family":"Playfair Display","google":true,"fallback":"serif","variant":["regular","500","600","700","800","900","italic","500italic","600italic","700italic","800italic","900italic"],"flag":true},"h4_font":{"size":{"desktop":1},"lineHeight":{"desktop":1.5},"family":"Parisienne","google":true,"weight":"normal","variant":"regular","color":"palette4","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"handwriting","flag":false},"buttons_color":{"color":"#f2ece7","hover":"#3b2f2a"},"buttons_border_colors":{"color":"#3b2f2a","hover":"#f2ece7"},"buttons_border_radius":{"size":{"mobile":"","tablet":"","desktop":4},"unit":{"mobile":"px","tablet":"px","desktop":"px"},"flag":false},"buttons_typography":{"size":{"desktop":""},"lineHeight":{"desktop":""},"family":"var(--global-body-font-family, inherit)","google":false,"weight":"700","variant":"700","sizeType":"px","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":false},"buttons_background":{"color":"palette1","hover":"#f2ece7"},"page_layout":"normal","page_title":false,"page_content_style":"unboxed","page_vertical_padding":"hide","blocks_header":true,"blocks_header_id":"204","content_width":{"size":90,"unit":"rem"},"content_edge_spacing":{"size":{"mobile":"","tablet":1.2,"desktop":6},"unit":{"mobile":"rem","tablet":"rem","desktop":"rem"},"flag":false},"content_narrow_width":{"size":75,"unit":"rem"},"lightbox":true,"load_fonts_local":true,"enable_preload":true,"disable_sitemap":true,"post_title":false,"post_content_style":"unboxed","post_vertical_padding":"hide","load_base_italic":true,"h1_font":{"size":{"desktop":2.5},"lineHeight":{"desktop":1.5},"family":"inherit","google":false,"weight":"700","variant":"700","color":"palette3","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":true},"h2_font":{"size":{"desktop":2},"lineHeight":{"desktop":1.5},"family":"inherit","google":false,"weight":"700","variant":"700","color":"palette3","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":false},"h3_font":{"size":{"desktop":1.5},"lineHeight":{"desktop":1.5},"family":"inherit","google":false,"weight":"700","variant":"700","color":"palette3","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":true},"h5_font":{"size":{"desktop":0.8},"lineHeight":{"desktop":1.5},"family":"inherit","google":false,"weight":"700","variant":"700","color":"palette4","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":true},"h6_font":{"size":{"desktop":0.8},"lineHeight":{"desktop":1.5},"family":"inherit","google":false,"weight":"700","variant":"700","color":"palette5","sizeType":"rem","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":true},"title_above_font":{"size":{"desktop":""},"lineHeight":{"desktop":""},"family":"inherit","google":false,"weight":"","variant":"","color":"","sizeType":"px","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":false},"title_above_breadcrumb_font":{"size":{"desktop":""},"lineHeight":{"desktop":""},"family":"inherit","google":false,"weight":"","variant":"","color":"","sizeType":"px","lineType":"-","letterSpacing":{"desktop":""},"spacingType":"em","style":"normal","transform":"","fallback":"","flag":false},"font_rendering":true}';
	$new_defaults = json_decode( $new_defaults, true );
	return wp_parse_args( $new_defaults, $defaults );
}
add_filter( 'kadence_theme_options_defaults', 'fotografenschmiede_vorlage_four_change_option_defaults', 20 );
/**
 * Setup Child Theme Starter
 *
 * @param array $data registered custom templates.
 * @return array
 */
function fotografenschmiede_vorlage_four_child_add_starter_templates( $data ) {
	$data['fotografenschmiede_four'] = array(
		'slug'                => 'fotografenschmiede_four',
		'name'                => 'Fotografenschmiede Four',
		'local_content'       => get_stylesheet_directory() . '/starter/content.xml',
		'local_widget_data'   => get_stylesheet_directory() . '/starter/widget_data.json',
		'local_theme_options' => get_stylesheet_directory() . '/starter/theme_options.json',
		'url'                 => 'https://four.fotografenschmiede-website.de/',
		'image'               => get_stylesheet_directory_uri() . '/starter/preview.jpg',
		'ecommerce'           => false,
		'homepage'            => 'Startseite (Duplikat)',
		'blogpage'            => '',
		'type'                => 'blocks',
		'plugins'             => array(
			'blocks-animation/blocks-animation.php','duplicate-post/duplicate-post.php','ewww-image-optimizer/ewww-image-optimizer.php','insert-headers-and-footers/ihaf.php','instagram-feed/instagram-feed.php','kadence-blocks/kadence-blocks.php','real-media-library-lite/index.php','suremails/suremails.php','use-any-font/use-any-font.php','wordpress-seo/wp-seo.php','wp-fastest-cache/wpFastestCache.php','wp-whatsapp/whatsapp.php',
		),
		'menus'       => array(
			
		),
	);
	return $data;
}
add_filter( 'kadence_starter_templates_custom_array', 'fotografenschmiede_vorlage_four_child_add_starter_templates', 20 );

add_filter( 'kadence_custom_child_starter_templates_enable', '__return_true' );

/**
 * Setup Child Theme Starter Brand
 *
 * @param string $name the brand name.
 * @return string
 */
function fotografenschmiede_vorlage_four_child_add_starter_templates_name( $name ) {
	return 'Fotografenschmiede';
}
add_filter( 'kadence_custom_child_starter_templates_name', 'fotografenschmiede_vorlage_four_child_add_starter_templates_name', 20 );

/**
 * Setup Child Theme Starter Logo
 *
 * @param string $url the file url.
 * @return string
 */
function fotografenschmiede_vorlage_four_child_add_starter_templates_logo( $url ) {
	return get_stylesheet_directory_uri() . '/starter/logo.png';
}
add_filter( 'kadence_custom_child_starter_templates_logo', 'fotografenschmiede_vorlage_four_child_add_starter_templates_logo', 20 );

/**
 * Setup Child Theme Cloud Library
 *
 * @param array $libraries the cloud libraries.
 * @return array
 */
function fotografenschmiede_vorlage_four_child_add_cloud_library( $libraries ) {
	$libraries[] = array(
		'slug' => 'fotografenschmiede_vorlage_four_child_library',
		'title' => 'Fotografenschmiede Design Cloud',
		'key' => 'gZK434oVNnqg',
		'url' => 'https://design.fotografenschmiede.de',
	);
	return $libraries;
}
add_filter( 'kadence_blocks_custom_prebuilt_libraries', 'fotografenschmiede_vorlage_four_child_add_cloud_library', 20 );
