WP_Customize_Image_Control deprecated?
-
Hello all!
I followed the tutorial of Brad Traversy, which I recommend to everybody. Everything was clear until the last step: The customiser of the Image (showcase) of the front-page. Is the
WP_Customize_Image_Control
deprecated? Do you see any problem in the code of/inc/customizer.php
:$wp_customize->add_setting('showcase_image', array( 'default' => get_bloginfo('template_directory').'/img/showcase.jpg', 'type' => 'theme_mod' )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'showcase_image', array( 'label' => __('Showcase Image', 'wpbootstrap'), 'section' => 'showcase', 'settings' => 'showcase_image', 'priority' => 1 )));
And in the
front-page.php
itself is:<style> .showcase{ background: url(<?php echo get_theme_mod('showcase_image', get_blog_info('template_url').'/img/showcase.jpg'); ?>) no-repeat top center; } </style>
I would be very grateful for any hint. Would like to finish this tutorial without any mistakes ??
Best greetings to all
marek
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘WP_Customize_Image_Control deprecated?’ is closed to new replies.