first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-08 12:19:53 -04:00
commit 7c8c8b1c76
4586 changed files with 2050693 additions and 0 deletions
@@ -0,0 +1,140 @@
<?php
/**
* Main Header Layout
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Header style.
$header_style = oceanwp_header_style();
// Header height, used for local scrolling.
$header_height = get_theme_mod( 'ocean_header_height', '74' );
if ( class_exists( 'Ocean_Sticky_Header' ) ) {
if ( 'shrink' === get_theme_mod( 'osh_sticky_header_style', 'shrink' ) ) {
$header_height = get_theme_mod( 'osh_shrink_header_height', '54' );
}
}
// If vertical header style.
if ( 'vertical' === $header_style ) {
$header_height = 0;
}
// Add container class if the header is not full width.
$class = '';
if ( true !== get_theme_mod( 'ocean_header_full_width', false ) ) {
$class = 'container';
}
do_action( 'ocean_before_header' );
// If transparent header style.
if ( 'transparent' === $header_style
|| ( 'full_screen' === $header_style && true === get_theme_mod( 'ocean_full_screen_header_transparent', false ) )
|| ( 'center' === $header_style && true === get_theme_mod( 'ocean_center_header_transparent', false ) )
|| ( 'medium' === $header_style && true === get_theme_mod( 'ocean_medium_header_transparent', false ) ) ) { ?>
<div id="transparent-header-wrap" class="clr">
<?php
}
?>
<header id="site-header" class="<?php echo esc_attr( oceanwp_header_classes() ); ?>" data-height="<?php echo esc_attr( $header_height ); ?>"<?php oceanwp_schema_markup( 'header' ); ?> role="banner">
<?php
// Elementor `header` location.
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
?>
<?php
// If header video.
if ( function_exists( 'has_header_video' ) && has_header_video() ) {
?>
<div class="custom-header-media">
<?php the_custom_header_markup(); ?>
</div>
<?php
}
if ( 'top' === $header_style ) {
// If top header style.
get_template_part( 'partials/header/style/top-header' );
} elseif ( 'full_screen' === $header_style ) {
// If full screen header style.
get_template_part( 'partials/header/style/full-screen-header' );
} elseif ( 'center' === $header_style ) {
// If center header style.
get_template_part( 'partials/header/style/center-header' );
} elseif ( 'medium' === $header_style ) {
// If medium header style.
get_template_part( 'partials/header/style/medium-header' );
} elseif ( 'vertical' === $header_style ) {
// If vertical header style.
get_template_part( 'partials/header/style/vertical-header' );
} elseif ( 'custom' === $header_style ) {
// If custom header style.
get_template_part( 'partials/header/style/custom-header' );
} else {
// Default header style.
?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="clr <?php echo esc_attr( $class ); ?>">
<?php do_action( 'ocean_header_inner_left_content' ); ?>
<?php do_action( 'ocean_header_inner_middle_content' ); ?>
<?php do_action( 'ocean_header_inner_right_content' ); ?>
</div><!-- #site-header-inner -->
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
<?php do_action( 'ocean_after_header_inner' ); ?>
<?php
}
?>
<?php
// If header media.
if ( has_header_image() ) {
?>
<div class="overlay-header-media"></div>
<?php
}
?>
<?php
}
?>
</header><!-- #site-header -->
<?php
// If transparent header style.
if ( 'transparent' === $header_style
|| ( 'full_screen' === $header_style && true === get_theme_mod( 'ocean_full_screen_header_transparent', false ) )
|| ( 'center' === $header_style && true === get_theme_mod( 'ocean_center_header_transparent', false ) )
|| ( 'medium' === $header_style && true === get_theme_mod( 'ocean_medium_header_transparent', false ) ) ) {
?>
</div>
<?php
}
do_action( 'ocean_after_header' ); ?>
@@ -0,0 +1,92 @@
<?php
/**
* Header Logo
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Vars.
$retina_logo = oceanwp_header_retina_logo_setting();
$full_screen_logo = get_theme_mod( 'ocean_full_screen_header_logo' );
$responsive_logo = get_theme_mod( 'ocean_responsive_logo' );
$header_text_color = null;
if ( display_header_text() && ! OCEAN_EXTRA_ACTIVE && ! class_exists( 'Ocean_Extra_Theme_Panel' ) ) {
$header_text_color = ' style=color:#' . get_header_textcolor() . ';';
}
?>
<?php do_action( 'ocean_before_logo' ); ?>
<div id="site-logo" class="<?php echo esc_attr( oceanwp_header_logo_classes() ); ?>"<?php oceanwp_schema_markup( 'logo' ); ?> >
<?php do_action( 'ocean_before_logo_inner' ); ?>
<div id="site-logo-inner" class="clr">
<?php
// Custom site-wide image logo.
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
do_action( 'ocean_before_logo_img' );
// Add srcset attr.
if ( $retina_logo ) {
add_filter( 'wp_get_attachment_image_attributes', 'oceanwp_header_retina_logo', 10, 3 );
}
// Default logo.
the_custom_logo();
// Remove filter to only add the srcset attr to the logo.
if ( $retina_logo ) {
remove_filter( 'wp_get_attachment_image_attributes', 'oceanwp_header_retina_logo', 10 );
}
// Full screen logo.
if ( $full_screen_logo ) {
oceanwp_custom_full_screen_logo();
}
// Responsive logo.
if ( $responsive_logo ) {
oceanwp_custom_responsive_logo();
}
do_action( 'ocean_after_logo_img' );
} else {
if ( display_header_text() === true ) {
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" class="site-title site-logo-text" <?php echo esc_attr( $header_text_color ); ?>><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
<?php
do_action( 'ocean_after_site_title' );
}
}
?>
</div><!-- #site-logo-inner -->
<?php do_action( 'ocean_after_logo_inner' ); ?>
<?php
// Site description.
if ( display_header_text() === true ) {
if ( 'top' === oceanwp_header_style()
&& '' !== get_bloginfo( 'description' ) ) {
?>
<div id="site-description"><h2 <?php echo esc_attr( $header_text_color ); ?>><?php echo bloginfo( 'description' ); ?></h2></div>
<?php
}
}
?>
</div><!-- #site-logo -->
<?php do_action( 'ocean_after_logo' ); ?>
@@ -0,0 +1,213 @@
<?php
/**
* Header menu template part.
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Retunr if disabled.
if ( ! oceanwp_display_navigation() ) {
return;
}
// Header style.
$header_style = oceanwp_header_style();
// Get ID.
$template = oceanwp_custom_nav_template();
// Check if page is Elementor page.
$elementor = get_post_meta( $template, '_elementor_edit_mode', true );
// Get content.
$get_content = oceanwp_nav_template_content();
// Get classes for the header menu.
$wrap_classes = oceanwp_header_menu_classes( 'wrapper' );
$inner_classes = oceanwp_header_menu_classes( 'inner' );
// Nav attributes.
$owp_nav_attrs = apply_filters( 'oceanwp_attrs_main_nav', '' );
if ( ! empty( $template ) ) {
do_action( 'ocean_before_nav' );
// If is not full screen header style.
if ( 'full_screen' !== $header_style ) { ?>
<div id="site-navigation-wrap" class="<?php echo esc_attr( $wrap_classes ); ?>">
<?php } ?>
<?php do_action( 'ocean_before_nav_inner' ); ?>
<?php
if ( OCEANWP_ELEMENTOR_ACTIVE && $elementor ) {
// If Elementor.
OceanWP_Elementor::get_nav_content();
} elseif ( OCEANWP_BEAVER_BUILDER_ACTIVE && ! empty( $template ) ) {
// If Beaver Builder.
echo do_shortcode( '[fl_builder_insert_layout id="' . $template . '"]' );
} else {
// Display template content.
echo do_shortcode( $get_content );
}
?>
<?php do_action( 'ocean_after_nav_inner' ); ?>
<?php
// If is not full screen header style.
if ( 'full_screen' !== $header_style ) {
?>
</div><!-- #site-navigation-wrap -->
<?php
}
?>
<?php do_action( 'ocean_after_nav' ); ?>
<?php
} else {
// Menu Location.
$menu_location = apply_filters( 'ocean_main_menu_location', 'main_menu' );
// Multisite global menu.
$ms_global_menu = apply_filters( 'ocean_ms_global_menu', false );
// Display menu if defined.
if ( has_nav_menu( $menu_location ) || $ms_global_menu ) :
// Get menu classes.
$menu_classes = array( 'main-menu' );
// If full screen header style.
if ( 'full_screen' === $header_style ) {
$menu_classes[] = 'fs-dropdown-menu';
} else {
$menu_classes[] = 'dropdown-menu';
}
// If is not full screen or vertical header style.
if ( 'full_screen' !== $header_style
&& 'vertical' !== $header_style ) {
$menu_classes[] = 'sf-menu';
}
// Turn menu classes into space seperated string.
$menu_classes = implode( ' ', $menu_classes );
// Menu arguments.
$menu_args = array(
'theme_location' => $menu_location,
'menu_class' => $menu_classes,
'container' => false,
'fallback_cb' => false,
'link_before' => '<span class="text-wrap">',
'link_after' => '</span>',
'walker' => new OceanWP_Custom_Nav_Walker(),
);
// Check if custom menu.
if ( $menu = oceanwp_header_custom_menu() ) {
$menu_args['menu'] = $menu;
}
do_action( 'ocean_before_nav' );
// If is not full screen header style.
if ( 'full_screen' !== $header_style ) {
?>
<div id="site-navigation-wrap" class="<?php echo esc_attr( $wrap_classes ); ?>">
<?php
}
?>
<?php do_action( 'ocean_before_nav_inner' ); ?>
<?php
// Add container if is medium header style.
if ( 'medium' === $header_style ) {
?>
<div class="container clr">
<?php
}
?>
<nav id="site-navigation" class="<?php echo esc_attr( $inner_classes ); ?>"<?php oceanwp_schema_markup( 'site_navigation' ); ?> role="navigation" <?php echo $owp_nav_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php
// Display global multisite menu.
if ( is_multisite() && $ms_global_menu ) :
switch_to_blog( 1 );
wp_nav_menu( $menu_args );
restore_current_blog();
else :
// Display this site's menu.
wp_nav_menu( $menu_args );
endif;
// If is not top menu header style.
if ( 'top' !== $header_style
&& 'full_screen' !== $header_style
&& 'vertical' !== $header_style ) {
// Header search.
if ( 'drop_down' === oceanwp_menu_search_style() ) {
get_template_part( 'partials/header/search-dropdown' );
} elseif ( 'header_replace' === oceanwp_menu_search_style() ) {
get_template_part( 'partials/header/search-replace' );
}
}
// Social links if full screen header style.
if ( 'full_screen' === $header_style
&& true === get_theme_mod( 'ocean_menu_social', false ) ) {
get_template_part( 'partials/header/social' );
}
?>
</nav><!-- #site-navigation -->
<?php
// Add container if is medium header style.
if ( 'medium' === $header_style ) {
?>
</div>
<?php
}
?>
<?php do_action( 'ocean_after_nav_inner' ); ?>
<?php
// If is not full screen header style.
if ( 'full_screen' !== $header_style ) {
?>
</div><!-- #site-navigation-wrap -->
<?php
}
?>
<?php do_action( 'ocean_after_nav' ); ?>
<?php endif;
}
?>
@@ -0,0 +1,20 @@
<?php
/**
* Site header search dropdown HTML
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Search attributes.
$item_search_attrs = apply_filters( 'oceanwp_attrs_search_bar', '' );
?>
<div id="searchform-dropdown" class="header-searchform-wrap clr" <?php echo $item_search_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<?php get_search_form(); ?>
</div><!-- #searchform-dropdown -->
@@ -0,0 +1,38 @@
<?php
/**
* Site header search overlay
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Post type.
$post_type = get_theme_mod( 'ocean_menu_search_source', 'any' );
// Aria labels.
$oaria_close = __( 'Close search form', 'oceanwp' );
// Search attributes.
$item_search_overlay_attrs = apply_filters( 'oceanwp_attrs_overlay_search_bar', '' );
?>
<div id="searchform-overlay" class="header-searchform-wrap clr" <?php echo $item_search_overlay_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="container clr">
<form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="header-searchform">
<a href="javascript:void(0)" class="search-overlay-close" aria-label="<?php echo esc_attr( $oaria_close ); ?>"><span></span></a>
<span class="screen-reader-text"><?php esc_html_e( 'Search for:', 'oceanwp' ); ?></span>
<input class="searchform-overlay-input" type="search" name="s" autocomplete="off" value="" aria-placeholder="<?php oceanwp_theme_strings( 'owp-string-search-overlay-search-text', 'oceanwp' ); ?>" />
<label><?php oceanwp_theme_strings( 'owp-string-search-overlay-search-text', 'oceanwp' ); ?><span aria-hidden="true"><i></i><i></i><i></i></span></label>
<?php if ( 'any' !== $post_type ) { ?>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>">
<?php } ?>
<?php do_action( 'wpml_add_language_form_field' ); ?>
</form>
</div>
</div><!-- #searchform-overlay -->
@@ -0,0 +1,35 @@
<?php
/**
* Site header search header replace
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Search attributes.
$item_search_attrs = apply_filters( 'oceanwp_attrs_search_bar', '' );
// Post type.
$post_type = get_theme_mod( 'ocean_menu_search_source', 'any' );
// Aria labels.
$oaria_close = __( 'Close search form', 'oceanwp' );
?>
<div id="searchform-header-replace" class="header-searchform-wrap clr" <?php echo $item_search_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<form role="search" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="header-searchform">
<span class="screen-reader-text"><?php esc_html_e( 'Search for:', 'oceanwp' ); ?></span>
<input type="search" name="s" autocomplete="off" value="" placeholder="<?php oceanwp_theme_strings( 'owp-string-header-replace-search-text', 'oceanwp' ); ?>" />
<?php if ( 'any' !== $post_type ) { ?>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>">
<?php } ?>
<?php do_action( 'wpml_add_language_form_field' ); ?>
</form>
<span id="searchform-header-replace-close" class="icon-close" aria-label="<?php echo esc_attr( $oaria_close ); ?>"></span>
</div><!-- #searchform-header-replace -->
@@ -0,0 +1,157 @@
<?php
/**
* Header social menu template part.
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get social options array.
$social_options = oceanwp_social_options();
// Return if array is empty.
if ( empty( $social_options ) ) {
return;
}
// Get template ID.
$get_id = get_theme_mod( 'ocean_menu_social_template' );
// Check if page is Elementor page.
$elementor = get_post_meta( $get_id, '_elementor_edit_mode', true );
// Get content.
$get_content = oceanwp_social_menu_content();
// Style.
$style = get_theme_mod( 'ocean_menu_social_style', 'simple' );
$style = $style ? $style : 'simple';
// Classes.
$classes = array( 'oceanwp-social-menu', 'clr' );
// Add class if social menu has class.
if ( 'simple' != $style ) {
$classes[] = 'social-with-style';
} else {
$classes[] = 'simple-social';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes );
// Inner classes.
$inner_classes = array( 'social-menu-inner', 'clr' );
if ( 'simple' != $style ) {
$inner_classes[] = $style;
}
// Turn classes into space seperated string.
$inner_classes = implode( ' ', $inner_classes );
// Return if there aren't any profiles defined and define var.
if ( ( ! $profiles = get_theme_mod( 'ocean_menu_social_profiles' ) )
&& empty( $get_content ) ) {
return;
}
// Get theme mods.
$link_target = get_theme_mod( 'ocean_menu_social_target', 'blank' );
$link_rel = '';
if ( $link_target == 'blank' ) {
$link_rel = 'rel="noopener noreferrer"';
}
?>
<div class="<?php echo esc_attr( $classes ); ?>">
<div class="<?php echo esc_attr( $inner_classes ); ?>">
<?php
// Check if there is a template for the footer
if ( ! empty( $get_id ) ) {
// If Elementor
if ( OCEANWP_ELEMENTOR_ACTIVE && $elementor ) {
OceanWP_Elementor::get_social_menu_content();
}
// If Beaver Builder
else if ( OCEANWP_BEAVER_BUILDER_ACTIVE && ! empty( $get_id ) ) {
echo do_shortcode( '[fl_builder_insert_layout id="' . $get_id . '"]' );
}
// Else
else {
// Display template content
echo do_shortcode( $get_content );
}
// Display social
} else { ?>
<ul aria-label="<?php echo esc_attr__( 'Social links', 'oceanwp' ); ?>">
<?php
// Loop through social options
foreach ( $social_options as $key => $val ) {
// Get URL from the theme mods
$url = isset( $profiles[$key] ) ? $profiles[$key] : '';
$esc_url = esc_url( $url );
// Get correct label
$label = ! empty( $val['label'] ) ? esc_attr( $val['label'] ) : '';
if ( $link_target == 'blank' ) {
$aria_label = 'aria-label="' . $label . ' '. esc_attr__( '(opens in a new tab)', 'oceanwp' ).'"';
}
else {
$aria_label = 'aria-label="' . $label . '"';
}
// Display if there is a value defined
if ( $url ) {
// Display link
echo '<li class="oceanwp-'. esc_attr( $key ) .'">';
if ( in_array( $key, array( 'skype' ) ) ) {
echo '<a href="skype:'. esc_attr( $url ) .'?call" aria-label="'. esc_attr__( 'Skype (opens in your application)', 'oceanwp' ) .'" target="_self">';
} else if ( in_array( $key, array( 'email' ) ) ) {
echo '<a href="mailto:'. antispambot( esc_attr( $url ) ) .'" aria-label="'. esc_attr__( 'Send email (opens in your application)', 'oceanwp' ) .'" target="_self">'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
} else {
echo '<a href="'. $esc_url .'" '. $aria_label .' target="_'. esc_attr( $link_target ) .'" '. $link_rel .'>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
echo '<span class="'. esc_attr( $val['icon_class'] ) .'" aria-hidden="true"></span>';
echo '</a>';
echo '</li>';
} // End url check
} // End loop ?>
</ul>
<?php } ?>
</div>
</div>
@@ -0,0 +1,194 @@
<?php
/**
* Center Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get classes.
$classes = array( 'clr' );
// Add container class.
if ( true !== get_theme_mod( 'ocean_header_full_width', false ) ) {
$classes[] = 'container';
}
// Add menus position class.
$position = get_theme_mod( 'ocean_center_header_menu_position', 'centered' );
$position = $position ? $position : 'centered';
$classes[] = $position;
// Turn classes into space seperated string.
$classes = implode( ' ', $classes );
// Left menu.
$left_menu = get_theme_mod( 'ocean_center_header_left_menu' );
$left_menu = '0' !== $left_menu ? $left_menu : '';
$left_menu = apply_filters( 'ocean_center_header_left_menu', $left_menu );
// Right menu.
$right_menu = apply_filters( 'ocean_main_menu_location', 'main_menu' );
$right_custom_menu = apply_filters( 'ocean_custom_menu', $right_menu );
// Retina logo.
$retina_logo = oceanwp_header_retina_logo_setting(); ?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="<?php echo esc_attr( $classes ); ?>">
<?php do_action( 'ocean_header_inner_left_content' ); ?>
<?php get_template_part( 'partials/header/logo' ); ?>
<?php
// If social.
if ( true === get_theme_mod( 'ocean_menu_social', false ) ) {
get_template_part( 'partials/header/social' );
}
?>
<?php
// Get classes for the header menu.
$wrap_classes = oceanwp_header_menu_classes( 'wrapper' );
$inner_classes = oceanwp_header_menu_classes( 'inner' );
// Get menu classes.
$menu_classes = array( 'main-menu', 'dropdown-menu', 'sf-menu', 'clr' );
// Turn menu classes into space seperated string.
$menu_classes = implode( ' ', $menu_classes );
// Left menu arguments.
$left_menu_args = array(
'menu' => $left_menu,
'container' => false,
'fallback_cb' => false,
'items_wrap' => '%3$s',
'link_before' => '<span class="text-wrap">',
'link_after' => '</span>',
'walker' => new OceanWP_Custom_Nav_Walker(),
);
// Menu arguments.
$right_menu_args = array(
'theme_location' => $right_menu,
'container' => false,
'fallback_cb' => false,
'items_wrap' => '%3$s',
'link_before' => '<span class="text-wrap">',
'link_after' => '</span>',
'walker' => new OceanWP_Custom_Nav_Walker(),
);
// Check if right custom menu.
if ( '' !== $right_custom_menu ) {
$right_menu_args['menu'] = $right_custom_menu;
}
do_action( 'ocean_before_nav' );
?>
<div id="site-navigation-wrap" class="<?php echo esc_attr( $wrap_classes ); ?>">
<?php do_action( 'ocean_before_nav_inner' ); ?>
<nav id="site-navigation" class="<?php echo esc_attr( $inner_classes ); ?>"<?php oceanwp_schema_markup( 'site_navigation' ); ?> role="navigation">
<ul class="left-menu <?php echo esc_attr( $menu_classes ); ?>">
<?php
// Display menu if defined.
if ( $left_menu ) {
wp_nav_menu( $left_menu_args );
}
?>
</ul>
<?php do_action( 'ocean_before_logo' ); ?>
<div class="middle-site-logo <?php echo esc_attr( oceanwp_header_logo_classes() ); ?>">
<?php do_action( 'ocean_before_logo_inner' ); ?>
<?php
// Custom site-wide image logo.
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
do_action( 'ocean_before_logo_img' );
// Add srcset attr.
if ( $retina_logo ) {
add_filter( 'wp_get_attachment_image_attributes', 'oceanwp_header_retina_logo', 10, 3 );
}
// Default logo.
the_custom_logo();
// Remove filter to only add the srcset attr to the logo.
if ( $retina_logo ) {
remove_filter( 'wp_get_attachment_image_attributes', 'oceanwp_header_retina_logo', 10 );
}
do_action( 'ocean_after_logo_img' );
} else {
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" class="site-title site-logo-text"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
<?php } ?>
<?php do_action( 'ocean_after_logo_inner' ); ?>
</div>
<?php do_action( 'ocean_after_logo' ); ?>
<ul class="right-menu <?php echo esc_attr( $menu_classes ); ?>">
<?php
// Display menu if defined.
if ( has_nav_menu( $right_menu ) ) {
wp_nav_menu( $right_menu_args );
// Drop down search.
if ( 'drop_down' === oceanwp_menu_search_style() ) {
get_template_part( 'partials/header/search-dropdown' );
}
// WooCommerce cart.
if ( 'drop_down' === oceanwp_menu_cart_style() ) {
get_template_part( 'partials/cart/cart-dropdown' );
}
}
?>
</ul>
<?php
// Search header replace.
if ( 'header_replace' === oceanwp_menu_search_style() ) {
get_template_part( 'partials/header/search-replace' );
}
?>
</nav><!-- #site-navigation -->
<?php do_action( 'ocean_after_nav_inner' ); ?>
</div><!-- #site-navigation-wrap -->
<?php do_action( 'ocean_header_inner_right_content' ); ?>
</div><!-- #site-header-inner -->
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
<?php do_action( 'ocean_after_header_inner' ); ?>
@@ -0,0 +1,60 @@
<?php
/**
* Custom Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get ID.
$get_id = oceanwp_custom_header_template();
// Check if page is Elementor page.
$elementor = get_post_meta( $get_id, '_elementor_edit_mode', true );
// Get content.
$get_content = oceanwp_header_template_content();
// Get classes.
$classes = array( 'clr' );
// Add container class.
if ( true === get_theme_mod( 'ocean_add_custom_header_container', true ) ) {
$classes[] = 'container';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes ); ?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="<?php echo esc_attr( $classes ); ?>">
<?php
if ( OCEANWP_ELEMENTOR_ACTIVE && $elementor ) {
// If Elementor.
OceanWP_Elementor::get_header_content();
} elseif ( OCEANWP_BEAVER_BUILDER_ACTIVE && ! empty( $get_id ) ) {
// If Beaver Builder.
echo do_shortcode( '[fl_builder_insert_layout id="' . $get_id . '"]' );
} else {
// Display template content.
echo do_shortcode( $get_content );
}
?>
</div>
<?php do_action( 'ocean_after_header_inner' ); ?>
@@ -0,0 +1,54 @@
<?php
/**
* Full Screen Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get classes.
$classes = array( 'clr' );
// Add container class.
if ( true !== get_theme_mod( 'ocean_header_full_width', false ) ) {
$classes[] = 'container';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes ); ?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="<?php echo esc_attr( $classes ); ?>">
<?php do_action( 'ocean_header_inner_left_content' ); ?>
<?php get_template_part( 'partials/header/logo' ); ?>
<div id="site-navigation-wrap" class="clr">
<div class="menu-bar-wrap clr">
<div class="menu-bar-inner clr">
<a href="#" class="menu-bar"><span class="ham"></span></a>
</div>
</div>
<div id="full-screen-menu" class="clr">
<div id="full-screen-menu-inner" class="clr">
<?php get_template_part( 'partials/header/nav' ); ?>
</div>
</div>
</div><!-- #site-header-wrap -->
<?php do_action( 'ocean_header_inner_right_content' ); ?>
</div><!-- #site-header-inner -->
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
<?php do_action( 'ocean_after_header_inner' ); ?>
@@ -0,0 +1,38 @@
<?php
/**
* Search Form for The Medium Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Post type.
$post_type = get_theme_mod( 'ocean_menu_search_source', 'any' );
?>
<div id="medium-searchform" class="header-searchform-wrap clr">
<form method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="header-searchform" role="search" aria-label="<?php esc_attr_e( 'Medium Header Search', 'oceanwp' ); ?>">
<input type="search" name="s" autocomplete="off" value="" />
<?php
// If the headerSearchForm script is not disable.
if ( OCEAN_EXTRA_ACTIVE
&& class_exists( 'Ocean_Extra_Scripts_Panel' )
&& Ocean_Extra_Scripts_Panel::get_setting( 'oe_headerSearchForm_script' ) ) {
?>
<label><?php oceanwp_theme_strings( 'owp-string-medium-header-search-text', 'oceanwp' ); ?></label>
<?php
}
?>
<button class="search-submit"><i class="icon-magnifier"></i></button>
<div class="search-bg"></div>
<?php if ( 'any' !== $post_type ) { ?>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>">
<?php } ?>
<?php do_action( 'wpml_add_language_form_field' ); ?>
</form>
</div><!-- #medium-searchform -->
@@ -0,0 +1,112 @@
<?php
/**
* Medium Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get elements.
$elements = oceanwp_medium_header_elements();
// Define counter.
$count = '';
// Bottom header class.
$classes = array( 'bottom-header-wrap', 'clr' );
// Add the fixed class if only sticky menu.
if ( true === get_theme_mod( 'ocean_medium_header_stick_menu', false ) ) {
$classes[] = 'fixed-scroll';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes );
?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="clr">
<?php
// If elements.
if ( ! empty( $elements ) ) {
?>
<div class="top-header-wrap clr">
<div class="container clr">
<div class="top-header-inner clr">
<?php
// Loop through elements.
foreach ( $elements as $element ) :
// Counter.
$count++;
// Classes.
$e_classes = array( 'top-col', 'clr' );
// Count.
$e_classes[] = 'col-' . $count;
// If logo.
if ( 'logo' === $element ) {
$e_classes[] = 'logo-col';
}
// Turn classes into space seperated string.
$e_classes = implode( ' ', $e_classes );
?>
<div class="<?php echo esc_attr( $e_classes ); ?>">
<?php
// Search form.
if ( 'searchfrom' === $element ) {
get_template_part( 'partials/header/style/medium-header-search' );
} elseif ( 'logo' === $element ) {
// Logo.
get_template_part( 'partials/header/logo' );
} elseif ( 'social' === $element ) {
// Social buttons.
if ( true === get_theme_mod( 'ocean_menu_social', false ) ) {
get_template_part( 'partials/header/social' );
}
}
?>
</div>
<?php
endforeach;
?>
</div>
</div>
</div>
<?php
}
?>
<div class="<?php echo esc_attr( $classes ); ?>">
<?php get_template_part( 'partials/header/nav' ); ?>
<?php get_template_part( 'partials/mobile/mobile-icon' ); ?>
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
</div>
</div><!-- #site-header-inner -->
<?php do_action( 'ocean_after_header_inner' ); ?>
@@ -0,0 +1,108 @@
<?php
/**
* Top Menu Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Menu position.
$position = get_theme_mod( 'ocean_top_header_menu_position', 'before' );
// Get classes.
$classes = array( 'clr' );
// Add container class.
if ( true !== get_theme_mod( 'ocean_header_full_width', false ) ) {
$classes[] = 'container';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes );
// Search style.
$search = oceanwp_menu_search_style(); ?>
<?php
if ( 'after' === $position ) {
?>
<div class="header-bottom clr">
<div class="container">
<?php get_template_part( 'partials/header/logo' ); ?>
</div>
</div>
<?php
}
?>
<div class="<?php echo esc_attr( oceanwp_top_header_classes() ); ?>">
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="<?php echo esc_attr( $classes ); ?>">
<?php
// Search header replace.
if ( 'header_replace' === $search ) {
get_template_part( 'partials/header/search-replace' );
}
?>
<div class="left clr">
<div class="inner">
<?php get_template_part( 'partials/header/nav' ); ?>
<?php get_template_part( 'partials/mobile/mobile-icon' ); ?>
</div>
</div>
<div class="right clr">
<div class="inner">
<?php
if ( true === get_theme_mod( 'ocean_menu_social', false ) ) {
get_template_part( 'partials/header/social' );
}
oceanwp_top_header_search();
// Search style.
if ( 'drop_down' === $search ) {
get_template_part( 'partials/header/search-dropdown' );
} elseif ( 'overlay' === $search ) {
get_template_part( 'partials/header/search-overlay' );
}
?>
</div>
</div>
</div><!-- #site-header-inner -->
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
<?php do_action( 'ocean_after_header_inner' ); ?>
</div><!-- .header-top -->
<?php
if ( 'before' === $position ) {
?>
<div class="header-bottom clr">
<div class="container">
<?php get_template_part( 'partials/header/logo' ); ?>
</div>
</div>
<?php
}
?>
@@ -0,0 +1,36 @@
<?php
/**
* Search Form for The Vertical Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Post type.
$post_type = get_theme_mod( 'ocean_menu_search_source', 'any' ); ?>
<div id="vertical-searchform" class="header-searchform-wrap clr">
<form method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" class="header-searchform" role="search" aria-label="<?php esc_attr_e( 'Vertical Header Search', 'oceanwp' ); ?>">
<input type="search" name="s" autocomplete="off" value="" />
<?php
// If the headerSearchForm script is not disable.
if ( OCEAN_EXTRA_ACTIVE
&& class_exists( 'Ocean_Extra_Scripts_Panel' )
&& Ocean_Extra_Scripts_Panel::get_setting( 'oe_headerSearchForm_script' ) ) {
?>
<label><?php oceanwp_theme_strings( 'owp-string-vertical-header-search-text', 'oceanwp' ); ?></label>
<?php
}
?>
<button class="search-submit"><i class="icon-magnifier"></i></button>
<div class="search-bg"></div>
<?php if ( 'any' !== $post_type ) { ?>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post_type ); ?>">
<?php } ?>
<?php do_action( 'wpml_add_language_form_field' ); ?>
</form>
</div><!-- #vertical-searchform -->
@@ -0,0 +1,23 @@
<?php
/**
* Hamburger button for The Vertical Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$vertical_header_attrs = apply_filters( 'oceanwp_attrs_vertical_header_style', '' );
?>
<a href="javascript:void(0)" class="vertical-toggle">
<div class="hamburger hamburger--spin" <?php echo $vertical_header_attrs; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
<div class="hamburger-box">
<div class="hamburger-inner"></div>
</div>
</div>
</a>
@@ -0,0 +1,141 @@
<?php
/**
* Vertical Header Style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Get template.
$template = get_theme_mod( 'ocean_vertical_header_template' );
// Check if template is created with Elementor.
$elementor = get_post_meta( $template, '_elementor_edit_mode', true );
// Get template content.
if ( ! empty( $template ) ) {
$content = get_post( $template );
if ( $content && ! is_wp_error( $content ) ) {
$get_content = $content->post_content;
}
}
// Get bottom template.
$bottom_template = get_theme_mod( 'ocean_vertical_header_bottom_template' );
// Check if template is created with Elementor.
$bottom_elementor = get_post_meta( $bottom_template, '_elementor_edit_mode', true );
// Get bottom template content.
if ( ! empty( $bottom_template ) ) {
$bottom_content = get_post( $bottom_template );
if ( $bottom_content && ! is_wp_error( $bottom_content ) ) {
$get_bottom_content = $bottom_content->post_content;
}
}
// Get classes.
$classes = array( 'clr' );
// If template.
if ( ! empty( $template ) ) {
$classes[] = 'has-template';
}
// Add container class.
if ( true !== get_theme_mod( 'ocean_header_full_width', false ) ) {
$classes[] = 'container';
}
// Turn classes into space seperated string.
$classes = implode( ' ', $classes ); ?>
<?php do_action( 'ocean_before_header_inner' ); ?>
<div id="site-header-inner" class="<?php echo esc_attr( $classes ); ?>">
<?php get_template_part( 'partials/header/logo' ); ?>
<?php
// If template.
if ( ! empty( $template ) ) {
if ( OCEANWP_ELEMENTOR_ACTIVE && $elementor ) {
// If Elementor.
OceanWP_Elementor::get_vertical_header_content();
} elseif ( OCEANWP_BEAVER_BUILDER_ACTIVE && ! empty( $template ) ) {
// If Beaver Builder.
echo do_shortcode( '[fl_builder_insert_layout id="' . $template . '"]' );
} else {
// Display template content.
echo do_shortcode( $get_content );
}
} else {
?>
<?php get_template_part( 'partials/header/nav' ); ?>
<?php
// Search form.
if ( true === get_theme_mod( 'ocean_vertical_header_search_form', true ) ) {
get_template_part( 'partials/header/style/vertical-header-search' );
}
?>
<?php
// Social menu.
if ( true === get_theme_mod( 'ocean_menu_social', false ) ) {
get_template_part( 'partials/header/social' );
}
?>
<?php
// If bottom template.
if ( ! empty( $bottom_template ) ) {
if ( OCEANWP_ELEMENTOR_ACTIVE && $bottom_elementor ) {
// If Elementor.
OceanWP_Elementor::get_vertical_header_bottom_content();
} elseif ( OCEANWP_BEAVER_BUILDER_ACTIVE && ! empty( $bottom_template ) ) {
// If Beaver Builder.
echo do_shortcode( '[fl_builder_insert_layout id="' . $bottom_template . '"]' );
} else {
// Display bottom template content.
echo do_shortcode( $get_bottom_content );
}
}
?>
<?php
}
?>
<?php get_template_part( 'partials/mobile/mobile-icon' ); ?>
<?php get_template_part( 'partials/header/style/vertical-header-toggle' ); ?>
</div>
<?php get_template_part( 'partials/mobile/mobile-dropdown' ); ?>
<?php do_action( 'ocean_after_header_inner' ); ?>