Submit
Path:
~
/
home
/
getwphos
/
public_html
/
pioneerasphalt
/
wp-content
/
plugins
/
hiroshi-core
/
inc
/
fonts
/
dashboard
/
admin
/
File Content:
fonts-options.php
<?php if ( ! function_exists( 'hiroshi_core_add_fonts_options' ) ) { /** * Function that add options for this module */ function hiroshi_core_add_fonts_options() { $qode_framework = qode_framework_get_framework_root(); $page = $qode_framework->add_options_page( array( 'scope' => HIROSHI_CORE_OPTIONS_NAME, 'type' => 'admin', 'slug' => 'fonts', 'title' => esc_html__( 'Fonts', 'hiroshi-core' ), 'description' => esc_html__( 'Global Fonts Options', 'hiroshi-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', 'hiroshi-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', 'hiroshi-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', 'hiroshi-core' ), 'description' => esc_html__( 'Choose Google Fonts which you want to use on your website', 'hiroshi-core' ), 'button_text' => esc_html__( 'Add New Google Font', 'hiroshi-core' ), ) ); $page_repeater->add_field_element( array( 'field_type' => 'googlefont', 'name' => 'qodef_choose_google_font', 'title' => esc_html__( 'Google Font', 'hiroshi-core' ), 'description' => esc_html__( 'Choose Google Font', 'hiroshi-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', 'hiroshi-core' ), 'description' => esc_html__( 'Choose a default Google Fonts weights for your website. Impact on page load time', 'hiroshi-core' ), 'options' => array( '100' => esc_html__( '100 Thin', 'hiroshi-core' ), '100i' => esc_html__( '100 Thin Italic', 'hiroshi-core' ), '200' => esc_html__( '200 Extra-Light', 'hiroshi-core' ), '200i' => esc_html__( '200 Extra-Light Italic', 'hiroshi-core' ), '300' => esc_html__( '300 Light', 'hiroshi-core' ), '300i' => esc_html__( '300 Light Italic', 'hiroshi-core' ), '400' => esc_html__( '400 Regular', 'hiroshi-core' ), '400i' => esc_html__( '400 Regular Italic', 'hiroshi-core' ), '500' => esc_html__( '500 Medium', 'hiroshi-core' ), '500i' => esc_html__( '500 Medium Italic', 'hiroshi-core' ), '600' => esc_html__( '600 Semi-Bold', 'hiroshi-core' ), '600i' => esc_html__( '600 Semi-Bold Italic', 'hiroshi-core' ), '700' => esc_html__( '700 Bold', 'hiroshi-core' ), '700i' => esc_html__( '700 Bold Italic', 'hiroshi-core' ), '800' => esc_html__( '800 Extra-Bold', 'hiroshi-core' ), '800i' => esc_html__( '800 Extra-Bold Italic', 'hiroshi-core' ), '900' => esc_html__( '900 Ultra-Bold', 'hiroshi-core' ), '900i' => esc_html__( '900 Ultra-Bold Italic', 'hiroshi-core' ), ), ) ); $google_fonts_section->add_field_element( array( 'field_type' => 'checkbox', 'name' => 'qodef_google_fonts_subset', 'title' => esc_html__( 'Google Fonts Style', 'hiroshi-core' ), 'description' => esc_html__( 'Choose a default Google Fonts style for your website. Impact on page load time', 'hiroshi-core' ), 'options' => array( 'latin' => esc_html__( 'Latin', 'hiroshi-core' ), 'latin-ext' => esc_html__( 'Latin Extended', 'hiroshi-core' ), 'cyrillic' => esc_html__( 'Cyrillic', 'hiroshi-core' ), 'cyrillic-ext' => esc_html__( 'Cyrillic Extended', 'hiroshi-core' ), 'greek' => esc_html__( 'Greek', 'hiroshi-core' ), 'greek-ext' => esc_html__( 'Greek Extended', 'hiroshi-core' ), 'vietnamese' => esc_html__( 'Vietnamese', 'hiroshi-core' ), ), ) ); $page_repeater = $page->add_repeater_element( array( 'name' => 'qodef_custom_fonts', 'title' => esc_html__( 'Custom Fonts', 'hiroshi-core' ), 'description' => esc_html__( 'Add custom fonts', 'hiroshi-core' ), 'button_text' => esc_html__( 'Add New Custom Font', 'hiroshi-core' ), ) ); $page_repeater->add_field_element( array( 'field_type' => 'file', 'name' => 'qodef_custom_font_ttf', 'title' => esc_html__( 'Custom Font TTF', 'hiroshi-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', 'hiroshi-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', 'hiroshi-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', 'hiroshi-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', 'hiroshi-core' ), ) ); // Hook to include additional options after module options do_action( 'hiroshi_core_action_after_page_fonts_options_map', $page ); } } add_action( 'hiroshi_core_action_default_options_init', 'hiroshi_core_add_fonts_options', hiroshi_core_get_admin_options_map_position( 'fonts' ) ); }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
fonts-options.php
6559 bytes
0644
N4ST4R_ID | Naxtarrr