Skip to content

Commit

Permalink
Fix: allow Timber\PostExcerpt::read_more to accept bool value (#2937)
Browse files Browse the repository at this point in the history
* Fix: allow Timber\PostExcerpt::read_more to accept bool value

port of  #2578

* Update src/PostExcerpt.php

Co-authored-by: Lukas Gächter <lukas.gaechter@mind.ch>

---------

Co-authored-by: Lukas Gächter <lukas.gaechter@mind.ch>
  • Loading branch information
Levdbas and gchtr committed May 15, 2024
1 parent e6cdf7e commit 85e2a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PostExcerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class PostExcerpt
/**
* Read more text.
*
* @var string
* @var string|bool
*/
protected $read_more = 'Read More';

Expand Down Expand Up @@ -299,7 +299,7 @@ public function force($force = true)
* <p>{{ post.excerpt.read_more('Learn more') }}</p>
* ```
*
* @param string $text Text for the link. Default 'Read More'.
* @param string|bool $text Text for the link. Default 'Read More'.
*
* @return PostExcerpt
*/
Expand Down

0 comments on commit 85e2a32

Please sign in to comment.