';
ConvoHub_Admin_UI::section_close();
ConvoHub_Admin_UI::section_open(
array(
'id' => 'cvh-webhook',
'title' => __( 'Webhook', 'convohub' ),
'help' => 'webhook-overview',
'description' => __( 'Tells this site about new messages and conversation changes. Events are signed and processed once.', 'convohub' ),
)
);
?>
render_disconnect();
}//end if
ConvoHub_Admin_UI::panel_close();
}
/**
* What this site is connected to, with the connection test.
*
* @param array $settings Plugin settings.
* @param string $method key or token.
*/
private function render_connection_details( array $settings, $method ) {
$name = '' !== $settings['account_name']
? $settings['account_name']
/* translators: %d: ConvoHub account number. */
: sprintf( __( 'Account #%d', 'convohub' ), (int) $settings['account_id'] );
ConvoHub_Admin_UI::section_open(
array(
'id' => 'cvh-connection',
'title' => __( 'Connection', 'convohub' ),
'description' => __( 'The ConvoHub account this site uses. To use another, disconnect and connect with its key.', 'convohub' ),
)
);
echo '
';
echo '
' . esc_html__( 'Account', 'convohub' ) . '
' . esc_html( $name ) . '
';
if ( 'key' === $method ) {
if ( '' !== $settings['connected_as'] ) {
echo '
';
?>
'cvh-disconnect',
'title' => __( 'Disconnect', 'convohub' ),
'description' => __( 'Stop using this ConvoHub account on this site.', 'convohub' ),
)
);
?>
$default,
'1' => __( 'Yes', 'convohub' ),
'0' => __( 'No', 'convohub' ),
);
ConvoHub_Admin_UI::panel_open();
ConvoHub_Admin_UI::section_open(
array(
'id' => 'cvh-inbox',
'title' => __( 'Website inbox', 'convohub' ),
'help' => 'allowed-domains',
'description' => __( 'The inbox that powers the chat widget.', 'convohub' ),
)
);
?>
Customize, or Styles in the Site Editor) if you still need it, then dismiss this notice.', 'convohub' ) );
ConvoHub_Admin_UI::code_block( 'convohub-retired-css', $retired );
printf(
'',
esc_url( admin_url( 'admin-post.php' ) ),
esc_attr( ConvoHub_Settings::DISMISS_ACTION ),
wp_nonce_field( ConvoHub_Settings::DISMISS_ACTION, '_wpnonce', true, false ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Core escapes it.
esc_html__( 'Dismiss', 'convohub' )
);
}
ConvoHub_Admin_UI::panel_open();
ConvoHub_Admin_UI::section_open(
array(
'id' => 'cvh-leads-inbox',
'title' => __( 'Destination', 'convohub' ),
'description' => __( 'Each submission creates a contact and a conversation in an API inbox.', 'convohub' ),
)
);
?>
'cvh-add-form',
'title' => __( 'Add the form to a page', 'convohub' ),
'description' => __( 'Use the "ConvoHub Lead Form" block, or paste this shortcode.', 'convohub' ),
)
);
ConvoHub_Admin_UI::code_block( 'convohub-shortcode', '[convohub_form heading="Contact us" button="Send"]' );
ConvoHub_Admin_UI::section_close();
ConvoHub_Admin_UI::panel_close();
?>