Skip to content

Text length should be localizable#6

Closed
miya0001 wants to merge 24 commits intomasterfrom
text-length
Closed

Text length should be localizable#6
miya0001 wants to merge 24 commits intomasterfrom
text-length

Conversation

@miya0001
Copy link
Copy Markdown
Collaborator

@miya0001 miya0001 commented Jul 3, 2018

Related #2

@miya0001 miya0001 changed the title Allows to localize excerpt length Text length should be localizable Jul 3, 2018
* @param int $number The number of words. Default 55.
*/
$excerpt_length = apply_filters( 'excerpt_length', 55 );
$excerpt_length = apply_filters( 'excerpt_length', intval( $localized_excerpt_length ) );
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


/**
* Return true if `mb_*()` functions exist.
*/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント薄いですが、このファイルに関しては他の関数もコメント少ないですね…w

/**
* Return true if `mb_*()` functions exist.
*/
function _mbfunctions_exist() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この関数、まだ使われてないようですが、あとから使われる予定でしょうか?

memo: たぶん tests_add_filter() で追加

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あー、そうなんです。Ozzさんという人と話したときに function_exists() はコストが高いので結果をキャッシュしたほうがいいよねみたいな話になって、こういう実装どうなん?みたいな話をしたのでメモ代わりと言うか。w

@miya0001
Copy link
Copy Markdown
Collaborator Author

miya0001 commented Jul 4, 2019

@miya0001 miya0001 closed this Jul 4, 2019
@miya0001 miya0001 deleted the text-length branch July 4, 2019 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants