Page no: Y12
OverviewThis function allows to lengthen the excerpt to … characters.
|
[ |
Explode a paragraph into sentences in PHPI have been using
to split a paragraph into sentences. However this doen’t cover sentences that have been concluded with different punctuation such as ! ? : ; Is there a way of using an array as a delimiter instead of a single character? Alternativly is there another neat way of splitting using various punctuation? I tried
hopefully but it didn’t work… You can use |
Code: |
This code works, but can’t help in our situation, because it explode the paragraph on sentences. We need to cut it on symbols. This is not a real problem, because using it we have to count every single sentences and then to decide how much sentences to add into the excerpt. This is a very slow process, which is a memory consuming. On our syndication tools and many posts can lead to memory issues and a lot of time for loading the page. We always need the best and fast problem. So we made a custom Regex code.
|
|
Bugs/EnhancementsEmpty ExcerptsPrio: 22 Status: In Trello problem1: The generate excerpt function generates empty excerpts. problem2: The function cannot be executed multiple times. “No posts found or function already applied.” But it should be possible; for example when you change the post. Select: Acemaxx Sept 2016 to End Date Avoid that excerpts are empty. The function only copies the beginning of the text. Hence it must be possible to execute it multiple times.
problemThe first problem is fixed. The second one is done, too. But it will work only if the new excerpt is different than the old one.
|
Executing Function Multiple Times |
Line BreakPrio: 15 Status: In Trello problem When there is a line break, then the excerpt is put directly after the previous sentence without a space or a line break). The excerpts does not use line breaks, hence we must use a space.
Version of changes 3.6, implemented on all.
|
New Exceprt Beginning |
Wrong Statistics of Execution
|
Longer Excerpt Function |
TestResults after run Make Excerpts Longer Function. |
See more for