<?php
/**
 * The about-settings-specific functionality of the plugin.
 *
 * Defines the plugin name, version, and two examples hooks for how to
 * enqueue the about-settings-specific stylesheet and JavaScript.
 *
 * @package    better-by-default
 * @author     Multidots <info@multidots.com>
 */

namespace BetterByDefault\Inc\Setting_Fields;

use BetterByDefault\Inc\Traits\Singleton;

/**
 * About_Settings class file.
 */
class About_Settings {

	use Singleton;

	/**
	 * The ID of this plugin.
	 *
	 * @since    1.0.0
	 * @access   private
	 * @var      string    $plugin_name    The ID of this plugin.
	 */
	private $plugin_name;

	/**
	 * The version of this plugin.
	 *
	 * @since    1.0.0
	 * @access   private
	 * @var      string    $version    The current version of this plugin.
	 */
	private $version;

	/**
	 * Initialize the class and set its properties.
	 *
	 * @since    1.0.0
	 */
	public function __construct() {
	}

	/**
	 * Function is used add fields.
	 */
	public function better_by_default_about_page_init() {

		add_settings_field(
			'about_page', // id.
			'', // title.
			array( $this, 'render_html' ), // callback.
			'better-by-default-setting-page', // page.
			'better_by_default_setting_section', // section.
		);
	}

	/**
	 * Render About page html
	 */
	public function render_html() {
		?>
		<tr class="better-by-default-toggle better-by-default-about-page">
		<td>
		<div class="about-md">
		<figure class="about-md__logo">
			<img src="<?php echo esc_url( BETTER_BY_DEFAULT_URL . 'assets/src/images/mdinc-logo.svg' ); //phpcs:ignore ?>" alt="<?php esc_attr_e( 'Multidots', 'better-by-default' ); ?>">
		</figure>
		<div class="md-info">
			<p><?php esc_html_e( 'Multidots is an enterprise web agency specializing in WordPress since 2009. We help brands build, migrate, and scale complex websites and digital platforms on WordPress and WooCommerce.', 'better-by-default' ); ?></p>
			<p><?php
			echo wp_kses_post(
				sprintf(
					/* translators: %1$s: opening strong tag, %2$s: closing strong tag */
					__( 'As a %1$sWordPress VIP Gold Partner%2$s and one of the %1$stop contributors to WordPress globally%2$s, our team brings enterprise-grade engineering, security, and performance to every build. We\'ve delivered 500+ websites and 300+ platform migrations for organizations that need their web presence to scale.', 'better-by-default' ),
					'<strong>',
					'</strong>'
				)
			);
			?></p>
			<h3 class="about-md__subheading"><?php esc_html_e( 'Need something custom?', 'better-by-default' ); ?></h3>
			<p><?php esc_html_e( 'If you\'re looking for a custom plugin, a tailored feature, or a fully custom enterprise solution built for your brand, our team can help. From custom WordPress and WooCommerce development to large-scale platform builds, we partner with you to turn your requirements into reality.', 'better-by-default' ); ?></p>
			<a href="https://www.multidots.com/contact/" class="contactus-btn button-primary" target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Talk to Our Experts →', 'better-by-default' ); ?></a>
		</div>
		</div>
		</td>
		</tr>
		<?php
	}
}
