Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -1,9 +1,13 @@
<?php
namespace Yoast\WP\SEO\Integrations\Blocks;
namespace Yoast\WP\SEO\Premium\Integrations\Blocks;
use Yoast\WP\SEO\Integrations\Blocks\Dynamic_Block;
/**
* Estimated_Reading_Time_Block class.
*
* @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
*/
class Estimated_Reading_Time_Block extends Dynamic_Block {
@@ -74,6 +78,13 @@ class Estimated_Reading_Time_Block extends Dynamic_Block {
* @return string The block output.
*/
public function present( $attributes, $content = '' ) {
$content = \preg_replace(
'/<span class="yoast-reading-time__time-unit">.*<\/span>/',
'<span class="yoast-reading-time__time-unit"> ' . \sprintf( \_n( 'minute', 'minutes', $attributes['estimatedReadingTime'], 'wordpress-seo-premium' ), $attributes['estimatedReadingTime'] ) . '</span>',
$content,
1
);
if ( $attributes['showIcon'] ) {
// Replace 15.7 icon placeholder.
$content = \preg_replace(

View File

@@ -1,6 +1,6 @@
<?php
namespace Yoast\WP\SEO\Integrations\Blocks;
namespace Yoast\WP\SEO\Premium\Integrations\Blocks;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
use Yoast\WP\SEO\Integrations\Integration_Interface;