- November 27, 2016 at 12:39 am #19122PascalNovember 27, 2016 at 12:39 amsupport SVG on header
Here the change what I made to support SVG on Header.
$settings_options = array( 'name' => __('Site Title', 'icefit'), 'desc' => __('Choose "display title" if you want to use a text-based title instead of an uploaded logo.', 'icefit'), 'id' => 'header_title', 'type' => 'radio', 'default' => 'Display Title', 'values' => array( array('value' => 'Use Logo', 'display' => __('Use Logo', 'icefit')), array('value' => 'Display Title', 'display' => __('Display Title', 'icefit')), array('value' => 'Use SVG', 'display' => __('Use SVG', 'icefit')) ), );
in the header.php
if ($icefit_options['header_title'] == 'Display Title' || $logo_url == "" || "null.png" == substr($logo_url, -8) ): ?> <h1 class="site-title"><?php echo bloginfo('name'); ?></h1> <?php elseif ($icefit_options['header_title'] == 'Use SVG'): ?> <img style="height:80px; width: auto" src="<?php echo esc_url($logo_url); ?>#svgView(preserveAspectRatio(none))" /> <?php else: ?><img src="<?php echo esc_url($logo_url); ?>" alt="<?php echo bloginfo('name'); ?>"><?php endif;
changing the Language files: blackoot-pro.pot and en_US.po
November 27, 2016 at 12:42 am #19124PascalNovember 27, 2016 at 12:42 amReply to: support SVG on header
- This topic was modified 1 year, 2 months ago by Pascal.
… and maybe add some fields for height and width. Will work on that later.November 28, 2016 at 9:12 am #19138iceableNovember 28, 2016 at 9:12 amReply to: support SVG on header
iceableKeymasterSupportHappy with my help?
Buy me a beer!
Hi, this looks pretty good!
We’ll review it with some tests to make sure it covers various use cases and will definitely consider adding this option (along with width/height fields as mentioned) in a future update.
Thank you very much for sharing your code!
The topic ‘support SVG on header’ is closed to new replies.