esc_html__( 'Copyright', 'razzi' ), 'menu' => esc_html__( 'Menu', 'razzi' ), 'text' => esc_html__( 'Custom text', 'razzi' ), 'payment' => esc_html__( 'Payments', 'razzi' ), 'social' => esc_html__( 'Socials', 'razzi' ), 'logo' => esc_html__( 'Logo', 'razzi' ), ) ); } /** * Custom template tags of footer * * @since 1.0.0 * * @return void */ public function footer_item( $item ) { switch ( $item ) { case 'copyright': echo ''; break; case 'menu': $menu_slug = Helper::get_option( 'footer_menu' ); if( ! empty($menu_slug) ) { wp_nav_menu( array( 'theme_location' => '__no_such_location', 'menu' => Helper::get_option( 'footer_menu' ), 'container' => 'nav', 'menu_id' => 'footer-menu', 'menu_class' => 'footer-menu nav-menu menu', 'depth' => 1, ) ); } break; case 'text': if ( $footer_custom_text = Helper::get_option( 'footer_main_text' ) ) { echo '
' . do_shortcode( wp_kses_post( $footer_custom_text ) ) . '
'; } break; case 'payment': $this->footer_payments(); break; case 'social': \Razzi\Helper::socials_menu(); break; case 'logo': $this->footer_logo(); break; default: do_action( 'razzi_footer_footer_main_item', $item ); break; } } /** * Display logo in footer * * @since 1.0.0 * * @return void */ public function footer_logo() { $logo_type = Helper::get_option( 'footer_logo_type' ); $style = $class = ''; if ( 'svg' == $logo_type ) : $logo = Helper::get_option( 'footer_logo_svg' ); elseif ( 'text' == $logo_type ) : $logo = Helper::get_option( 'footer_logo_text' ); $class = 'logo-text'; else: $logo = Helper::get_option( 'footer_logo' ); if ( ! $logo ) { $logo = $logo ? $logo : get_theme_file_uri( '/images/logo.svg' ); } endif; ?> '; foreach ( $images as $image ) { if ( ! isset( $image['image'] ) && ! $image['image'] ) { continue; } $image_id = $image['image']; if( is_numeric($image_id) ) { $img = wp_get_attachment_image( $image_id, 'full' ); } else { $img = sprintf('', $image_id); } if ( isset( $image['link'] ) && ! empty( $image['link'] ) ) { if ( $img ) { $output[] = sprintf( '
  • %s
  • ', esc_url( $image['link'] ), $img ); } } else { if ( $img ) { $output[] = sprintf( '
  • %s
  • ', $img ); } } } $output[] = ''; } if ( $output ) { printf( '', implode( ' ', $output ) ); } } /** * Add this back-to-top button to footer * * @since 1.0.0 * * @return void */ public function gotop_button() { if ( apply_filters( 'razzi_get_back_to_top', Helper::get_option( 'general_backtotop' ) ) ) { echo '' . \Razzi\Icon::get_svg( 'arrow-right' ) . ''; } } /** * Add base url to footer * * @since 1.0.0 * * @return void */ public function base_url() { echo ''; } }