Skip to content
Snippets Groups Projects
Commit 1d92f9ca authored by Erick Hitter's avatar Erick Hitter
Browse files

Test coverage

parent 98d83920
Branches
Tags
1 merge request!5Add block-editor support
Pipeline #4964 failed
...@@ -37,12 +37,12 @@ class Automatically_Paginate_Posts { ...@@ -37,12 +37,12 @@ class Automatically_Paginate_Posts {
/** /**
* WordPress Quicktag that creates pagination. * WordPress Quicktag that creates pagination.
*/ */
protected const QUICKTAG = '<!--nextpage-->'; const QUICKTAG = '<!--nextpage-->';
/** /**
* String length of nextpage Quicktag. * String length of nextpage Quicktag.
*/ */
protected const QUICKTAG_LENGTH = 15; const QUICKTAG_LENGTH = 15;
/** /**
* Supported post types. * Supported post types.
...@@ -546,7 +546,7 @@ class Automatically_Paginate_Posts { ...@@ -546,7 +546,7 @@ class Automatically_Paginate_Posts {
'Note that if the %1$s Quicktag is used to manually page this post, automatic paging won\'t be applied, regardless of the setting above.', 'Note that if the %1$s Quicktag is used to manually page this post, automatic paging won\'t be applied, regardless of the setting above.',
'autopaging' 'autopaging'
), ),
'<code>&lt;!--nextpage--&gt;</code>' '<code>' . htmlentities(static::QUICKTAG, ENT_QUOTES ) . '</code>'
); );
?> ?>
</p> </p>
...@@ -618,7 +618,7 @@ class Automatically_Paginate_Posts { ...@@ -618,7 +618,7 @@ class Automatically_Paginate_Posts {
if ( if (
preg_match( preg_match(
'#<!--nextpage-->#i', '#' . static::QUICKTAG . '#i',
$the_post->post_content $the_post->post_content
) )
) { ) {
...@@ -768,7 +768,7 @@ class Automatically_Paginate_Posts { ...@@ -768,7 +768,7 @@ class Automatically_Paginate_Posts {
$frequency $frequency
) )
) { ) {
$content[ $key ] .= '<!--nextpage-->'; $content[ $key ] .= static::QUICKTAG;
$i++; $i++;
} }
} }
...@@ -926,7 +926,7 @@ class Automatically_Paginate_Posts { ...@@ -926,7 +926,7 @@ class Automatically_Paginate_Posts {
if ( ! $block ) { if ( ! $block ) {
$_block = parse_blocks( $_block = parse_blocks(
'<!-- wp:nextpage --> '<!-- wp:nextpage -->
<!--nextpage--> ' . static::QUICKTAG . '
<!-- /wp:nextpage -->' <!-- /wp:nextpage -->'
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment