balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

typography.php (3119B)


      1 <?php
      2 namespace Elementor\Core\Schemes;
      3 
      4 if ( ! defined( 'ABSPATH' ) ) {
      5 	exit; // Exit if accessed directly.
      6 }
      7 
      8 /**
      9  * Elementor typography scheme.
     10  *
     11  * Elementor typography scheme class is responsible for initializing a scheme
     12  * for typography.
     13  *
     14  * @since 1.0.0
     15  */
     16 class Typography extends Base_UI {
     17 
     18 	/**
     19 	 * 1st typography scheme.
     20 	 */
     21 	const TYPOGRAPHY_1 = '1';
     22 
     23 	/**
     24 	 * 2nd typography scheme.
     25 	 */
     26 	const TYPOGRAPHY_2 = '2';
     27 
     28 	/**
     29 	 * 3rd typography scheme.
     30 	 */
     31 	const TYPOGRAPHY_3 = '3';
     32 
     33 	/**
     34 	 * 4th typography scheme.
     35 	 */
     36 	const TYPOGRAPHY_4 = '4';
     37 
     38 	/**
     39 	 * Get typography scheme type.
     40 	 *
     41 	 * Retrieve the typography scheme type.
     42 	 *
     43 	 * @since 1.0.0
     44 	 * @access public
     45 	 * @static
     46 	 *
     47 	 * @return string Typography scheme type.
     48 	 */
     49 	public static function get_type() {
     50 		return 'typography';
     51 	}
     52 
     53 	/**
     54 	 * Get typography scheme title.
     55 	 *
     56 	 * Retrieve the typography scheme title.
     57 	 *
     58 	 * @since 1.0.0
     59 	 * @access public
     60 	 *
     61 	 * @return string Typography scheme title.
     62 	 */
     63 	public function get_title() {
     64 		return esc_html__( 'Typography', 'elementor' );
     65 	}
     66 
     67 	/**
     68 	 * Get typography scheme disabled title.
     69 	 *
     70 	 * Retrieve the typography scheme disabled title.
     71 	 *
     72 	 * @since 1.0.0
     73 	 * @access public
     74 	 *
     75 	 * @return string Typography scheme disabled title.
     76 	 */
     77 	public function get_disabled_title() {
     78 		return esc_html__( 'Default Fonts', 'elementor' );
     79 	}
     80 
     81 	/**
     82 	 * Get typography scheme titles.
     83 	 *
     84 	 * Retrieve the typography scheme titles.
     85 	 *
     86 	 * @since 1.0.0
     87 	 * @access public
     88 	 *
     89 	 * @return array Typography scheme titles.
     90 	 */
     91 	public function get_scheme_titles() {
     92 		return [
     93 			self::TYPOGRAPHY_1 => esc_html__( 'Primary Headline', 'elementor' ),
     94 			self::TYPOGRAPHY_2 => esc_html__( 'Secondary Headline', 'elementor' ),
     95 			self::TYPOGRAPHY_3 => esc_html__( 'Body Text', 'elementor' ),
     96 			self::TYPOGRAPHY_4 => esc_html__( 'Accent Text', 'elementor' ),
     97 		];
     98 	}
     99 
    100 	/**
    101 	 * Get default typography scheme.
    102 	 *
    103 	 * Retrieve the default typography scheme.
    104 	 *
    105 	 * @since 1.0.0
    106 	 * @access public
    107 	 *
    108 	 * @return array Default typography scheme.
    109 	 */
    110 	public function get_default_scheme() {
    111 		return [
    112 			self::TYPOGRAPHY_1 => [
    113 				'font_family' => 'Roboto',
    114 				'font_weight' => '600',
    115 			],
    116 			self::TYPOGRAPHY_2 => [
    117 				'font_family' => 'Roboto Slab',
    118 				'font_weight' => '400',
    119 			],
    120 			self::TYPOGRAPHY_3 => [
    121 				'font_family' => 'Roboto',
    122 				'font_weight' => '400',
    123 			],
    124 			self::TYPOGRAPHY_4 => [
    125 				'font_family' => 'Roboto',
    126 				'font_weight' => '500',
    127 			],
    128 		];
    129 	}
    130 
    131 	/**
    132 	 * Init system typography schemes.
    133 	 *
    134 	 * Initialize the system typography schemes.
    135 	 *
    136 	 * @since 1.0.0
    137 	 * @access protected
    138 	 *
    139 	 * @return array System typography schemes.
    140 	 */
    141 	protected function _init_system_schemes() {
    142 		return [];
    143 	}
    144 
    145 	/**
    146 	 * Print typography scheme content template.
    147 	 *
    148 	 * Used to generate the HTML in the editor using Underscore JS template. The
    149 	 * variables for the class are available using `data` JS object.
    150 	 *
    151 	 * @since 1.0.0
    152 	 * @access public
    153 	 */
    154 	public function print_template_content() {
    155 		?>
    156 		<div class="elementor-panel-scheme-items"></div>
    157 		<?php
    158 	}
    159 }