[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: header-content.php
<?php /** * Header content. * * @package OceanWP WordPress theme */ // Vars. $header_style = oceanwp_header_style(); $position = get_theme_mod( 'ocean_mobile_elements_positioning', 'one' ); $woo_icon_visibility = get_theme_mod( 'ocean_woo_menu_icon_visibility', 'default' ); if ( OCEANWP_WOOCOMMERCE_ACTIVE && 'disabled' !== $woo_icon_visibility && 'two' === $position ) { add_action( 'ocean_header_inner_left_content', 'oceanwp_mobile_cart_icon', 1 ); } if ( 'three' === $position ) { add_action( 'ocean_header_inner_left_content', 'oceanwp_mobile_icon', 1 ); } add_action( 'ocean_header_inner_middle_content', 'oceanwp_header_logo', 10 ); if ( true === get_theme_mod( 'ocean_menu_social', false ) ) { add_action( 'ocean_header_inner_middle_content', 'oceanwp_header_social', 11 ); } add_action( 'ocean_header_inner_middle_content', 'oceanwp_header_navigation', 12 ); if ( 'three' !== $position ) { add_action( 'ocean_header_inner_right_content', 'oceanwp_mobile_icon', 99 ); } if ( OCEANWP_WOOCOMMERCE_ACTIVE && 'disabled' !== $woo_icon_visibility && 'three' === $position ) { add_action( 'ocean_header_inner_right_content', 'oceanwp_mobile_cart_icon', 99 ); } if ( OCEANWP_WOOCOMMERCE_ACTIVE ) { add_action( 'ocean_before_mobile_icon_inner', 'oceanwp_mobile_cart_icon_medium_header', 10 ); } if ( OCEANWP_WOOCOMMERCE_ACTIVE && 'disabled' !== get_theme_mod( 'ocean_woo_menu_icon_visibility', 'default' ) && 'one' === get_theme_mod( 'ocean_mobile_elements_positioning', 'one' ) ) { add_action( 'ocean_before_mobile_icon_inner', 'oceanwp_mobile_cart_icon_not_medium_header', 10 ); } if ( oceanwp_is_accessible_header_video_enabled() ) { add_action( 'wp', 'oceanwp_accessible_header_video_boot', 20 ); } if ( ! function_exists( 'oceanwp_mobile_cart_icon' ) ) { /** * Mobile cart icon * * @since 1.5.6 */ function oceanwp_mobile_cart_icon() { // If bag style. $bag = get_theme_mod( 'ocean_woo_menu_bag_style', 'no' ); // Classes. $classes = array( 'oceanwp-mobile-menu-icon', 'clr', 'woo-menu-icon' ); // Position. $position = get_theme_mod( 'ocean_mobile_elements_positioning', 'one' ); if ( 'two' === $position ) { $classes[] = 'mobile-left'; } elseif ( 'three' === $position ) { $classes[] = 'mobile-right'; } // Turn classes into space seperated string. $classes = implode( ' ', $classes ); echo '<div class="' . esc_attr( $classes ) . '">'; if ( 'yes' === $bag ) { echo '<div class="bag-style">'; } echo oceanwp_wcmenucart_menu_item(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( 'yes' === $bag ) { echo '</div>'; } echo '</div>'; } } if ( ! function_exists( 'oceanwp_header_logo' ) ) { /** * Header logo * * @since 1.5.6 */ function oceanwp_header_logo() { get_template_part( 'partials/header/logo' ); } } if ( ! function_exists( 'oceanwp_header_social' ) ) { /** * Header social * * @since 1.5.6 */ function oceanwp_header_social() { get_template_part( 'partials/header/social' ); } } if ( ! function_exists( 'oceanwp_header_navigation' ) ) { /** * Header navigation * * @since 1.5.6 */ function oceanwp_header_navigation() { get_template_part( 'partials/header/nav' ); } } if ( ! function_exists( 'oceanwp_mobile_icon' ) ) { /** * Header navigation * * @since 1.5.6 */ function oceanwp_mobile_icon() { get_template_part( 'partials/mobile/mobile-icon' ); } } if ( ! function_exists( 'oceanwp_mobile_cart_icon_medium_header' ) ) { /** * Mobile cart icon for the Medium header style * * @since 1.5.6 */ function oceanwp_mobile_cart_icon_medium_header() { $header_style = oceanwp_header_style(); // Return if it is not medium or vertical header styles. if ( 'medium' !== $header_style && 'vertical' !== $header_style ) { return; } echo oceanwp_wcmenucart_menu_item(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } if ( ! function_exists( 'oceanwp_mobile_cart_icon_not_medium_header' ) ) { /** * Mobile cart icon if it is not the Medium header style * * @since 1.5.6 */ function oceanwp_mobile_cart_icon_not_medium_header() { $header_style = oceanwp_header_style(); // Return if medium or vertical header styles. if ( 'medium' === $header_style || 'vertical' === $header_style ) { return; } echo oceanwp_wcmenucart_menu_item(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } /** * Header video render * * @since 4.2.0 */ function oceanwp_accessible_header_media_render() { $video_enabled = function_exists( 'has_header_video' ) && has_header_video(); $image_enabled = function_exists( 'has_header_image' ) && has_header_image(); $mobile_fallback = oceanwp_is_accessibility_feature_enabled( 'ocean_accessible_header_video_fallback_mobile', ocean_accessibility_get_header_media_default_value() ); $media_classes = []; if ( $mobile_fallback ) { $media_classes[] = 'has-mobile-fallback'; } if ( $video_enabled ) { if ( $mobile_fallback && $image_enabled ) { echo '<div class="custom-header-media ocean-accessible-header-media ocean-accessible-image">'; the_custom_header_markup(); echo '</div>'; return; } echo '<div class="custom-header-media ocean-accessible-header-media ocean-accessible-video ' . esc_attr( implode( ' ', $media_classes ) ) . '">'; the_custom_header_markup(); echo '</div>'; return; } if ( $image_enabled ) { echo '<div class="custom-header-media ocean-accessible-header-media ocean-accessible-image">'; the_custom_header_markup(); echo '</div>'; } } /** * Header video * * @since 4.2.0 */ function oceanwp_accessible_header_video_boot() { $video_enabled = function_exists( 'has_header_video' ) && has_header_video(); $image_enabled = function_exists( 'has_header_image' ) && has_header_image(); if ( ! $video_enabled && ! $image_enabled ) { return; } if ( ! oceanwp_is_header_style_supported( [ 'minimal', 'top', 'center', 'medium' ] ) ) { return; } $position = get_theme_mod( 'ocean_accessible_header_video_position', 'above_top_bar' ); $visibility = get_theme_mod( 'ocean_accessible_header_video_visibility', 'homepage' ); $is_homepage = is_front_page() || is_home(); // visibility check if ( $visibility === 'homepage' && ! $is_homepage ) { return; } $topbar_enabled = get_theme_mod( 'ocean_top_bar', true ); // If topbar is disabled, force fallback to header if ( ! $topbar_enabled ) { $position = 'above_header'; } // inject above top bar if ( $position === 'above_top_bar' ) { add_action( 'ocean_before_top_bar', 'oceanwp_accessible_header_media_render', 5 ); } // inject above header if ( $position === 'above_header' ) { add_action( 'ocean_before_header', 'oceanwp_accessible_header_media_render', 5 ); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium264.web-hosting.com
Server IP: 69.57.162.13
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium264.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 73.71 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
No
pkexec:
No
git:
Yes
User Info
Username: kidscntx
User ID (UID): 1154
Group ID (GID): 1112
Script Owner UID: 1154
Current Dir Owner: 1154