New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.9 #236

Merged
merged 16 commits into from Oct 1, 2015
Commits
Jump to file or symbol
Failed to load files and symbols.
+5 −5
Diff settings

Always

Just for now

Viewing a subset of changes. View all

[ 不具合修正 ] head description にHTMLタグや改行がある場合に除去

  • Loading branch information...
kurudrive committed Sep 30, 2015
commit 30270f9aadf840b8204a1cceb3955fbc933c2c09
View
@@ -353,10 +353,10 @@ function getHeadDescription() {
if ( ! $post->description ) {
$metadescription = sprintf(__('About %s', 'biz-vektor'),single_cat_title()).get_bloginfo('name').' '.get_bloginfo('description');
} else {
$metadescription = esc_html( $post->description );
$metadescription = $post->description;
}
} else if (is_tag()) {
$metadescription = strip_tags(tag_description());
$metadescription = tag_description();
$metadescription = str_replace(array("\r\n","\r","\n"), '', $metadescription); // delete br
if ( ! $metadescription ) {
$metadescription = sprintf(__('About %s', 'biz-vektor'),single_tag_title()).get_bloginfo('name').' '.get_bloginfo('description');
@@ -383,10 +383,9 @@ function getHeadDescription() {
$metaExcerpt = $post->post_excerpt;
if ($metaExcerpt) {
// $metadescription = strip_tags($post->post_excerpt);
$metadescription = strip_tags($post->post_excerpt);
$metadescription = $post->post_excerpt;
} else {
$metadescription = mb_substr( strip_tags($post->post_content), 0, 240 ); // kill tags and trim 240 chara
$metadescription = str_replace(array("\r\n","\r","\n"), ' ', $metadescription); // delete br
}
} else {
$metadescription = get_bloginfo('description');
@@ -395,7 +394,8 @@ function getHeadDescription() {
if ( $paged != '0'){
$metadescription = '['.sprintf(__('Page of %s', 'biz-vektor' ),$paged).'] '.$metadescription;
}
$metadescription = apply_filters( 'metadescriptionCustom', $metadescription );
$metadescription = str_replace(array("\r\n","\r","\n"), '', $metadescription); // delete br
$metadescription = apply_filters( 'metadescriptionCustom', strip_tags($metadescription) );
return $metadescription;
}
ProTip! Use n and p to navigate between commits in a pull request.