| 1 |
<?php |
| 2 |
/** |
| 3 |
* The Typography Meta-box configurations. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show |
| 6 |
* @subpackage Smart_Post_Show/admin |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
die; } // Cannot access pages directly. |
| 11 |
|
| 12 |
/** |
| 13 |
* The Typography class. |
| 14 |
*/ |
| 15 |
class SPS_Typography { |
| 16 |
|
| 17 |
/** |
| 18 |
* Typography section metabox. |
| 19 |
* |
| 20 |
* @param string $prefix The metabox key. |
| 21 |
* @return void |
| 22 |
*/ |
| 23 |
public static function section( $prefix ) { |
| 24 |
SP_PC::createSection( |
| 25 |
$prefix, |
| 26 |
array( |
| 27 |
'title' => __( 'Typography', 'smart-post-show' ), |
| 28 |
'icon' => 'fa fa-font', |
| 29 |
'enqueue_webfont' => true, |
| 30 |
'fields' => array( |
| 31 |
array( |
| 32 |
'content' => __( 'To unlock the following typography (950+ Google Fonts) options, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a> P.S. Note: The color fields work in the lite version.', 'smart-post-show' ), |
| 33 |
'type' => 'notice', |
| 34 |
), |
| 35 |
array( |
| 36 |
'id' => 'section_title_typography', |
| 37 |
'type' => 'typography', |
| 38 |
'title' => __( 'Section Title', 'smart-post-show' ), |
| 39 |
'subtitle' => __( 'Set item showcase section title font properties.', 'smart-post-show' ), |
| 40 |
'default' => array( |
| 41 |
'color' => '#444', |
| 42 |
'font-family' => '', |
| 43 |
'font-weight' => '', |
| 44 |
'subset' => '', |
| 45 |
'font-size' => '24', |
| 46 |
'tablet-font-size' => '20', |
| 47 |
'mobile-font-size' => '18', |
| 48 |
'line-height' => '28', |
| 49 |
'tablet-line-height' => '24', |
| 50 |
'mobile-line-height' => '20', |
| 51 |
'letter-spacing' => '0', |
| 52 |
'text-align' => 'left', |
| 53 |
'text-transform' => 'none', |
| 54 |
'type' => '', |
| 55 |
'unit' => 'px', |
| 56 |
), |
| 57 |
'dependency' => array( 'section_title', '==', 'true', 'all' ), |
| 58 |
), |
| 59 |
array( |
| 60 |
'id' => 'post_title_typography', |
| 61 |
'type' => 'typography', |
| 62 |
'title' => __( 'Title', 'smart-post-show' ), |
| 63 |
'subtitle' => __( 'Set title font properties.', 'smart-post-show' ), |
| 64 |
'hover_color' => true, |
| 65 |
'default' => array( |
| 66 |
'color' => '#111', |
| 67 |
'hover_color' => '#e1624b', |
| 68 |
'font-family' => '', |
| 69 |
'font-weight' => '', |
| 70 |
'subset' => '', |
| 71 |
'font-size' => '20', |
| 72 |
'tablet-font-size' => '18', |
| 73 |
'mobile-font-size' => '16', |
| 74 |
'line-height' => '24', |
| 75 |
'tablet-line-height' => '22', |
| 76 |
'mobile-line-height' => '20', |
| 77 |
'letter-spacing' => '0', |
| 78 |
'text-align' => 'left', |
| 79 |
'text-transform' => 'none', |
| 80 |
'type' => '', |
| 81 |
'unit' => 'px', |
| 82 |
), |
| 83 |
'dependency' => array( 'show_post_title', '==', 'true', 'all' ), |
| 84 |
), |
| 85 |
array( |
| 86 |
'id' => 'post_meta_typography', |
| 87 |
'type' => 'typography', |
| 88 |
'title' => __( 'Meta Fields', 'smart-post-show' ), |
| 89 |
'subtitle' => __( 'Set meta fields font properties.', 'smart-post-show' ), |
| 90 |
'hover_color' => true, |
| 91 |
'default' => array( |
| 92 |
'color' => '#888', |
| 93 |
'hover_color' => '#e1624b', |
| 94 |
'font-family' => '', |
| 95 |
'font-weight' => '', |
| 96 |
'subset' => '', |
| 97 |
'font-size' => '14', |
| 98 |
'tablet-font-size' => '14', |
| 99 |
'mobile-font-size' => '12', |
| 100 |
'line-height' => '16', |
| 101 |
'tablet-line-height' => '16', |
| 102 |
'mobile-line-height' => '16', |
| 103 |
'letter-spacing' => '0', |
| 104 |
'text-align' => 'left', |
| 105 |
'text-transform' => 'none', |
| 106 |
'type' => '', |
| 107 |
'unit' => 'px', |
| 108 |
), |
| 109 |
), |
| 110 |
array( |
| 111 |
'id' => 'post_content_typography', |
| 112 |
'type' => 'typography', |
| 113 |
'title' => __( 'Content', 'smart-post-show' ), |
| 114 |
'subtitle' => __( 'Set content font properties.', 'smart-post-show' ), |
| 115 |
'default' => array( |
| 116 |
'color' => '#444', |
| 117 |
'font-family' => '', |
| 118 |
'font-weight' => '', |
| 119 |
'subset' => '', |
| 120 |
'font-size' => '16', |
| 121 |
'tablet-font-size' => '14', |
| 122 |
'mobile-font-size' => '12', |
| 123 |
'line-height' => '20', |
| 124 |
'tablet-line-height' => '18', |
| 125 |
'mobile-line-height' => '18', |
| 126 |
'letter-spacing' => '0', |
| 127 |
'text-align' => 'left', |
| 128 |
'text-transform' => 'none', |
| 129 |
'type' => '', |
| 130 |
'unit' => 'px', |
| 131 |
), |
| 132 |
'dependency' => array( 'show_post_content', '==', 'true', 'all' ), |
| 133 |
), |
| 134 |
array( |
| 135 |
'id' => 'read_more_typography', |
| 136 |
'type' => 'typography', |
| 137 |
'title' => __( 'Read More', 'smart-post-show' ), |
| 138 |
'subtitle' => __( 'Set read more font properties.', 'smart-post-show' ), |
| 139 |
'color' => false, |
| 140 |
'default' => array( |
| 141 |
'font-family' => '', |
| 142 |
'font-weight' => '600', |
| 143 |
'subset' => '', |
| 144 |
'font-size' => '12', |
| 145 |
'tablet-font-size' => '12', |
| 146 |
'mobile-font-size' => '10', |
| 147 |
'line-height' => '18', |
| 148 |
'tablet-line-height' => '18', |
| 149 |
'mobile-line-height' => '16', |
| 150 |
'letter-spacing' => '0', |
| 151 |
'text-align' => 'left', |
| 152 |
'text-transform' => 'uppercase', |
| 153 |
'type' => '', |
| 154 |
'unit' => 'px', |
| 155 |
), |
| 156 |
'dependency' => array( 'show_read_more|show_post_content', '==|==', 'true|true', 'all' ), |
| 157 |
), |
| 158 |
|
| 159 |
array( |
| 160 |
'id' => 'custom_fields_typography', |
| 161 |
'type' => 'typography', |
| 162 |
'title' => __( 'Custom Fields', 'smart-post-show' ), |
| 163 |
'subtitle' => __( 'Set custom fields font properties.', 'smart-post-show' ), |
| 164 |
'color' => false, |
| 165 |
'default' => array( |
| 166 |
// 'color' => '#888', |
| 167 |
// 'hover_color' => '#444', |
| 168 |
'font-family' => '', |
| 169 |
'font-weight' => '', |
| 170 |
'subset' => '', |
| 171 |
'font-size' => '14', |
| 172 |
'tablet-font-size' => '14', |
| 173 |
'mobile-font-size' => '12', |
| 174 |
'line-height' => '18', |
| 175 |
'tablet-line-height' => '18', |
| 176 |
'mobile-line-height' => '16', |
| 177 |
'letter-spacing' => '0', |
| 178 |
'text-align' => 'left', |
| 179 |
'text-transform' => 'none', |
| 180 |
'type' => '', |
| 181 |
'unit' => 'px', |
| 182 |
), |
| 183 |
), |
| 184 |
), // End of fields array. |
| 185 |
) |
| 186 |
); |
| 187 |
} |
| 188 |
} |
| 189 |
|