• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / twentyfifteen_get_color_scheme_css() – Returns CSS for the color schemes.

You appear to be a bot. Output may be restricted

Description

Returns CSS for the color schemes.

Usage

$string = twentyfifteen_get_color_scheme_css( $colors );

Parameters

$colors
( array ) required – Color scheme colors.

Returns

string Color scheme CSS.

Source

File name: twentyfifteen/inc/customizer.php
Lines:

1 to 100 of 396
function twentyfifteen_get_color_scheme_css( $colors ) {
  $colors = wp_parse_args(
    $colors,
    array(
      'background_color'            => '',
      'header_background_color'     => '',
      'box_background_color'        => '',
      'textcolor'                   => '',
      'secondary_textcolor'         => '',
      'border_color'                => '',
      'border_focus_color'          => '',
      'sidebar_textcolor'           => '',
      'sidebar_border_color'        => '',
      'sidebar_border_focus_color'  => '',
      'secondary_sidebar_textcolor' => '',
      'meta_box_background_color'   => '',
    )
  );

  $css = <<<CSS
	/* Color Scheme */

	/* Background Color */
	body {
		background-color: {$colors['background_color']};
	}

	/* Sidebar Background Color */
	body:before,
	.site-header {
		background-color: {$colors['header_background_color']};
	}

	/* Box Background Color */
	.post-navigation,
	.pagination,
	.secondary,
	.site-footer,
	.hentry,
	.page-header,
	.page-content,
	.comments-area,
	.widecolumn {
		background-color: {$colors['box_background_color']};
	}

	/* Box Background Color */
	button,
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	.pagination .prev,
	.pagination .next,
	.widget_calendar tbody a,
	.widget_calendar tbody a:hover,
	.widget_calendar tbody a:focus,
	.page-links a,
	.page-links a:hover,
	.page-links a:focus,
	.sticky-post {
		color: {$colors['box_background_color']};
	}

	/* Main Text Color */
	button,
	input[type="button"],
	input[type="reset"],
	input[type="submit"],
	.pagination .prev,
	.pagination .next,
	.widget_calendar tbody a,
	.page-links a,
	.sticky-post {
		background-color: {$colors['textcolor']};
	}

	/* Main Text Color */
	body,
	blockquote cite,
	blockquote small,
	a,
	.dropdown-toggle:after,
	.image-navigation a:hover,
	.image-navigation a:focus,
	.comment-navigation a:hover,
	.comment-navigation a:focus,
	.widget-title,
	.entry-footer a:hover,
	.entry-footer a:focus,
	.comment-metadata a:hover,
	.comment-metadata a:focus,
	.pingback .edit-link a:hover,
	.pingback .edit-link a:focus,
	.comment-list .reply a:hover,
	.comment-list .reply a:focus,
	.site-info a:hover,
	.site-info a:focus {
		color: {$colors['textcolor']};
	}

 
[1] [2] [3] [4] Next »

 View on Trac

Published: 19th December 2019 | Last updated: 19th December 2019

Primary Sidebar

Information

Function name: twentyfifteen_get_color_scheme_css
Plugin ref: Twenty Fifteen
Version: 3.3
Sourcefile: inc/customizer.php
File ref: inc/customizer.php
Deprecated?: No
API Letters: C,G,S,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites