-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
52 lines (47 loc) · 1.4 KB
/
Copy pathsidebar.php
File metadata and controls
52 lines (47 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/**
* Theme sidebar.
*
* @package FireblogClassic
*/
$author_name = fireblog_classic_get_setting( 'fireblog_author_name' );
$author_url = fireblog_classic_get_setting( 'fireblog_author_url' );
$sponsor_title = fireblog_classic_get_setting( 'fireblog_sponsor_title' );
$sponsor_text = fireblog_classic_get_setting( 'fireblog_sponsor_text' );
if ( '' === $author_name || get_bloginfo( 'name' ) === $author_name ) {
$author_name = 'happy xiao';
}
if ( '' === $author_url ) {
$author_url = 'https://aa.ee';
}
?>
<aside class="site-sidebar" aria-label="<?php esc_attr_e( 'Site navigation', 'fireblog-classic' ); ?>">
<p>
<?php esc_html_e( 'By', 'fireblog-classic' ); ?>
<strong><a href="<?php echo esc_url( $author_url ); ?>"><?php echo esc_html( $author_name ); ?></a></strong>
</p>
<?php
if ( has_nav_menu( 'sidebar' ) ) {
wp_nav_menu(
array(
'theme_location' => 'sidebar',
'container' => false,
'depth' => 1,
'fallback_cb' => false,
)
);
} else {
fireblog_classic_default_sidebar_menu();
}
?>
<?php if ( $sponsor_title || $sponsor_text ) : ?>
<div class="sidebar-sponsor">
<?php if ( $sponsor_title ) : ?>
<span class="sidebar-sponsor-title"><?php echo esc_html( $sponsor_title ); ?></span>
<?php endif; ?>
<?php if ( $sponsor_text ) : ?>
<p><?php echo esc_html( $sponsor_text ); ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
</aside>