: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace Smush\Core\Parser;
class Placeholder_Replacement {
private $placeholders = array();
public function __construct() {
$this->parser = new Parser();
public function add_placeholders( $markup, $blocks ) {
foreach ( $blocks as $block ) {
$this->placeholders[ $key ] = $block;
$markup = str_replace( $block, $key, $markup );
public function remove_placeholders( $markup ) {
foreach ( $this->placeholders as $key => $original ) {
$markup = str_replace( $key, $original, $markup );
unset( $this->placeholders[ $key ] );