0byt3m1n1-V2
Path:
/
home
/
yvffpqmy
/
dataharbor.africa
/
wp-content
/
themes
/
blo
/
core
/
hooks
/
[
Home
]
File: blog.php
<?php if (!defined('ABSPATH')) die('Direct access forbidden.'); /** * hooks for wp blog part */ // if there is no excerpt, sets a defult placeholder // ---------------------------------------------------------------------------------------- function blo_excerpt( $words = 20, $more = 'BUTTON' ) { if($more == 'BUTTON'){ $more = '<a class="btn btn-primary">'.esc_html__('read more', 'blo').'</a>'; } $excerpt = get_the_excerpt(); $trimmed_content = wp_trim_words( $excerpt, $words, $more ); echo blo_kses( $trimmed_content ); } // change textarea position in comment form // ---------------------------------------------------------------------------------------- function blo_move_comment_textarea_to_bottom( $fields ) { $comment_field = $fields[ 'comment' ]; unset( $fields[ 'comment' ] ); $fields[ 'comment' ] = $comment_field; return $fields; } add_filter( 'comment_form_fields', 'blo_move_comment_textarea_to_bottom' ); // change textarea position in comment form // ---------------------------------------------------------------------------------------- function blo_search_form( $form ) { $form = ' <form method="get" action="' . esc_url( home_url( '/' ) ) . '" class="blo-serach xs-search-group"> <div class="input-group"> <input type="search" class="form-control" name="s" placeholder="' .esc_attr__( 'Search', 'blo' ) . '" value="' . get_search_query() . '"> <button class="input-group-btn search-button"><i class="fa fa-search"></i></button> </div> </form>'; return $form; } add_filter( 'get_search_form', 'blo_search_form' ); function blo_body_classes( $classes ) { if ( is_active_sidebar( 'sidebar-1' ) ) { $classes[] = 'sidebar-active'; }else{ $classes[] = 'sidebar-inactive'; } $box_class = blo_option('general_body_box_layout'); if(isset($box_class['style'])){ if($box_class['style']=='yes'){ $classes[] = 'body-box-layout'; } } return $classes; } add_filter( 'body_class','blo_body_classes' );
©
2018.