| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
|
| 4 |
add_filter('ultp_addons_config', 'ultp_custom_font_config'); |
| 5 |
function ultp_custom_font_config( $config ) { |
| 6 |
$configuration = array( |
| 7 |
'name' => __( 'Custom Font', 'ultimate-post' ), |
| 8 |
'desc' => __( 'It allows you to upload custom fonts and use them on any PostX blocks with all typographical options.', 'ultimate-post' ), |
| 9 |
'img' => ULTP_URL.'assets/img/addons/custom_font.svg', |
| 10 |
'is_pro' => false, |
| 11 |
'live' => 'https://www.wpxpo.com/wordpress-custom-fonts/live_demo_args', |
| 12 |
'docs' => 'https://wpxpo.com/docs/postx/add-on/custom-fonts/', |
| 13 |
'video' => 'https://www.youtube.com/watch?v=tLqUpj_gL-U', |
| 14 |
'position' => 7 |
| 15 |
); |
| 16 |
$arr['ultp_custom_font'] = $configuration; |
| 17 |
return $arr + $config; |
| 18 |
} |
| 19 |
|
| 20 |
add_action('init', 'ultp_custom_font_init'); |
| 21 |
function ultp_custom_font_init() { |
| 22 |
$settings = ultimate_post()->get_setting('ultp_custom_font'); |
| 23 |
if ($settings == 'true') { |
| 24 |
require_once ULTP_PATH.'/addons/custom_font/Custom_Font.php'; |
| 25 |
new \ULTP\Custom_Font(); |
| 26 |
} |
| 27 |
} |