118 lines
4.2 KiB
PHP
118 lines
4.2 KiB
PHP
|
|
<?php
|
||
|
|
if ( ! function_exists( 'xpomagazine_setup' ) ) :
|
||
|
|
function xpomagazine_setup() {
|
||
|
|
add_theme_support( "title-tag");
|
||
|
|
add_theme_support( 'automatic-feed-links' );
|
||
|
|
add_theme_support(
|
||
|
|
'custom-background',
|
||
|
|
apply_filters(
|
||
|
|
'newspress_custom_background_args',
|
||
|
|
array(
|
||
|
|
'default-color' => '#141414',
|
||
|
|
'default-image' => '',
|
||
|
|
)
|
||
|
|
)
|
||
|
|
);
|
||
|
|
}
|
||
|
|
endif;
|
||
|
|
add_action( 'after_setup_theme', 'xpomagazine_setup' );
|
||
|
|
|
||
|
|
|
||
|
|
function xpomagazine_customizer_default_settings() {
|
||
|
|
set_theme_mod( 'walkerpress_primary_color', '#06aec9' );
|
||
|
|
set_theme_mod( 'walkerpress_secondary_color', '#c90606' );
|
||
|
|
set_theme_mod( 'walkerpress_container_width', '1440' );
|
||
|
|
set_theme_mod('walkerpress_heading_five_size','20');
|
||
|
|
set_theme_mod('walkerpress_heading_five_size','16');
|
||
|
|
set_theme_mod('walkerpress_site_title_size','75');
|
||
|
|
set_theme_mod('walkerpress_footer_background_color','#141414');
|
||
|
|
}
|
||
|
|
add_action( 'after_switch_theme', 'xpomagazine_customizer_default_settings' );
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Implement the Custom Header feature.
|
||
|
|
*/
|
||
|
|
require get_stylesheet_directory() . '/inc/custom-header.php';
|
||
|
|
|
||
|
|
function xpomagazine_enqueue_styles() {
|
||
|
|
wp_enqueue_style( 'walkerpress-style', get_template_directory_uri() . '/style.css' );
|
||
|
|
wp_enqueue_style( 'xpomagazine-style',get_stylesheet_directory_uri() . '/style.css',array('walkerpress-style'));
|
||
|
|
}
|
||
|
|
add_action( 'wp_enqueue_scripts', 'xpomagazine_enqueue_styles' );
|
||
|
|
|
||
|
|
if(!function_exists('xpomazine_footer_copyright')){
|
||
|
|
function xpomazine_footer_copyright(){?>
|
||
|
|
<div class="walkerwp-wraper footer-copyright-wraper">
|
||
|
|
<?php
|
||
|
|
if(get_theme_mod('copyright_text_alignment') =='copyright-text-align-center'){
|
||
|
|
$copyright_text_align_class ="text-center";
|
||
|
|
}else{
|
||
|
|
$copyright_text_align_class ="text-left";
|
||
|
|
}
|
||
|
|
$walkerpress_copyright = get_theme_mod('footer_copiright_text');
|
||
|
|
?>
|
||
|
|
|
||
|
|
<div class="walkerwp-container credit-container <?php echo esc_attr($copyright_text_align_class);?>">
|
||
|
|
<?php
|
||
|
|
$current_footer_layout = get_theme_mod('walkerpress_footer_layout','footer-layout-one');
|
||
|
|
if($current_footer_layout=='footer-layout-three'){
|
||
|
|
|
||
|
|
if($walkerpress_copyright && walkerpress_set_to_premium() ){?>
|
||
|
|
<div class="site-info <?php echo esc_attr($copyright_text_align_class);?>"><?php echo wp_kses_post($walkerpress_copyright);?></div>
|
||
|
|
<?php } else{ ?>
|
||
|
|
<div class="site-info">
|
||
|
|
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'xpomagazine' ) ); ?>">
|
||
|
|
<?php
|
||
|
|
/* translators: %s: CMS name, i.e. WordPress. */
|
||
|
|
printf( esc_html__( 'Proudly powered by %s', 'xpomagazine' ), 'WordPress' );
|
||
|
|
?>
|
||
|
|
</a>
|
||
|
|
<span class="sep"> | </span>
|
||
|
|
<?php
|
||
|
|
/* translators: 1: Theme name, 2: Theme author. */
|
||
|
|
printf( esc_html__( 'Theme: %1$s by %2$s.', 'xpomagazine' ), 'XpoMagazine', '<a href="http://walkerwp.com/">WalkerWP</a>' );
|
||
|
|
?>
|
||
|
|
|
||
|
|
</div><!-- .site-info -->
|
||
|
|
<?php }
|
||
|
|
if( get_theme_mod('footer_copyright_social_status','true')){?>
|
||
|
|
<div class="footer-social-media"><?php walkerpress_header_social_media();?></div>
|
||
|
|
<?php }
|
||
|
|
}else{?>
|
||
|
|
<div class="footer-social-media walkerwp-grid-12">
|
||
|
|
<?php
|
||
|
|
if( get_theme_mod('footer_copyright_social_status','true')){
|
||
|
|
walkerpress_header_social_media();
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
</div>
|
||
|
|
<?php
|
||
|
|
|
||
|
|
if($walkerpress_copyright && walkerpress_set_to_premium() ){?>
|
||
|
|
<div class="site-info walkerwp-grid-12 <?php echo esc_attr($copyright_text_align_class);?>"><?php echo wp_kses_post($walkerpress_copyright);?></div>
|
||
|
|
<?php } else{ ?>
|
||
|
|
<div class="site-info walkerwp-grid-12">
|
||
|
|
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'xpomagazine' ) ); ?>">
|
||
|
|
<?php
|
||
|
|
/* translators: %s: CMS name, i.e. WordPress. */
|
||
|
|
printf( esc_html__( 'Proudly powered by %s', 'xpomagazine' ), 'WordPress' );
|
||
|
|
?>
|
||
|
|
</a>
|
||
|
|
<span class="sep"> | </span>
|
||
|
|
<?php
|
||
|
|
/* translators: 1: Theme name, 2: Theme author. */
|
||
|
|
printf( esc_html__( 'Theme: %1$s by %2$s.', 'xpomagazine' ), 'XpoMagazine', '<a href="http://walkerwp.com/">WalkerWP</a>' );
|
||
|
|
?>
|
||
|
|
|
||
|
|
</div><!-- .site-info -->
|
||
|
|
<?php } ?>
|
||
|
|
<?php }
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<?php }
|
||
|
|
}
|