wpcf7_sendinblue_editor_panels() │ CF7 1.0

Builds the editor panel for the sendinblue property.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wpcf7_sendinblue_editor_panels( $panels );
$panels(обязательный)
.

Код wpcf7_sendinblue_editor_panels() CF7 6.2.4.1

function wpcf7_sendinblue_editor_panels( $panels ) {
	$service = WPCF7_Sendinblue::get_instance();

	if ( ! $service->is_active() ) {
		return $panels;
	}

	$editor_panel = static function () {
		$formatter = new WPCF7_HTMLFormatter();

		$formatter->append_start_tag( 'h2' );

		$formatter->append_preformatted(
			esc_html( __( 'Brevo', 'contact-form-7' ) )
		);

		$formatter->end_tag( 'h2' );

		$formatter->append_start_tag( 'fieldset' );

		$formatter->append_start_tag( 'legend' );

		$formatter->append_preformatted( sprintf(
			/* translators: %s: URL to support page about Brevo integration */
			__( 'You can set up the Brevo integration here. For details, see <a href="%s">Brevo integration</a>.', 'contact-form-7' ),
			'https://contactform7.com/sendinblue-integration/'
		) );

		$formatter->end_tag( 'legend' );

		$formatter->append_start_tag( 'table', array(
			'id' => 'wpcf7-sendinblue-editor-table',
			'class' => 'form-table',
			'role' => 'presentation',
		) );

		$formatter->call_user_func( static function () {
			wpcf7_sendinblue_editor_table();
		} );

		$formatter->end_tag( 'table' );

		$formatter->print();
	};

	$panels += array(
		'sendinblue-panel' => array(
			'title' => __( 'Brevo', 'contact-form-7' ),
			'callback' => $editor_panel,
		),
	);

	return $panels;
}