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,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' ); ?>