In wordpress Cherry framework, I am trying to edit template-general.php file functions, but it's different not able to do so. I tried to follow this link, but does not help.
Link for Cherry framework to download file structure is: cherryframework4\lib\functions\template-general.php
I am trying to override below function:
function cherry_get_site_logo( $location = 'header' ) {
$logo_class = array();
switch ( $location ) {
case 'header':
$type = cherry_get_option( 'logo-type', 'text' );
$logo_img_ids = cherry_get_option( 'logo-image-path', false );
$tag = is_front_page() ? 'h1' : 'h2';
$logo_class[] = 'site-title';
$logo_class[] = $type . '-logo';
$link_class = '';
break;
case 'footer':
$type = cherry_get_option( 'footer-logo-type', 'text' );
$logo_img_ids = cherry_get_option( 'footer-logo-image-path', false );
$tag = 'div';
$logo_class[] = 'cherry-footer-logo';
$logo_class[] = $type . '-logo';
$link_class = 'footer-logo-link';
break;
default:
$tag = 'div';
$logo_class[] = $location . '-logo';
$link_class = '';
break;
}
$logo_class = apply_filters( 'cherry_logo_classes', $logo_class, $location );
$logo_class = array_unique( $logo_class );
$logo_class = array_map( 'sanitize_html_class', $logo_class );
if ( 'image' == $type && false != $logo_img_ids ) {
$images = explode( ',', $logo_img_ids );
if ( count( $images ) > 1 ) {
$logo_content = cherry_get_retina_logo( $images );
} else {
$img = wp_get_attachment_url( $images[0] );
$logo_image_format = apply_filters(
'cherry_logo_image_format',
'<a href="%1$s" rel="home"><img src="%2$s" alt="%3$s"></a>',
$location
);
$logo_content = sprintf( $logo_image_format, home_url( '/' ), esc_url( $img ), get_bloginfo( 'title' ) );
}
} else {
$logo_content = cherry_get_site_link( $link_class );
}
$logo = $logo_content ? sprintf( '<%3$s class="%1$s">%2$s</%3$s>', join( ' ', $logo_class ), $logo_content, $tag ) : '';
return apply_filters( 'cherry_get_site_logo', $logo, $location );
}
Anyone come across this? Help me find this problem.
cherry_get_site_logo
why not just hook into that?