classes(); } add_filter( 'tempo_front_page_section_length', 'cronus_front_page_section_length' ); /** * Singular Post / Page Section Length */ function cronus_singular_section_length( $length, $post_id ) { if( empty( $post_id ) ) return; $post = get_post( $post_id ); $layout = new tempo_layout( $post -> post_type ); return $layout -> classes(); } add_filter( 'tempo_page_section_length', 'cronus_singular_section_length', 10, 2 ); add_filter( 'tempo_single_section_length', 'cronus_singular_section_length', 10, 2 ); /** * Loop Section Length + Blog View Class */ function cronus_loop_section_length( $layout ) { $layout = new tempo_layout(); return esc_attr( $layout -> classes() . ' tempo-blog-' . tempo_options::get( 'blog-view' ) ); } add_filter( 'tempo_loop_section_length', 'cronus_loop_section_length' ); ///// SIDEBARS ACTIONS ///// /** * Left Sidebars */ function cronus_left_sidebar( $slug, $name ) { global $tempo_layout; if( is_404() ) return; /** * get sidebar */ $tempo_layout = new tempo_layout( $name ); if( is_singular() && !( is_front_page() || is_home() ) ){ global $post; $tempo_layout = new tempo_layout( $name ); } // left sidebar $tempo_layout -> sidebar( 'left' ); } add_action( 'get_template_part_templates/section/before', 'cronus_left_sidebar', 10, 2 ); /** * Right Sidebars */ function cronus_right_sidebar( $slug, $name ) { global $tempo_layout; if( is_404() ) return; /** * get sidebar */ $tempo_layout = new tempo_layout( $name ); if( is_singular() && !( is_front_page() || is_home() ) ){ global $post; $tempo_layout = new tempo_layout( $name ); } // right sidebar $tempo_layout -> sidebar( 'right' ); } add_action( 'get_template_part_templates/section/after', 'cronus_right_sidebar', 10, 2 ); } { //// HEADER /** * Disable default parent custom style */ function cronus_not_has_header() { return !tempo_has_header(); } add_filter( 'tempo_site_identity_style', 'cronus_not_has_header' ); add_filter( 'tempo_menu_style', 'cronus_not_has_header' ); function cronus_customize_js_files( $files ) { $files[ 'cronus-customize' ] = get_stylesheet_directory_uri() . '/media/admin/js/customize.js'; return $files; } add_filter( 'tempo_customize_js_files', 'cronus_customize_js_files' ); } /** * Comments Submit button Classes */ function cronus_submi_comment_class( $classes ) { return 'tempo-btn btn-hover-empty icon-left'; } add_filter( 'tempo_submi_comment_class', 'cronus_submi_comment_class' ); /** * Footer Social */ function cronus_footer_social( $slug, $name ) { tempo_get_template_part( 'templates/footer/prepend-social' ); } add_action( 'get_template_part_templates/footer/prepend', 'cronus_footer_social', 10, 2 ); ?>