Make WordPress Core

Changeset 36698

Timestamp:
02/24/2016 10:09:54 PM (8 years ago)
Author:
obenland
Message:

Customize: Introduce Logo support for themes.

Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/

Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland.
See #33755.

Location:
trunk/src
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r36641 r36698  
    726726.customize-control-cropped_image .current,
    727727.customize-control-site_icon .current,
     728
    728729.customize-control-header .current {
    729730    margin-bottom: 8px;
     
    767768.customize-control-site_icon .default-button,
    768769.customize-control-site_icon .upload-button,
     770
     771
     772
    769773.customize-control-header button.new,
    770774.customize-control-header button.remove {
     
    780784.customize-control-cropped_image .current .container,
    781785.customize-control-site_icon .current .container,
     786
    782787.customize-control-header .current .container {
    783788    overflow: hidden;
     
    793798.customize-control-cropped_image .current .container,
    794799.customize-control-site_icon .current .container,
     800
    795801.customize-control-image .current .container {
    796802    min-height: 40px;
     
    821827.customize-control-cropped_image .inner,
    822828.customize-control-site_icon .inner,
     829
    823830.customize-control-header .inner {
    824831    display: none;
     
    836843.customize-control-cropped_image .inner,
    837844.customize-control-site_icon .inner,
     845
    838846.customize-control-image .inner {
    839847    display: block;
     
    847855.customize-control-cropped_image .inner,
    848856.customize-control-site_icon .inner,
     857
    849858.customize-control-header .inner,
    850859.customize-control-header .inner .dashicons {
     
    990999.customize-control-site_icon .remove-button,
    9911000.customize-control-site_icon .default-button,
     1001
     1002
    9921003.customize-control-header .remove {
    9931004    float: left;
     
    10011012.customize-control-cropped_image .upload-button,
    10021013.customize-control-site_icon .upload-button,
     1014
    10031015.customize-control-header .new {
    10041016    float: right;
  • trunk/src/wp-admin/includes/admin.php

    r35740 r36698  
    7373require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
    7474
     75
     76
     77
    7578/** WordPress Update Administration API */
    7679require_once(ABSPATH . 'wp-admin/includes/update.php');
  • trunk/src/wp-admin/includes/template.php

    r36642 r36698  
    17511751    }
    17521752
     1753
     1754
     1755
     1756
    17531757    /**
    17541758     * Filter the default media display states for items in the Media list table.
     
    17571761     *
    17581762     * @param array $media_states An array of media states. Default 'Header Image',
    1759      *                            'Background Image', 'Site Icon'.
     1763     *                            'Background Image', 'Site Icon'.
    17601764     */
    17611765    $media_states = apply_filters( 'display_media_states', $media_states );
  • trunk/src/wp-admin/js/customize-controls.js

    r36689 r36698  
    23042304
    23052305    /**
     2306
     2307
     2308
     2309
     2310
     2311
     2312
     2313
     2314
     2315
     2316
     2317
     2318
     2319
     2320
     2321
     2322
     2323
     2324
     2325
     2326
     2327
     2328
     2329
     2330
     2331
     2332
     2333
     2334
     2335
     2336
     2337
     2338
     2339
     2340
     2341
     2342
    23062343     * @class
    23072344     * @augments wp.customize.Control
     
    32093246        cropped_image: api.CroppedImageControl,
    32103247        site_icon:     api.SiteIconControl,
     3248
    32113249        header:        api.HeaderControl,
    32123250        background:    api.BackgroundControl,
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r36687 r36698  
    218218        require_once( ABSPATH . WPINC . '/customize/class-wp-customize-cropped-image-control.php' );
    219219        require_once( ABSPATH . WPINC . '/customize/class-wp-customize-site-icon-control.php' );
     220
    220221        require_once( ABSPATH . WPINC . '/customize/class-wp-customize-header-image-control.php' );
    221222        require_once( ABSPATH . WPINC . '/customize/class-wp-customize-theme-control.php' );
     
    829830            'activeControls' => array(),
    830831            'nonce' => $this->get_nonces(),
     832
     833
     834
    831835            '_dirty' => array_keys( $this->unsanitized_post_values() ),
    832836        );
     
    18581862        $this->register_control_type( 'WP_Customize_Cropped_Image_Control' );
    18591863        $this->register_control_type( 'WP_Customize_Site_Icon_Control' );
     1864
    18601865        $this->register_control_type( 'WP_Customize_Theme_Control' );
    18611866
     
    19321937            'section'    => 'title_tagline',
    19331938        ) );
     1939
     1940
     1941
     1942
     1943
     1944
     1945
     1946
     1947
     1948
     1949
     1950
     1951
     1952
     1953
     1954
     1955
    19341956
    19351957        $this->add_setting( 'site_icon', array(
     
    19521974        ) ) );
    19531975
     1976
     1977
     1978
     1979
     1980
     1981
     1982
     1983
     1984
     1985
     1986
     1987
     1988
     1989
     1990
     1991
     1992
     1993
     1994
     1995
    19541996        /* Colors */
    19551997
     
    21802222
    21812223        return $color;
     2224
     2225
     2226
     2227
     2228
     2229
     2230
     2231
     2232
     2233
     2234
     2235
     2236
     2237
     2238
     2239
     2240
     2241
     2242
     2243
    21822244    }
    21832245}
  • trunk/src/wp-includes/customize/class-wp-customize-site-icon-control.php

    r35389 r36698  
    4242        add_action( 'customize_controls_print_styles', 'wp_site_icon', 99 );
    4343    }
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
     84
     85
     86
     87
     88
     89
     90
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109
     110
    44111}
  • trunk/src/wp-includes/general-template.php

    r36693 r36698  
    830830function has_site_icon( $blog_id = 0 ) {
    831831    return (bool) get_site_icon_url( 512, '', $blog_id );
     832
     833
     834
     835
     836
     837
     838
     839
     840
     841
     842
     843
     844
     845
     846
     847
     848
     849
     850
     851
     852
     853
     854
     855
     856
     857
     858
     859
     860
     861
     862
     863
     864
     865
     866
     867
     868
     869
     870
     871
     872
     873
     874
     875
     876
     877
     878
     879
     880
     881
     882
     883
     884
     885
     886
     887
     888
     889
     890
     891
     892
     893
     894
     895
     896
     897
     898
     899
     900
     901
     902
     903
     904
     905
     906
     907
     908
     909
     910
     911
     912
     913
     914
     915
     916
     917
     918
    832919}
    833920
  • trunk/src/wp-includes/js/customize-preview.js

    r36414 r36698  
    224224        });
    225225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
     246
     247
     248
     249
     250
     251
     252
     253
     254
     255
     256
     257
     258
     259
     260
     261
     262
     263
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
    226282        api.trigger( 'preview-ready' );
    227283    });
  • trunk/src/wp-includes/post-template.php

    r36685 r36698  
    706706    if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
    707707        $classes[] = 'custom-background';
     708
     709
     710
     711
    708712
    709713    $page = $wp_query->get( 'page' );
Note: See TracChangeset for help on using the changeset viewer.