Make WordPress Core

Ticket #49763: 0001-feat-add-gradient-background-options-that-fit-the-th.patch

File 0001-feat-add-gradient-background-options-that-fit-the-th.patch, 1.8 KB (added by alansyue, 3 years ago)
  • src/wp-content/themes/twentytwelve/functions.php

    From 178491c511fc70d053acc557a8b7504fde05804b Mon Sep 17 00:00:00 2001
    From: alansyue <b123105@gmail.com>
    Date: Tue, 5 Apr 2022 09:33:43 +0800
    Subject: [PATCH] feat: add gradient background options that fit the theme
     color scheme of twenty twelve
    
    ---
     .../themes/twentytwelve/functions.php         | 32 +++++++++++++++++++
     1 file changed, 32 insertions(+)
    
    diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php
    index a86de032a5..459159f63f 100644
    a b function twentytwelve_setup() { 
    9898                )
    9999        );
    100100
     101        // Add support for custom color scheme.
     102        add_theme_support(
     103                'editor-gradient-presets',
     104                array(
     105                        array(
     106                                'name'     => __( 'Blue Gradient', 'twentytwelve' ),
     107                                'slug'     => 'blue-gradient',
     108                                'gradient' => 'linear-gradient(90deg, #21759b 0%, #2a95c5 100%)',
     109                        ),
     110                        array(
     111                                'name'     => __( 'Dark Gray Gradient', 'twentytwelve' ),
     112                                'slug'     => 'dark-gray-gradient',
     113                                'gradient' => 'linear-gradient(90deg, #444 0%, #888 100%)',
     114                        ),
     115                        array(
     116                                'name'     => __( 'Medium Gray Gradient', 'twentytwelve' ),
     117                                'slug'     => 'medium-gray-gradient',
     118                                'gradient' => 'linear-gradient(90deg, #9f9f9f 0%, #696969 100%)',
     119                        ),
     120                        array(
     121                                'name'     => __( 'Light Gray Gradient', 'twentytwelve' ),
     122                                'slug'     => 'light-gray-gradient',
     123                                'gradient' => 'linear-gradient(90deg, #e6e6e6 0%, #808080 100%)',
     124                        ),
     125                        array(
     126                                'name'     => __( 'White Gradient', 'twentytwelve' ),
     127                                'slug'     => 'white-gradient',
     128                                'gradient' => 'linear-gradient(90deg, #fff 0%, #e3e3e3 100%)',
     129                        ),
     130                )
     131        );
     132
    101133        // Adds RSS feed links to <head> for posts and comments.
    102134        add_theme_support( 'automatic-feed-links' );
    103135