Fix conflit

This commit is contained in:
Fabiano Alencar 2018-08-13 13:57:12 -03:00
commit f0ee2e1f07
4 changed files with 13 additions and 6 deletions

View File

@ -128,7 +128,7 @@ function tainacan_customize_register( $wp_customize ) {
) );
$wp_customize->add_control( 'twitter_user', array(
'label' => __( 'Twitter User', 'tainacan-theme' ),
'label' => __( 'Twitter User to be cited in tweets (via @user)', 'tainacan-theme' ),
'section' => 'social_share',
) );

View File

@ -85,6 +85,7 @@ function social_meta() {
if(is_single() || is_tax() || is_archive()) {
<<<<<<< HEAD
$logo = get_stylesheet_directory_uri().'/assets/images/social-logo.png';
global $wp;
if(is_archive('tainacan-collection')){
@ -104,6 +105,11 @@ function social_meta() {
$excerpt = get_bloginfo('description');
}
}
=======
$logo = get_template_directory_uri().'/assets/images/logo.svg';
$img_info = (has_post_thumbnail($post->ID)) ? wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "thumbnail") : $logo;
>>>>>>> 3232a6522e85af07571c5b6c99d90963429321ca
$image = array(
'url' => (!empty($img_info[0]) && $img_info[1] >= 200 && $img_info[2] >= 200) ? $img_info[0] : $logo,

View File

@ -102,17 +102,18 @@
<div class="card-body bg-white border-0 pl-0 pt-0 pb-1">
<h3><?php _e('Share', 'tainacan-theme'); ?></h3>
<div class="btn-group" role="group">
<?php if ( true == get_theme_mod( 'facebook_share', false ) ) : ?>
<?php if ( true == get_theme_mod( 'facebook_share', true ) ) : ?>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="item-card-link--sharing" target="_blank">
<img src="<?=get_template_directory_uri().'/assets/images/facebook-circle.png'; ?>" alt="">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'twitter_share', false ) && get_option( 'twitter_user') ) : ?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?>&amp;via=<?php echo get_option( 'twitter_user', '' ) ?>" target="_blank" class="item-card-link--sharing">
<?php if ( true == get_theme_mod( 'twitter_share', true ) ) : ?>
<?php $via = !empty(get_option( 'twitter_user')) ? '&amp;via=' . get_option( 'twitter_user') : ''; ?>
<a href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title_attribute(); ?><?php echo $via; ?>" target="_blank" class="item-card-link--sharing">
<img src="<?=get_template_directory_uri().'/assets/images/twitter-circle.png'; ?>" alt="">
</a>
<?php endif; ?>
<?php if ( true == get_theme_mod( 'google_share', false ) ) : ?>
<?php if ( true == get_theme_mod( 'google_share', true ) ) : ?>
<a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" target="_blank" class="item-card-link--sharing">
<img src="<?=get_template_directory_uri().'/assets/images/google-plus-circle.png'; ?>" alt="">
</a>

View File

@ -12,7 +12,7 @@
<?php if ( has_post_thumbnail() ): ?>
<?php the_post_thumbnail('tainacan-medium'); ?>
<?php else: ?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_stylesheet_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php echo '<img alt="Thumbnail placeholder" src="'.get_template_directory_uri().'/assets/images/thumbnail_placeholder.png">'?>
<?php endif; ?>
</a>
</div>