Noptin_Inpost::maybe_hide_block( string|null $pre_render, array $block )

Hides a block


Parameters Parameters

$pre_render

(string|null) (Required) The pre-rendered content.

$block

(array) (Required) The block being rendered.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class-noptin-inpost.php

	public function maybe_hide_block( $pre_render, $block ) {

		if ( ! is_admin() && 'noptin/email-optin' === $block['blockName'] && ! noptin_should_show_optins() ) {
			return '';
		}

		return $pre_render;

	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.8Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation