class-do-css.php
4 years ago
class-enqueue-css.php
4 years ago
class-legacy-attributes.php
4 years ago
class-plugin-update.php
5 years ago
class-render-blocks.php
4 years ago
class-rest.php
4 years ago
class-settings.php
5 years ago
dashboard.php
5 years ago
defaults.php
4 years ago
functions.php
4 years ago
general.php
4 years ago
generate-css.php
4 years ago
defaults.php
564 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Set our block attribute defaults. |
| 4 | * |
| 5 | * @package GenerateBlocks |
| 6 | */ |
| 7 | |
| 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | exit; // Exit if accessed directly. |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Set our block defaults. |
| 14 | * |
| 15 | * @since 0.1 |
| 16 | * |
| 17 | * @return array |
| 18 | */ |
| 19 | function generateblocks_get_block_defaults() { |
| 20 | $defaults = array(); |
| 21 | |
| 22 | $container_width = 1100; |
| 23 | |
| 24 | if ( function_exists( 'generate_get_option' ) ) { |
| 25 | $container_width = generate_get_option( 'container_width' ); |
| 26 | } |
| 27 | |
| 28 | $defaults['container'] = array( |
| 29 | 'tagName' => 'div', |
| 30 | 'isGrid' => false, |
| 31 | 'containerWidth' => $container_width, |
| 32 | 'outerContainer' => 'full', |
| 33 | 'innerContainer' => 'contained', |
| 34 | 'minHeight' => false, |
| 35 | 'minHeightUnit' => 'px', |
| 36 | 'minHeightTablet' => false, |
| 37 | 'minHeightUnitTablet' => 'px', |
| 38 | 'minHeightMobile' => false, |
| 39 | 'minHeightUnitMobile' => 'px', |
| 40 | 'paddingTop' => '', |
| 41 | 'paddingRight' => '', |
| 42 | 'paddingBottom' => '', |
| 43 | 'paddingLeft' => '', |
| 44 | 'paddingUnit' => 'px', |
| 45 | 'paddingTopTablet' => '', |
| 46 | 'paddingRightTablet' => '', |
| 47 | 'paddingBottomTablet' => '', |
| 48 | 'paddingLeftTablet' => '', |
| 49 | 'paddingTopMobile' => '', |
| 50 | 'paddingRightMobile' => '', |
| 51 | 'paddingBottomMobile' => '', |
| 52 | 'paddingLeftMobile' => '', |
| 53 | 'marginTop' => '', |
| 54 | 'marginRight' => '', |
| 55 | 'marginBottom' => '', |
| 56 | 'marginLeft' => '', |
| 57 | 'marginUnit' => 'px', |
| 58 | 'marginTopTablet' => '', |
| 59 | 'marginRightTablet' => '', |
| 60 | 'marginBottomTablet' => '', |
| 61 | 'marginLeftTablet' => '', |
| 62 | 'marginTopMobile' => '', |
| 63 | 'marginRightMobile' => '', |
| 64 | 'marginBottomMobile' => '', |
| 65 | 'marginLeftMobile' => '', |
| 66 | 'borderSizeTop' => '', |
| 67 | 'borderSizeRight' => '', |
| 68 | 'borderSizeBottom' => '', |
| 69 | 'borderSizeLeft' => '', |
| 70 | 'borderSizeTopTablet' => '', |
| 71 | 'borderSizeRightTablet' => '', |
| 72 | 'borderSizeBottomTablet' => '', |
| 73 | 'borderSizeLeftTablet' => '', |
| 74 | 'borderSizeTopMobile' => '', |
| 75 | 'borderSizeRightMobile' => '', |
| 76 | 'borderSizeBottomMobile' => '', |
| 77 | 'borderSizeLeftMobile' => '', |
| 78 | 'borderRadiusTopRight' => '', |
| 79 | 'borderRadiusBottomRight' => '', |
| 80 | 'borderRadiusBottomLeft' => '', |
| 81 | 'borderRadiusTopLeft' => '', |
| 82 | 'borderRadiusUnit' => 'px', |
| 83 | 'borderRadiusTopRightTablet' => '', |
| 84 | 'borderRadiusBottomRightTablet' => '', |
| 85 | 'borderRadiusBottomLeftTablet' => '', |
| 86 | 'borderRadiusTopLeftTablet' => '', |
| 87 | 'borderRadiusTopRightMobile' => '', |
| 88 | 'borderRadiusBottomRightMobile' => '', |
| 89 | 'borderRadiusBottomLeftMobile' => '', |
| 90 | 'borderRadiusTopLeftMobile' => '', |
| 91 | 'borderColor' => '', |
| 92 | 'borderColorOpacity' => 1, |
| 93 | 'backgroundColor' => '', |
| 94 | 'backgroundColorOpacity' => 1, |
| 95 | 'gradient' => false, |
| 96 | 'gradientDirection' => '', |
| 97 | 'gradientColorOne' => '', |
| 98 | 'gradientColorOneOpacity' => '', |
| 99 | 'gradientColorStopOne' => '', |
| 100 | 'gradientColorTwo' => '', |
| 101 | 'gradientColorTwoOpacity' => '', |
| 102 | 'gradientColorStopTwo' => '', |
| 103 | 'gradientSelector' => 'element', |
| 104 | 'textColor' => '', |
| 105 | 'linkColor' => '', |
| 106 | 'linkColorHover' => '', |
| 107 | 'bgImage' => '', |
| 108 | 'bgOptions' => array( |
| 109 | 'selector' => 'element', |
| 110 | 'opacity' => 1, |
| 111 | 'overlay' => false, |
| 112 | 'position' => 'center center', |
| 113 | 'size' => 'cover', |
| 114 | 'repeat' => 'no-repeat', |
| 115 | 'attachment' => '', |
| 116 | ), |
| 117 | 'bgImageSize' => 'full', |
| 118 | 'width' => '', |
| 119 | 'widthTablet' => '', |
| 120 | 'widthMobile' => '', |
| 121 | 'autoWidth' => false, |
| 122 | 'autoWidthTablet' => false, |
| 123 | 'autoWidthMobile' => false, |
| 124 | 'flexGrow' => '', |
| 125 | 'flexGrowTablet' => '', |
| 126 | 'flexGrowMobile' => '', |
| 127 | 'flexShrink' => '', |
| 128 | 'flexShrinkTablet' => '', |
| 129 | 'flexShrinkMobile' => '', |
| 130 | 'flexBasis' => '', |
| 131 | 'flexBasisTablet' => '', |
| 132 | 'flexBasisMobile' => '', |
| 133 | 'flexBasisUnit' => 'px', |
| 134 | 'verticalAlignment' => '', |
| 135 | 'verticalAlignmentTablet' => 'inherit', |
| 136 | 'verticalAlignmentMobile' => 'inherit', |
| 137 | 'zindex' => '', |
| 138 | 'innerZindex' => '', |
| 139 | 'removeVerticalGap' => false, |
| 140 | 'removeVerticalGapTablet' => false, |
| 141 | 'removeVerticalGapMobile' => false, |
| 142 | 'orderTablet' => false, |
| 143 | 'orderMobile' => false, |
| 144 | 'alignment' => '', |
| 145 | 'alignmentTablet' => '', |
| 146 | 'alignmentMobile' => '', |
| 147 | 'fontFamily' => '', |
| 148 | 'fontFamilyFallback' => '', |
| 149 | 'googleFont' => false, |
| 150 | 'googleFontVariants' => '', |
| 151 | 'fontWeight' => '', |
| 152 | 'fontSize' => '', |
| 153 | 'fontSizeTablet' => '', |
| 154 | 'fontSizeMobile' => '', |
| 155 | 'fontSizeUnit' => 'px', |
| 156 | 'textTransform' => '', |
| 157 | ); |
| 158 | |
| 159 | $defaults['buttonContainer'] = array( |
| 160 | 'alignment' => '', |
| 161 | 'alignmentTablet' => '', |
| 162 | 'alignmentMobile' => '', |
| 163 | 'marginTop' => '', |
| 164 | 'marginRight' => '', |
| 165 | 'marginBottom' => '', |
| 166 | 'marginLeft' => '', |
| 167 | 'marginTopTablet' => '', |
| 168 | 'marginRightTablet' => '', |
| 169 | 'marginBottomTablet' => '', |
| 170 | 'marginLeftTablet' => '', |
| 171 | 'marginTopMobile' => '', |
| 172 | 'marginRightMobile' => '', |
| 173 | 'marginBottomMobile' => '', |
| 174 | 'marginLeftMobile' => '', |
| 175 | 'marginUnit' => 'px', |
| 176 | 'stack' => false, |
| 177 | 'stackTablet' => false, |
| 178 | 'stackMobile' => false, |
| 179 | 'fillHorizontalSpace' => false, |
| 180 | 'fillHorizontalSpaceTablet' => false, |
| 181 | 'fillHorizontalSpaceMobile' => false, |
| 182 | ); |
| 183 | |
| 184 | $defaults['button'] = array( |
| 185 | 'backgroundColor' => false, |
| 186 | 'backgroundColorOpacity' => 1, |
| 187 | 'textColor' => false, |
| 188 | 'backgroundColorHover' => false, |
| 189 | 'backgroundColorHoverOpacity' => 1, |
| 190 | 'textColorHover' => false, |
| 191 | 'fontFamily' => '', |
| 192 | 'fontFamilyFallback' => '', |
| 193 | 'googleFont' => false, |
| 194 | 'googleFontVariants' => '', |
| 195 | 'fontWeight' => '', |
| 196 | 'fontSize' => false, |
| 197 | 'fontSizeTablet' => false, |
| 198 | 'fontSizeMobile' => false, |
| 199 | 'fontSizeUnit' => 'px', |
| 200 | 'textTransform' => '', |
| 201 | 'letterSpacing' => '', |
| 202 | 'letterSpacingTablet' => '', |
| 203 | 'letterSpacingMobile' => '', |
| 204 | 'marginTop' => '', |
| 205 | 'marginRight' => '', |
| 206 | 'marginBottom' => '', |
| 207 | 'marginLeft' => '', |
| 208 | 'marginTopTablet' => '', |
| 209 | 'marginRightTablet' => '', |
| 210 | 'marginBottomTablet' => '', |
| 211 | 'marginLeftTablet' => '', |
| 212 | 'marginTopMobile' => '', |
| 213 | 'marginRightMobile' => '', |
| 214 | 'marginBottomMobile' => '', |
| 215 | 'marginLeftMobile' => '', |
| 216 | 'marginUnit' => 'px', |
| 217 | 'paddingTop' => '', |
| 218 | 'paddingRight' => '', |
| 219 | 'paddingBottom' => '', |
| 220 | 'paddingLeft' => '', |
| 221 | 'paddingTopTablet' => '', |
| 222 | 'paddingRightTablet' => '', |
| 223 | 'paddingBottomTablet' => '', |
| 224 | 'paddingLeftTablet' => '', |
| 225 | 'paddingTopMobile' => '', |
| 226 | 'paddingRightMobile' => '', |
| 227 | 'paddingBottomMobile' => '', |
| 228 | 'paddingLeftMobile' => '', |
| 229 | 'paddingUnit' => 'px', |
| 230 | 'borderSizeTop' => '', |
| 231 | 'borderSizeRight' => '', |
| 232 | 'borderSizeBottom' => '', |
| 233 | 'borderSizeLeft' => '', |
| 234 | 'borderSizeTopTablet' => '', |
| 235 | 'borderSizeRightTablet' => '', |
| 236 | 'borderSizeBottomTablet' => '', |
| 237 | 'borderSizeLeftTablet' => '', |
| 238 | 'borderSizeTopMobile' => '', |
| 239 | 'borderSizeRightMobile' => '', |
| 240 | 'borderSizeBottomMobile' => '', |
| 241 | 'borderSizeLeftMobile' => '', |
| 242 | 'borderRadiusTopRight' => '', |
| 243 | 'borderRadiusBottomRight' => '', |
| 244 | 'borderRadiusBottomLeft' => '', |
| 245 | 'borderRadiusTopLeft' => '', |
| 246 | 'borderRadiusTopRightTablet' => '', |
| 247 | 'borderRadiusBottomRightTablet' => '', |
| 248 | 'borderRadiusBottomLeftTablet' => '', |
| 249 | 'borderRadiusTopLeftTablet' => '', |
| 250 | 'borderRadiusTopRightMobile' => '', |
| 251 | 'borderRadiusBottomRightMobile' => '', |
| 252 | 'borderRadiusBottomLeftMobile' => '', |
| 253 | 'borderRadiusTopLeftMobile' => '', |
| 254 | 'borderRadiusUnit' => 'px', |
| 255 | 'borderColor' => false, |
| 256 | 'borderColorOpacity' => 1, |
| 257 | 'borderColorHover' => false, |
| 258 | 'borderColorHoverOpacity' => 1, |
| 259 | 'icon' => '', |
| 260 | 'hasIcon' => false, |
| 261 | 'iconLocation' => 'left', |
| 262 | 'removeText' => false, |
| 263 | 'ariaLabel' => '', |
| 264 | 'gradient' => false, |
| 265 | 'gradientDirection' => '', |
| 266 | 'gradientColorOne' => '', |
| 267 | 'gradientColorOneOpacity' => '', |
| 268 | 'gradientColorStopOne' => '', |
| 269 | 'gradientColorTwo' => '', |
| 270 | 'gradientColorTwoOpacity' => '', |
| 271 | 'gradientColorStopTwo' => '', |
| 272 | 'iconPaddingTop' => '', |
| 273 | 'iconPaddingRight' => '0.5', |
| 274 | 'iconPaddingBottom' => '', |
| 275 | 'iconPaddingLeft' => '', |
| 276 | 'iconPaddingTopTablet' => '', |
| 277 | 'iconPaddingRightTablet' => '', |
| 278 | 'iconPaddingBottomTablet' => '', |
| 279 | 'iconPaddingLeftTablet' => '', |
| 280 | 'iconPaddingTopMobile' => '', |
| 281 | 'iconPaddingRightMobile' => '', |
| 282 | 'iconPaddingBottomMobile' => '', |
| 283 | 'iconPaddingLeftMobile' => '', |
| 284 | 'iconPaddingUnit' => 'em', |
| 285 | 'iconSize' => 1, |
| 286 | 'iconSizeTablet' => '', |
| 287 | 'iconSizeMobile' => '', |
| 288 | 'iconSizeUnit' => 'em', |
| 289 | ); |
| 290 | |
| 291 | $defaults['gridContainer'] = array( |
| 292 | 'horizontalGap' => '', |
| 293 | 'verticalGap' => '', |
| 294 | 'verticalAlignment' => '', |
| 295 | 'horizontalGapTablet' => '', |
| 296 | 'verticalGapTablet' => '', |
| 297 | 'verticalAlignmentTablet' => 'inherit', |
| 298 | 'horizontalGapMobile' => '', |
| 299 | 'verticalGapMobile' => '', |
| 300 | 'verticalAlignmentMobile' => 'inherit', |
| 301 | 'horizontalAlignment' => '', |
| 302 | 'horizontalAlignmentTablet' => '', |
| 303 | 'horizontalAlignmentMobile' => '', |
| 304 | ); |
| 305 | |
| 306 | $defaults['headline'] = array( |
| 307 | 'element' => 'h2', |
| 308 | 'cssClasses' => '', |
| 309 | 'alignment' => false, |
| 310 | 'alignmentTablet' => false, |
| 311 | 'alignmentMobile' => false, |
| 312 | 'backgroundColor' => false, |
| 313 | 'backgroundColorOpacity' => 1, |
| 314 | 'textColor' => false, |
| 315 | 'linkColor' => false, |
| 316 | 'linkColorHover' => false, |
| 317 | 'borderColor' => false, |
| 318 | 'borderColorOpacity' => 1, |
| 319 | 'highlightTextColor' => false, |
| 320 | 'fontFamily' => '', |
| 321 | 'fontFamilyFallback' => '', |
| 322 | 'googleFont' => false, |
| 323 | 'googleFontVariants' => '', |
| 324 | 'fontWeight' => '', |
| 325 | 'fontSize' => '', |
| 326 | 'fontSizeTablet' => '', |
| 327 | 'fontSizeMobile' => '', |
| 328 | 'fontSizeUnit' => 'px', |
| 329 | 'textTransform' => '', |
| 330 | 'lineHeight' => '', |
| 331 | 'lineHeightTablet' => '', |
| 332 | 'lineHeightMobile' => '', |
| 333 | 'lineHeightUnit' => 'em', |
| 334 | 'letterSpacing' => '', |
| 335 | 'letterSpacingTablet' => '', |
| 336 | 'letterSpacingMobile' => '', |
| 337 | 'marginTop' => '', |
| 338 | 'marginRight' => '', |
| 339 | 'marginBottom' => '', |
| 340 | 'marginLeft' => '', |
| 341 | 'marginTopTablet' => '', |
| 342 | 'marginRightTablet' => '', |
| 343 | 'marginBottomTablet' => '', |
| 344 | 'marginLeftTablet' => '', |
| 345 | 'marginTopMobile' => '', |
| 346 | 'marginRightMobile' => '', |
| 347 | 'marginBottomMobile' => '', |
| 348 | 'marginLeftMobile' => '', |
| 349 | 'marginUnit' => 'px', |
| 350 | 'paddingTop' => '', |
| 351 | 'paddingRight' => '', |
| 352 | 'paddingBottom' => '', |
| 353 | 'paddingLeft' => '', |
| 354 | 'paddingTopTablet' => '', |
| 355 | 'paddingRightTablet' => '', |
| 356 | 'paddingBottomTablet' => '', |
| 357 | 'paddingLeftTablet' => '', |
| 358 | 'paddingTopMobile' => '', |
| 359 | 'paddingRightMobile' => '', |
| 360 | 'paddingBottomMobile' => '', |
| 361 | 'paddingLeftMobile' => '', |
| 362 | 'paddingUnit' => 'px', |
| 363 | 'borderSizeTop' => '', |
| 364 | 'borderSizeRight' => '', |
| 365 | 'borderSizeBottom' => '', |
| 366 | 'borderSizeLeft' => '', |
| 367 | 'borderSizeTopTablet' => '', |
| 368 | 'borderSizeRightTablet' => '', |
| 369 | 'borderSizeBottomTablet' => '', |
| 370 | 'borderSizeLeftTablet' => '', |
| 371 | 'borderSizeTopMobile' => '', |
| 372 | 'borderSizeRightMobile' => '', |
| 373 | 'borderSizeBottomMobile' => '', |
| 374 | 'borderSizeLeftMobile' => '', |
| 375 | 'borderRadiusTopRight' => '', |
| 376 | 'borderRadiusBottomRight' => '', |
| 377 | 'borderRadiusBottomLeft' => '', |
| 378 | 'borderRadiusTopLeft' => '', |
| 379 | 'borderRadiusTopRightTablet' => '', |
| 380 | 'borderRadiusBottomRightTablet' => '', |
| 381 | 'borderRadiusBottomLeftTablet' => '', |
| 382 | 'borderRadiusTopLeftTablet' => '', |
| 383 | 'borderRadiusTopRightMobile' => '', |
| 384 | 'borderRadiusBottomRightMobile' => '', |
| 385 | 'borderRadiusBottomLeftMobile' => '', |
| 386 | 'borderRadiusTopLeftMobile' => '', |
| 387 | 'borderRadiusUnit' => 'px', |
| 388 | 'icon' => '', |
| 389 | 'hasIcon' => false, |
| 390 | 'iconColor' => false, |
| 391 | 'iconColorOpacity' => 1, |
| 392 | 'iconLocation' => 'inline', |
| 393 | 'iconLocationTablet' => '', |
| 394 | 'iconLocationMobile' => '', |
| 395 | 'iconVerticalAlignment' => 'center', |
| 396 | 'iconVerticalAlignmentTablet' => '', |
| 397 | 'iconVerticalAlignmentMobile' => '', |
| 398 | 'iconPaddingTop' => '', |
| 399 | 'iconPaddingRight' => '0.5', |
| 400 | 'iconPaddingBottom' => '', |
| 401 | 'iconPaddingLeft' => '', |
| 402 | 'iconPaddingTopTablet' => '', |
| 403 | 'iconPaddingRightTablet' => '', |
| 404 | 'iconPaddingBottomTablet' => '', |
| 405 | 'iconPaddingLeftTablet' => '', |
| 406 | 'iconPaddingTopMobile' => '', |
| 407 | 'iconPaddingRightMobile' => '', |
| 408 | 'iconPaddingBottomMobile' => '', |
| 409 | 'iconPaddingLeftMobile' => '', |
| 410 | 'iconPaddingUnit' => 'em', |
| 411 | 'iconSize' => 1, |
| 412 | 'iconSizeTablet' => '', |
| 413 | 'iconSizeMobile' => '', |
| 414 | 'iconSizeUnit' => 'em', |
| 415 | 'inlineWidth' => false, |
| 416 | 'inlineWidthTablet' => false, |
| 417 | 'inlineWidthMobile' => false, |
| 418 | 'removeText' => false, |
| 419 | 'ariaLabel' => '', |
| 420 | ); |
| 421 | |
| 422 | return apply_filters( 'generateblocks_defaults', $defaults ); |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * Get defaults for our general options. |
| 427 | * |
| 428 | * @since 0.1 |
| 429 | */ |
| 430 | function generateblocks_get_option_defaults() { |
| 431 | return apply_filters( |
| 432 | 'generateblocks_option_defaults', |
| 433 | array( |
| 434 | 'css_print_method' => 'file', |
| 435 | 'sync_responsive_previews' => true, |
| 436 | ) |
| 437 | ); |
| 438 | } |
| 439 | |
| 440 | /** |
| 441 | * Styles to use in the editor/font-end when needed. |
| 442 | * |
| 443 | * @since 1.0 |
| 444 | */ |
| 445 | function generateblocks_get_default_styles() { |
| 446 | $defaults = generateblocks_get_block_defaults(); |
| 447 | |
| 448 | $defaultBlockStyles = array( |
| 449 | 'button' => array( |
| 450 | 'backgroundColor' => $defaults['button']['backgroundColor'] ? $defaults['button']['backgroundColor'] : '#0366d6', |
| 451 | 'textColor' => $defaults['button']['textColor'] ? $defaults['button']['textColor'] : '#ffffff', |
| 452 | 'backgroundColorHover' => $defaults['button']['backgroundColorHover'] ? $defaults['button']['backgroundColorHover'] : '#222222', |
| 453 | 'textColorHover' => $defaults['button']['textColorHover'] ? $defaults['button']['textColorHover'] : '#ffffff', |
| 454 | 'paddingTop' => $defaults['button']['paddingTop'] ? $defaults['button']['paddingTop'] : '15', |
| 455 | 'paddingRight' => $defaults['button']['paddingRight'] ? $defaults['button']['paddingRight'] : '20', |
| 456 | 'paddingBottom' => $defaults['button']['paddingBottom'] ? $defaults['button']['paddingBottom'] : '15', |
| 457 | 'paddingLeft' => $defaults['button']['paddingLeft'] ? $defaults['button']['paddingLeft'] : '20', |
| 458 | ), |
| 459 | 'container' => array( |
| 460 | 'gridItemPaddingTop' => '', |
| 461 | 'gridItemPaddingRight' => '', |
| 462 | 'gridItemPaddingBottom' => '', |
| 463 | 'gridItemPaddingLeft' => '', |
| 464 | 'bgImageSize' => 'full', |
| 465 | 'shapeDividers' => array( |
| 466 | 'shape' => 'gb-waves-1', |
| 467 | 'location' => 'bottom', |
| 468 | 'height' => 200, |
| 469 | 'heightTablet' => '', |
| 470 | 'heightMobile' => '', |
| 471 | 'width' => 100, |
| 472 | 'widthTablet' => '', |
| 473 | 'widthMobile' => '', |
| 474 | 'flipHorizontally' => false, |
| 475 | 'zindex' => '', |
| 476 | 'color' => '#000000', |
| 477 | 'colorOpacity' => 1, |
| 478 | ), |
| 479 | ), |
| 480 | ); |
| 481 | |
| 482 | if ( function_exists( 'generate_get_default_fonts' ) ) { |
| 483 | $font_settings = wp_parse_args( |
| 484 | get_option( 'generate_settings', array() ), |
| 485 | generate_get_default_fonts() |
| 486 | ); |
| 487 | |
| 488 | $defaultBlockStyles['headline'] = array( |
| 489 | 'p' => array( |
| 490 | 'marginBottom' => $font_settings['paragraph_margin'], |
| 491 | 'marginBottomTablet' => '', |
| 492 | 'marginBottomMobile' => '', |
| 493 | 'marginUnit' => 'em', |
| 494 | 'fontSize' => $font_settings['body_font_size'], |
| 495 | 'fontSizeTablet' => '', |
| 496 | 'fontSizeMobile' => '', |
| 497 | 'fontSizeUnit' => 'px', |
| 498 | ), |
| 499 | 'h1' => array( |
| 500 | 'marginBottom' => $font_settings['heading_1_margin_bottom'], |
| 501 | 'marginBottomTablet' => '', |
| 502 | 'marginBottomMobile' => '', |
| 503 | 'marginUnit' => 'px', |
| 504 | 'fontSize' => $font_settings['heading_1_font_size'], |
| 505 | 'fontSizeTablet' => '', |
| 506 | 'fontSizeMobile' => $font_settings['mobile_heading_1_font_size'], |
| 507 | 'fontSizeUnit' => 'px', |
| 508 | ), |
| 509 | 'h2' => array( |
| 510 | 'marginBottom' => $font_settings['heading_2_margin_bottom'], |
| 511 | 'marginBottomTablet' => '', |
| 512 | 'marginBottomMobile' => '', |
| 513 | 'marginUnit' => 'px', |
| 514 | 'fontSize' => $font_settings['heading_2_font_size'], |
| 515 | 'fontSizeTablet' => '', |
| 516 | 'fontSizeMobile' => $font_settings['mobile_heading_1_font_size'], |
| 517 | 'fontSizeUnit' => 'px', |
| 518 | ), |
| 519 | 'h3' => array( |
| 520 | 'marginBottom' => $font_settings['heading_3_margin_bottom'], |
| 521 | 'marginBottomTablet' => '', |
| 522 | 'marginBottomMobile' => '', |
| 523 | 'marginUnit' => 'px', |
| 524 | 'fontSize' => $font_settings['heading_3_font_size'], |
| 525 | 'fontSizeTablet' => '', |
| 526 | 'fontSizeMobile' => '', |
| 527 | 'fontSizeUnit' => 'px', |
| 528 | ), |
| 529 | 'h4' => array( |
| 530 | 'marginBottom' => '20', |
| 531 | 'marginBottomTablet' => '', |
| 532 | 'marginBottomMobile' => '', |
| 533 | 'marginUnit' => 'px', |
| 534 | 'fontSize' => '', |
| 535 | 'fontSizeTablet' => '', |
| 536 | 'fontSizeMobile' => '', |
| 537 | 'fontSizeUnit' => 'px', |
| 538 | ), |
| 539 | 'h5' => array( |
| 540 | 'marginBottom' => '20', |
| 541 | 'marginBottomTablet' => '', |
| 542 | 'marginBottomMobile' => '', |
| 543 | 'marginUnit' => 'px', |
| 544 | 'fontSize' => '', |
| 545 | 'fontSizeTablet' => '', |
| 546 | 'fontSizeMobile' => '', |
| 547 | 'fontSizeUnit' => 'px', |
| 548 | ), |
| 549 | 'h6' => array( |
| 550 | 'marginBottom' => '20', |
| 551 | 'marginBottomTablet' => '', |
| 552 | 'marginBottomMobile' => '', |
| 553 | 'marginUnit' => 'px', |
| 554 | 'fontSize' => '', |
| 555 | 'fontSizeTablet' => '', |
| 556 | 'fontSizeMobile' => '', |
| 557 | 'fontSizeUnit' => 'px', |
| 558 | ), |
| 559 | ); |
| 560 | } |
| 561 | |
| 562 | return apply_filters( 'generateblocks_default_block_styles', $defaultBlockStyles ); |
| 563 | } |
| 564 |