: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @package Smush\App\Pages
namespace Smush\App\Pages;
use Smush\App\Abstract_Page;
use Smush\App\Interface_Page;
if ( ! defined( 'WPINC' ) ) {
class Integrations extends Abstract_Page implements Interface_Page {
* Function triggered when the page is loaded before render any content.
public function on_load() {
add_action( 'smush_setting_column_right_inside', array( $this, 'settings_desc' ), 10, 2 );
public function register_meta_boxes() {
$class = WP_Smush::is_pro() ? 'smush-integrations-wrapper wp-smush-pro' : 'smush-integrations-wrapper';
__( 'Integrations', 'wp-smushit' ),
array( $this, 'integrations_meta_box' ),
array( $this, 'common_meta_box_footer' ),
'box_class' => "sui-box {$class}",
'box_content_class' => 'sui-box-body sui-upsell-items',
* Common footer meta box.
public function common_meta_box_footer() {
$this->view( 'meta-box-footer', array(), 'common' );
* Free and pro version settings are shown in same section. For free users, pro settings won't be shown.
* To print full size smush, resize and backup in group, we hook at `smush_setting_column_right_end`.
public function integrations_meta_box() {
'basic_features' => Settings::$basic_features,
'is_pro' => WP_Smush::is_pro(),
'integration_group' => $this->settings->get_integrations_fields(),
'settings' => $this->settings->get(),
* Show additional descriptions for settings.
* @param string $setting_key Setting key.
public function settings_desc( $setting_key = '' ) {
if ( empty( $setting_key ) || 's3' !== $setting_key ) {
<span class="sui-description sui-toggle-description" id="s3-desc">
<?php esc_html_e( 'Note: For this process to happen automatically you need automatic smushing enabled.', 'wp-smushit' ); ?>