Skip to content
Permalink
Browse files

Added whatsapp (#10)

* Added Whatsapp

Added whatsapp in social

* Added whatsapp

Added whatsapp in social

* Added whatsapp

Added whatsapp in social

* Added whatsapp

Added whatsapp in social

* Added whatsapp

Added whatsapp in social
  • Loading branch information...
benedettogit authored and NorikDavtian committed May 29, 2017
1 parent be756b0 commit 46c437e44005c904df3b7dbb8506bde1c2d018cd
Showing with 40 additions and 6 deletions.
  1. +3 −1 content-profile.php
  2. +10 −0 inc/admin-customizer.php
  3. +16 −1 inc/admin-theme-options.php
  4. +6 −2 social-links.php
  5. +5 −2 style.css
@@ -19,13 +19,15 @@
<?php $instagram = get_post_meta(get_the_ID(), 'instagram', true); ?>
<?php $youtube = get_post_meta(get_the_ID(), 'youtube', true); ?>
<?php $pinterest = get_post_meta(get_the_ID(), 'pinterest', true); ?>
<?php $whatsapp = get_post_meta(get_the_ID(), 'whatsapp', true); ?>
<?php bigblank_print($title, '<h2 ' . schema('jobTitle', false, false) . '><em>(', ')</em></h2>'); ?>
<?php bigblank_print($facebook, '<a href="', '"><i class="fa fa-facebook-square"></i></a>'); ?>
<?php bigblank_print($twitter, '<a href="', '"><i class="fa fa-twitter-square"></i></a>'); ?>
<?php bigblank_print($google_plus, '<a href="', '"><i class="fa fa-google-plus-square"></i></a>'); ?>
<?php bigblank_print($instagram, '<a href="', '"><i class="fa fa-instagram"></i></a>'); ?>
<?php bigblank_print($youtube, '<a href="', '"><i class="fa fa-youtube-play"></i></a>'); ?>
<?php bigblank_print($pinterest, '<a href="', '"><i class="fa fa-pinterest"></i></a>'); ?>
<?php bigblank_print($whatsapp, '<a href="', '"><i class="fa fa-whatsapp"></i></a>'); ?>
<?php if (has_term('', 'department')) : ?>
<span class="entry-meta entry-categories department">
<?php echo get_the_term_list($post->ID, 'department', '', ', ', ''); ?>
@@ -36,4 +38,4 @@
<?php the_content(); ?>
<?php edit_post_link(__('Edit', 'bigblank')); ?>
</section>
</article>
</article>
@@ -114,6 +114,16 @@ function bigblank_customize_register($wp_customize) {
'section' => 'social',
'settings' => 'bigblank_theme_options[pinterest]',
));
// whatsapp
$wp_customize->add_setting('bigblank_theme_options[whatsapp]', array(
'type' => 'option',
'default' => $defaults['whatsapp'],
));
$wp_customize->add_control('bigblank_theme_options[whatsapp]', array(
'label' => __('Whatsapp', 'bigblank'),
'section' => 'social',
'settings' => 'bigblank_theme_options[whatsapp]',
));
// Default Layout
$wp_customize->add_section('bigblank_layout', array(
@@ -33,6 +33,7 @@ function bigblank_theme_options_init() {
add_settings_field('social-instagram', __('Instagram', 'bigblank'), 'bigblank_settings_field_instagram', 'theme_options', 'social', array('label_for' => 'social-instagram'));
add_settings_field('social-youtube', __('Youtube', 'bigblank'), 'bigblank_settings_field_youtube', 'theme_options', 'social', array('label_for' => 'social-youtube'));
add_settings_field('social-pinterest', __('Pinterest', 'bigblank'), 'bigblank_settings_field_pinterest', 'theme_options', 'social', array('label_for' => 'social-pinterest'));
add_settings_field('social-whatsapp', __('Whatsapp', 'bigblank'), 'bigblank_settings_field_pinterest', 'theme_options', 'social', array('label_for' => 'social-whatsapp'));
add_settings_field('layout', __('Default Layout', 'bigblank'), 'bigblank_settings_field_layout', 'theme_options', 'general');
add_settings_field('comments', __('Comment Settings', 'bigblank'), 'bigblank_settings_field_comments', 'theme_options', 'general');
add_settings_field('footer-copyright', __('Footer Copyright', 'bigblank'), 'bigblank_settings_field_footer_copyright', 'theme_options', 'footer', array('label_for' => 'footer-copyright'));
@@ -133,6 +134,7 @@ function bigblank_get_default_theme_options() {
'instagram' => '',
'youtube' => '',
'pinterest' => '',
'whatsapp' => '',
'theme_layout' => 'content-sidebar',
'page_comments' => 'on',
'post_comments' => 'on',
@@ -221,7 +223,7 @@ function bigblank_settings_field_youtube() {
}
/**
* render the youtube settings
* render the pinterest settings
*/
function bigblank_settings_field_pinterest() {
$options = bigblank_get_theme_options();
@@ -230,6 +232,16 @@ function bigblank_settings_field_pinterest() {
<?php
}
/**
* render the whatsapp settings
*/
function bigblank_settings_field_whatsapp() {
$options = bigblank_get_theme_options();
?>
<input type="text" class="large-text" id="social-whatsapp" name="bigblank_theme_options[whatsapp]" value="<?php echo esc_attr($options['whatsapp']); ?>" />
<?php
}
/**
* render the default layout setting field
*/
@@ -368,6 +380,9 @@ function bigblank_theme_options_validate($input) {
}
if (isset($input['pinterest'])) {
$output['pinterest'] = $input['pinterest'];
}
if (isset($input['whatsapp'])) {
$output['whatsapp'] = $input['whatsapp'];
}
if (isset($input['theme_layout']) && array_key_exists($input['theme_layout'], bigblank_layouts())) {
$output['theme_layout'] = $input['theme_layout'];
@@ -12,8 +12,9 @@
$instagram = $options['instagram'];
$youtube = $options['youtube'];
$pinterest = $options['pinterest'];
$whatsapp = $options['whatsapp'];
?>
<?php if ($facebook || $twitter || $googleplus || $instagram || $youtube || $pinterest) : ?>
<?php if ($facebook || $twitter || $googleplus || $instagram || $youtube || $pinterest|| $whatsapp) : ?>
<div class="social-media">
<?php if ($facebook) : ?>
<a href="<?php echo $facebook; ?>" class="fa fa-facebook"></a>
@@ -33,5 +34,8 @@
<?php if ($pinterest) : ?>
<a href="<?php echo $pinterest; ?>" class="fa fa-pinterest"></a>
<?php endif; ?>
<?php if ($whatsapp) : ?>
<a href="<?php echo $whatsapp; ?>" class="fa fa-whatsapp"></a>
<?php endif; ?>
</div><!-- .social-media -->
<?php endif; ?>
<?php endif; ?>
Oops, something went wrong.

0 comments on commit 46c437e

Please sign in to comment.
You can’t perform that action at this time.