芝麻web文件管理V1.00
编辑当前文件:/home/projzpbv/public_html/wp-content/plugins/ninja-forms/includes/Admin/SlimPromo.php
isNFAdminPage() ) { return; } if ( array_key_exists( 'nf-dismiss-promo-notice', $_REQUEST ) ) { $this->setTransient(); } } public function isNFAdminPage() { if ( ! is_admin() ) { return false; } if ( ! \array_key_exists( 'page', $_REQUEST ) ) { return false; } if ( strpos( 'nf', $_REQUEST[ 'page' ] ) === false && strpos( 'ninja-forms', $_REQUEST[ 'page' ] ) === false ) { return false; } return true; } /** * Check if we should show the slim promo * * @return bool */ public function maybeShowSlimPromo() { if ( apply_filters( 'ninja_forms_disable_marketing', false ) ) { return false; } $nf_settings = get_option( 'ninja_forms_settings' ); if ( isset( $nf_settings[ 'disable_admin_notices' ] ) && $nf_settings[ 'disable_admin_notices' ] == 1 ) { return false; } if ( get_transient('ninja_forms_disable_slim_promo') ) { return false; } return true; } /** * Set the ninja_forms_disable_slim_promo transient * * @return Void */ public function setTransient() { set_transient('ninja_forms_disable_slim_promo', 1, DAY_IN_SECONDS * 90); } /** * Echo the html for the notice * * @return Void */ public function getNoticeHtml() { echo '
' . esc_html__("Tap into even more features with 50% off any Ninja Forms membership!", "ninja-forms") . '
Dismiss
'; } }