Skip to content

Commit

Permalink
changed : in parts/header-main.php, echo hu_site_title() has been rep…
Browse files Browse the repository at this point in the history
…laced by hu_print_logo_or_title(). The function hu_site_title() has been kept in the theme to ensure back compatibility for child theme users

removed es_ES translation files, more than 95% translated on wp.org

v3.3.0 build 2
  • Loading branch information
nikeo committed Dec 18, 2016
1 parent d2b1923 commit c4b237b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2,311 deletions.
49 changes: 32 additions & 17 deletions functions/init-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function hu_render_header_image( $_header_img_src = null ) {
/* Site name/logo and tagline callbacks
/* ------------------------------------ */
if ( ! function_exists( 'hu_print_logo_or_title' ) ) {
function hu_print_logo_or_title() {
function hu_print_logo_or_title( $echo = true ) {
ob_start();
if ( hu_is_home() ) {
?>
Expand All @@ -205,28 +205,43 @@ function hu_print_logo_or_title() {
}
$html = ob_get_contents();
if ($html) ob_end_clean();
echo apply_filters('hu_logo_title', $html );
if ( $echo )
echo apply_filters('hu_logo_title', $html );
else
return apply_filters('hu_logo_title', $html );
}
}

function hu_do_render_logo_site_tite() {
// Text or image?
// Since v3.2.4, uses the WP 'custom_logo' theme mod option. Set with a filter.
if ( apply_filters( 'hu_display_header_logo', hu_is_checked('display-header-logo') && false != hu_get_img_src_from_option( 'custom-logo' ) ) ) {
$logo_src = apply_filters( 'hu_header_logo_src' , hu_get_img_src_from_option( 'custom-logo' ) );
$logo_title = '<img src="'. $logo_src . '" alt="' .get_bloginfo('name'). '">';
} else {
$logo_title = get_bloginfo('name');
}
if ( ! function_exists( 'hu_do_render_logo_site_tite' ) ) {
function hu_do_render_logo_site_tite() {
// Text or image?
// Since v3.2.4, uses the WP 'custom_logo' theme mod option. Set with a filter.
if ( apply_filters( 'hu_display_header_logo', hu_is_checked('display-header-logo') && false != hu_get_img_src_from_option( 'custom-logo' ) ) ) {
$logo_src = apply_filters( 'hu_header_logo_src' , hu_get_img_src_from_option( 'custom-logo' ) );
$logo_title = '<img src="'. $logo_src . '" alt="' .get_bloginfo('name'). '">';
} else {
$logo_title = get_bloginfo('name');
}

printf( '<a class="custom-logo-link" href="%1$s" rel="home">%2$s</a>',
home_url('/'),
$logo_title
);
printf( '<a class="custom-logo-link" href="%1$s" rel="home">%2$s</a>',
home_url('/'),
$logo_title
);
}
}

function hu_render_blog_description() {
echo bloginfo( 'description' );
if ( ! function_exists( 'hu_render_blog_description' ) ) {
function hu_render_blog_description() {
echo bloginfo( 'description' );
}
}

/* Retro compat function for child theme users
/* ------------------------------------ */
if ( ! function_exists( 'hu_site_title' ) ) {
function hu_site_title() {
return hu_print_logo_or_title( false );
}
}

/* Page title
Expand Down
Binary file removed languages/es_ES.mo
Binary file not shown.
Loading

0 comments on commit c4b237b

Please sign in to comment.