: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class PPW_External_Settings {
* Render UI external submenu settings page.
public function render_ui() {
$_get = wp_unslash( $_GET ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- We no need to handle nonce verfication for render UI.
$head_title = is_pro_active_and_valid_license() ? 'PPWP Pro' : 'PPWP Lite';
<div id="icon-themes" class="icon32"></div>
<?php echo esc_html__( $head_title . ': Integrations', PPW_Constants::DOMAIN ); ?>
$activated_tab = isset( $_get['tab'] ) ? $_get['tab'] : 'recaptcha';
$this->render_tabs( $activated_tab );
$this->render_content( $activated_tab );
public function get_tabs() {
'tab_name' => 'reCAPTCHA',
'tab' => 'configuration',
'tab_name' => 'Configuration',
* Render tab for external page.
* @param string $active_tab Activate tab
public function render_tabs( $active_tab ) {
$tabs = $this->get_tabs();
<h2 class="ppwp_wrap_tab_title nav-tab-wrapper">
if ( ! is_array( $tabs ) ) {
foreach ( $tabs as $tab ) {
if ( ! is_array( $tab ) ) {
if ( empty( $tab['tab'] ) || empty( $tab['tab_name'] ) ) {
<a href="?page=<?php echo esc_html( PPW_Constants::EXTERNAL_SERVICES_PREFIX ); ?>&tab=<?php echo esc_attr( $tab['tab'] ); ?>"
class="nav-tab <?php echo $active_tab === $tab['tab'] ? 'nav-tab-active' : ''; ?>"><?php esc_attr_e( $tab['tab_name'], PPW_Constants::DOMAIN ); ?></a>
* @param string $active_tab Active Tab
public function render_content( $active_tab ) {
$tabs = $this->get_tabs();
foreach ( $tabs as $tab ) {
if ( $active_tab === $tab['tab'] ) {
do_action( 'ppw_render_external_content_' . $tab['tab'] );