-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-orbis_person.php
executable file
·140 lines (102 loc) · 4.59 KB
/
single-orbis_person.php
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="row">
<div class="col-md-8">
<div class="panel with-cols clearfix">
<header>
<h3><?php _e( 'About this person', 'orbis' ); ?></h3>
</header>
<div class="row">
<div class="col-md-7">
<div class="content">
<?php if ( has_post_thumbnail() ) : ?>
<div class="thumbnail">
<?php the_post_thumbnail( 'thumbnail' ); ?>
</div>
<?php endif; ?>
<?php the_content(); ?>
</div>
</div>
<div class="col-md-5">
<div class="content">
<dl>
<?php if ( get_post_meta( $post->ID, '_orbis_person_phone_number', true ) ) : ?>
<dt><?php _e( 'Phone number', 'orbis' ); ?></dt>
<dd><a href="tel:<?php echo get_post_meta( $post->ID, '_orbis_person_phone_number', true ); ?>" class="anchor-tooltip" title="<?php _e( 'Call this number', 'orbis' ); ?>"><?php echo get_post_meta( $post->ID, '_orbis_person_phone_number', true ); ?></a></dd>
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_mobile_number', true ) ) : ?>
<dt><?php _e( 'Mobile number', 'orbis' ); ?></dt>
<dd><a href="tel:<?php echo get_post_meta( $post->ID, '_orbis_person_mobile_number', true ); ?>" class="anchor-tooltip" title="<?php _e( 'Call this number', 'orbis' ); ?>"><?php echo get_post_meta( $post->ID, '_orbis_person_mobile_number', true ); ?></a></dd>
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_email_address', true ) ) : ?>
<dt><?php _e( 'E-mail address', 'orbis' ); ?></dt>
<dd>
<?php $email = get_post_meta( $post->ID, '_orbis_person_email_address', true ); ?>
<a href="mailto:<?php echo esc_attr( $email ); ?>"><?php echo esc_html( $email ); ?></a>
</dd>
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_twitter', true ) || get_post_meta( $post->ID, '_orbis_person_facebook', true ) || get_post_meta( $post->ID, '_orbis_person_linkedin', true ) ) : ?>
<dt><?php _e( 'Social media', 'orbis' ); ?></dt>
<dd>
<ul class="social clearfix">
<?php if ( get_post_meta( $post->ID, '_orbis_person_twitter', true ) ) : ?>
<li class="twitter">
<?php $twitter_url = 'https://twitter.com/' . get_post_meta( $post->ID, '_orbis_person_twitter', true ); ?>
<a href="<?php echo esc_attr( $twitter_url ); ?>">
<i class="fa fa-twitter"></i>
<span class="sr-only"><?php esc_html_e( 'Twitter', 'orbis' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_facebook', true ) ) : ?>
<li class="facebook">
<?php $facebook_url = get_post_meta( $post->ID, '_orbis_person_facebook', true ); ?>
<a href="<?php echo esc_attr( $facebook_url ); ?>">
<i class="fa fa-facebook"></i>
<span class="sr-only"><?php esc_html_e( 'Facebook', 'orbis' ); ?></span>
</a>
</li>
<?php endif; ?>
<?php if ( get_post_meta( $post->ID, '_orbis_person_linkedin', true ) ) : ?>
<li class="linkedin">
<?php $linkedin_url = get_post_meta( $post->ID, '_orbis_person_linkedin', true ); ?>
<a href="<?php echo esc_attr( $linkedin_url ); ?>">
<i class="fa fa-linkedin"></i>
<span class="sr-only"><?php esc_html_e( 'LinkedIn', 'orbis' ); ?></span>
</a>
</li>
<?php endif; ?>
</ul>
</dd>
<?php endif; ?>
</dl>
</div>
</div>
</div>
</div>
<?php comments_template( '', true ); ?>
</div>
<div class="col-md-4">
<?php get_template_part( 'templates/person_twitter' ); ?>
<?php if ( function_exists( 'p2p_register_connection_type' ) ) : ?>
<?php get_template_part( 'templates/person_companies' ); ?>
<?php endif; ?>
<div class="panel">
<header>
<h3><?php _e( 'Additional information', 'orbis' ); ?></h3>
</header>
<div class="content">
<dl>
<dt><?php _e( 'Posted on', 'orbis' ); ?></dt>
<dd><?php echo esc_html( get_the_date() ); ?></dd>
<dt><?php _e( 'Posted by', 'orbis' ); ?></dt>
<dd><?php echo esc_html( get_the_author() ); ?></dd>
<dt><?php _e( 'Actions', 'orbis' ); ?></dt>
<dd><?php edit_post_link( __( 'Edit', 'orbis' ) ); ?></dd>
</dl>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>