47 lines
860 B
PHP
47 lines
860 B
PHP
<?php
|
|
|
|
/**
|
|
* Helper | Theme Functions
|
|
*
|
|
* @package Dotspice
|
|
* @version 1.3.0
|
|
*/
|
|
|
|
|
|
/**
|
|
* Logo
|
|
*/
|
|
function dotspice_logo($option_name = 'header_logo')
|
|
{
|
|
if ($logo = dotspice_get_theme_option($option_name)) {
|
|
echo sprintf(
|
|
'<a href="%1$s" class="navbar-brand" rel="home"><img class="navbar-brand__image" src="%2$s" alt="%3$s" width="%4$s" height="%5$s" /></a>',
|
|
esc_url(home_url('/')),
|
|
esc_url($logo['url']),
|
|
get_bloginfo('name', 'display'),
|
|
esc_attr($logo['width']),
|
|
esc_attr($logo['height'])
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Dynamic Sidebar
|
|
*/
|
|
function dotspice_dynamic_sidebar($sidebar_name, $html_before = '', $html_after = '')
|
|
{
|
|
if (dotspice_is_active_sidebar($sidebar_name)) {
|
|
|
|
if ($html_before) {
|
|
echo wp_kses_post($html_before);
|
|
}
|
|
|
|
dynamic_sidebar($sidebar_name);
|
|
|
|
if ($html_after) {
|
|
echo wp_kses_post($html_after);
|
|
}
|
|
}
|
|
}
|