: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php if ( ! defined( 'ABSPATH' ) ) exit;
public function __construct()
if ( ! $this->isNFAdminPage() ) {
if ( array_key_exists( 'nf-dismiss-promo-notice', $_REQUEST ) ) {
public function isNFAdminPage()
if ( ! \array_key_exists( 'page', $_REQUEST ) ) {
strpos( 'nf', $_REQUEST[ 'page' ] ) === false &&
strpos( 'ninja-forms', $_REQUEST[ 'page' ] ) === false
* Check if we should show the slim promo
public function maybeShowSlimPromo()
if ( apply_filters( 'ninja_forms_disable_marketing', false ) ) {
$nf_settings = get_option( 'ninja_forms_settings' );
isset( $nf_settings[ 'disable_admin_notices' ] ) &&
$nf_settings[ 'disable_admin_notices' ] == 1
if ( get_transient('ninja_forms_disable_slim_promo') ) {
* Set the ninja_forms_disable_slim_promo transient
public function setTransient()
set_transient('ninja_forms_disable_slim_promo', 1, DAY_IN_SECONDS * 90);
* Echo the html for the notice
public function getNoticeHtml()
echo '<div class="nf-notice-promo">
<a href="https://ninjaforms.com/pricing/?utm_source=Ninja+Forms+Plugin&utm_medium=Admin+Banner&utm_campaign=Membership+Promo" target="_blank">
' . esc_html__("Tap into even more features with 50% off any Ninja Forms membership!", "ninja-forms") . '
<a href="?page=ninja-forms&nf-dismiss-promo-notice">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="4">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
<span class="sr-only">Dismiss</span>