forked from understrap/understrap
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
55 lines (47 loc) · 2.49 KB
/
functions.php
File metadata and controls
55 lines (47 loc) · 2.49 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
53
54
55
<?php
/**
* Tinybit functions and definitions
*
* @package tinybit
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
$tinybit_includes = array(
'/theme-settings.php', // Initialize theme default settings.
'/setup.php', // Theme setup and custom theme supports.
'/enqueue.php', // Enqueue scripts and styles.
'/template-tags.php', // Custom template tags for this theme.
'/pagination.php', // Custom pagination for this theme.
'/hooks.php', // Custom hooks.
'/extras.php', // Custom functions that act independently of the theme templates.
'/customizer.php', // Customizer additions.
'/custom-comments.php', // Custom Comments file.
'/jetpack.php', // Load Jetpack compatibility file.
'/class-wp-bootstrap-navwalker.php', // Load custom WordPress nav walker.
'/woocommerce.php', // Load WooCommerce functions.
'/editor.php', // Load Editor functions.
);
foreach ( $tinybit_includes as $file ) {
$filepath = locate_template( 'inc' . $file );
if ( ! $filepath ) {
trigger_error( sprintf( 'Error locating /inc%s for inclusion', $file ), E_USER_ERROR );
}
require_once $filepath;
}
function show_social_media() { ?>
<?php if ( get_theme_mod( 'tinybit_author_options_facebook_url' ) ): ?>
<li><a href="<?php echo esc_attr(get_theme_mod( 'tinybit_author_options_facebook_url' )); ?>"><i class="fa fa-facebook"></i></a></li>
<?php endif; ?>
<?php if ( get_theme_mod( 'tinybit_author_options_twitter_url' ) ): ?>
<li><a href="<?php echo esc_attr(get_theme_mod( 'tinybit_author_options_twitter_url' )); ?>"><i class="fa fa-twitter"></i></a></li>
<?php endif; ?>
<?php if ( get_theme_mod( 'tinybit_author_options_github_url' ) ): ?>
<li><a href="<?php echo esc_attr(get_theme_mod( 'tinybit_author_options_github_url' )); ?>"><i class="fa fa-github"></i></a></li>
<?php endif; ?>
<?php if ( get_theme_mod( 'tinybit_author_options_gitlab_url' ) ): ?>
<li><a href="<?php echo esc_attr(get_theme_mod( 'tinybit_author_options_gitlab_url' )); ?>"><i class="fa fa-gitlab"></i></a></li>
<?php endif; ?>
<?php if ( get_theme_mod( 'tinybit_author_options_linkedin_url' ) ): ?>
<li><a href="<?php echo esc_attr(get_theme_mod( 'tinybit_author_options_linkedin_url' )); ?>"><i class="fa fa-linkedin"></i></a></li>
<?php endif;
}?>