HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/l/e/s/lesanew/www/wp-content/plugins/neobeat-core/inc/fonts/dashboard/admin/fonts-options.php
<?php

if ( ! function_exists( 'neobeat_core_add_fonts_options' ) ) {
	/**
	 * Function that add options for this module
	 */
	function neobeat_core_add_fonts_options() {
		$qode_framework = qode_framework_get_framework_root();

		$page = $qode_framework->add_options_page(
			array(
				'scope'       => NEOBEAT_CORE_OPTIONS_NAME,
				'type'        => 'admin',
				'slug'        => 'fonts',
				'title'       => esc_html__( 'Fonts', 'neobeat-core' ),
				'description' => esc_html__( 'Global Fonts Options', 'neobeat-core' ),
				'icon'        => 'fa fa-cog'
			)
		);

		if ( $page ) {
			$page->add_field_element(
				array(
					'field_type'    => 'yesno',
					'name'          => 'qodef_enable_google_fonts',
					'title'         => esc_html__( 'Enable Google Fonts', 'neobeat-core' ),
					'default_value' => 'yes',
					'args'          => array(
						'custom_class' => 'qodef-enable-google-fonts'
					)
				)
			);

			$google_fonts_section = $page->add_section_element(
				array(
					'name'       => 'qodef_google_fonts_section',
					'title'      => esc_html__( 'Google Fonts Options', 'neobeat-core' ),
					'dependency' => array(
						'show' => array(
							'qodef_enable_google_fonts' => array(
								'values'        => 'yes',
								'default_value' => ''
							)
						)
					)
				)
			);

			$page_repeater = $google_fonts_section->add_repeater_element(
				array(
					'name'        => 'qodef_choose_google_fonts',
					'title'       => esc_html__( 'Google Fonts to Include', 'neobeat-core' ),
					'description' => esc_html__( 'Choose Google Fonts which you want to use on your website', 'neobeat-core' ),
					'button_text' => esc_html__( 'Add New Google Font', 'neobeat-core' )
				)
			);

			$page_repeater->add_field_element( array(
				'field_type'  => 'googlefont',
				'name'        => 'qodef_choose_google_font',
				'title'       => esc_html__( 'Google Font', 'neobeat-core' ),
				'description' => esc_html__( 'Choose Google Font', 'neobeat-core' ),
				'args'        => array(
					'include' => 'google-fonts'
				)
			) );

			$google_fonts_section->add_field_element(
				array(
					'field_type'  => 'checkbox',
					'name'        => 'qodef_google_fonts_weight',
					'title'       => esc_html__( 'Google Fonts Weight', 'neobeat-core' ),
					'description' => esc_html__( 'Choose a default Google Fonts weights for your website. Impact on page load time', 'neobeat-core' ),
					'options'     => array(
						'100'  => esc_html__( '100 Thin', 'neobeat-core' ),
						'100i' => esc_html__( '100 Thin Italic', 'neobeat-core' ),
						'200'  => esc_html__( '200 Extra-Light', 'neobeat-core' ),
						'200i' => esc_html__( '200 Extra-Light Italic', 'neobeat-core' ),
						'300'  => esc_html__( '300 Light', 'neobeat-core' ),
						'300i' => esc_html__( '300 Light Italic', 'neobeat-core' ),
						'400'  => esc_html__( '400 Regular', 'neobeat-core' ),
						'400i' => esc_html__( '400 Regular Italic', 'neobeat-core' ),
						'500'  => esc_html__( '500 Medium', 'neobeat-core' ),
						'500i' => esc_html__( '500 Medium Italic', 'neobeat-core' ),
						'600'  => esc_html__( '600 Semi-Bold', 'neobeat-core' ),
						'600i' => esc_html__( '600 Semi-Bold Italic', 'neobeat-core' ),
						'700'  => esc_html__( '700 Bold', 'neobeat-core' ),
						'700i' => esc_html__( '700 Bold Italic', 'neobeat-core' ),
						'800'  => esc_html__( '800 Extra-Bold', 'neobeat-core' ),
						'800i' => esc_html__( '800 Extra-Bold Italic', 'neobeat-core' ),
						'900'  => esc_html__( '900 Ultra-Bold', 'neobeat-core' ),
						'900i' => esc_html__( '900 Ultra-Bold Italic', 'neobeat-core' )
					)
				)
			);

			$google_fonts_section->add_field_element(
				array(
					'field_type'  => 'checkbox',
					'name'        => 'qodef_google_fonts_subset',
					'title'       => esc_html__( 'Google Fonts Style', 'neobeat-core' ),
					'description' => esc_html__( 'Choose a default Google Fonts style for your website. Impact on page load time', 'neobeat-core' ),
					'options'     => array(
						'latin'        => esc_html__( 'Latin', 'neobeat-core' ),
						'latin-ext'    => esc_html__( 'Latin Extended', 'neobeat-core' ),
						'cyrillic'     => esc_html__( 'Cyrillic', 'neobeat-core' ),
						'cyrillic-ext' => esc_html__( 'Cyrillic Extended', 'neobeat-core' ),
						'greek'        => esc_html__( 'Greek', 'neobeat-core' ),
						'greek-ext'    => esc_html__( 'Greek Extended', 'neobeat-core' ),
						'vietnamese'   => esc_html__( 'Vietnamese', 'neobeat-core' )
					)
				)
			);

			$page_repeater = $page->add_repeater_element(
				array(
					'name'        => 'qodef_custom_fonts',
					'title'       => esc_html__( 'Custom Fonts', 'neobeat-core' ),
					'description' => esc_html__( 'Add custom fonts', 'neobeat-core' ),
					'button_text' => esc_html__( 'Add New Custom Font', 'neobeat-core' )
				)
			);

			$page_repeater->add_field_element( array(
				'field_type' => 'file',
				'name'       => 'qodef_custom_font_ttf',
				'title'      => esc_html__( 'Custom Font TTF', 'neobeat-core' ),
				'args'       => array(
					'allowed_type' => 'application/octet-stream'
				)
			) );

			$page_repeater->add_field_element( array(
				'field_type' => 'file',
				'name'       => 'qodef_custom_font_otf',
				'title'      => esc_html__( 'Custom Font OTF', 'neobeat-core' ),
				'args'       => array(
					'allowed_type' => 'application/octet-stream'
				)
			) );

			$page_repeater->add_field_element( array(
				'field_type' => 'file',
				'name'       => 'qodef_custom_font_woff',
				'title'      => esc_html__( 'Custom Font WOFF', 'neobeat-core' ),
				'args'       => array(
					'allowed_type' => 'application/octet-stream'
				)
			) );

			$page_repeater->add_field_element( array(
				'field_type' => 'file',
				'name'       => 'qodef_custom_font_woff2',
				'title'      => esc_html__( 'Custom Font WOFF2', 'neobeat-core' ),
				'args'       => array(
					'allowed_type' => 'application/octet-stream'
				)
			) );

			$page_repeater->add_field_element( array(
				'field_type' => 'text',
				'name'       => 'qodef_custom_font_name',
				'title'      => esc_html__( 'Custom Font Name', 'neobeat-core' ),
			) );

			// Hook to include additional options after module options
			do_action( 'neobeat_core_action_after_page_fonts_options_map', $page );
		}
	}

	add_action( 'neobeat_core_action_default_options_init', 'neobeat_core_add_fonts_options', neobeat_core_get_admin_options_map_position( 'fonts' ) );
}