<?php 
/**
* Functions & definations for theme footer
*
*
*/

add_action('portfolio_one_footer','portfolio_one_copyright', 10 );

if( ! function_exists('portfolio_one_copyright')):
	function portfolio_one_copyright(){

		$cww_footer_text 			= get_theme_mod('cww_footer_text');
		$default 					= portfolio_one_customizer_defaults();

		?>
		<footer id="colophon" class="site-footer default-footer-style">
			<div class="container cww-flex">
			<?php do_action('portfolio_one_social_icons'); ?>
			<div class="site-info cww-flex">
				<?php if($cww_footer_text){ ?>
					<div class="footer-copyright"><?php echo wp_kses_post($cww_footer_text);?></div>
				<?php }else{ ?>
				<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'portfolio-one' ) ); ?>">
					<?php
					/* translators: %s: CMS name, i.e. WordPress. */
					printf( esc_html__( 'Proudly powered by %s', 'portfolio-one' ), 'WordPress' );
					?>
				</a>
				<?php } ?>
				<span class="sep"> | </span>
					<?php
					$cww_get_current_theme = wp_get_theme();
					
					/* translators: 1: Theme name, 2: Theme author. */
					printf( esc_html__( 'Theme: %1$s by %2$s.', 'portfolio-one' ), '<a href="https://codeworkweb.com/themes/portfolio-one" class="th-name">'.esc_html($cww_get_current_theme->Name).'</a>', 'Code Work Web' );
					?>
			</div><!-- .site-info -->
			</div>
		</footer><!-- #colophon -->
		<?php 
	}
endif;