HEX
Server: nginx/1.26.1
System: Linux main-vm 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: root (0)
PHP: 8.2.19
Disabled: NONE
Upload Files
File: /var/www/bellecouture/wp-content/themes/yena/framework/functions/theme-hooks.php
<?php
/**
 * This file includes helper functions used throughout the theme.
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}

add_filter( 'body_class', 'yena_body_classes' );

/**
 * Head
 */
add_action('wp_head', 'yena_add_meta_into_head_tag', 100 );
add_action('yena/action/head', 'yena_add_extra_data_into_head');

add_action('yena/action/before_outer_wrap', 'yena_add_pageloader_icon', 1);

/**
 * Header
 */
add_action( 'yena/action/header', 'yena_render_header', 10 );


/**
 * Page Header
 */
add_action( 'yena/action/page_header', 'yena_render_page_header', 10 );


/**
 * Sidebar
 */


$site_layout = yena_get_site_layout();

if($site_layout == 'col-2cr' || $site_layout == 'col-2cr-l'){
    add_action( 'yena/action/after_primary', 'yena_render_sidebar', 10 );
}
else{
    add_action( 'yena/action/before_primary', 'yena_render_sidebar', 10 );
}


/**
 * Footer
 */
add_action( 'yena/action/footer', 'yena_render_footer', 10 );

add_action( 'yena/action/after_outer_wrap', 'yena_render_footer_searchform_overlay', 10 );
add_action( 'yena/action/after_outer_wrap', 'yena_render_footer_cartwidget_overlay', 15 );
add_action( 'yena/action/after_outer_wrap', 'yena_render_footer_newsletter_popup', 20 );
add_action( 'yena/action/after_outer_wrap', 'yena_render_footer_handheld', 25 );
add_action( 'wp_footer', 'yena_render_footer_custom_js', 100 );


add_action( 'yena/action/after_page_entry', 'yena_render_comment_for_page', 0);

/**
 * Related Posts
 */
add_action( 'yena/action/after_main', 'yena_render_related_posts' );
/**
 * FILTERS
 */

add_filter('yena/filter/get_theme_option_by_context', 'yena_override_page_title_bar_from_context', 10, 2);
add_filter('previous_post_link', 'yena_override_post_navigation_template', 10, 5);
add_filter('next_post_link', 'yena_override_post_navigation_template', 10, 5);

add_filter('yena/filter/sidebar_primary_name', 'yena_override_sidebar_name_from_context');

add_filter('wp_get_attachment_image_attributes', 'yena_add_lazyload_to_image_tag');

add_filter('excerpt_length', 'yena_change_excerpt_length');

add_filter('yena/filter/show_page_title', 'yena_filter_page_title', 10, 1);
add_filter('yena/filter/show_breadcrumbs', 'yena_filter_show_breadcrumbs', 10, 1);

add_filter('register_taxonomy_args', 'yena_override_portfolio_tax_type_args', 99, 2);
add_filter('register_post_type_args', 'yena_override_portfolio_content_type_args', 99, 2);

add_filter( 'pre_get_posts', 'yena_setup_post_per_page_for_portfolio');

add_action('wp_head', 'yena_render_custom_block');