• 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 / twentytwenty_get_elements_array() – Get an array of elements.

You appear to be a bot. Output may be restricted

Description

Get an array of elements.

Usage

$array = twentytwenty_get_elements_array();

Parameters

Returns

array

Source

File name: twentytwenty/functions.php
Lines:

1 to 66 of 66
function twentytwenty_get_elements_array() {

  // The array is formatted like this:
  // [key-in-saved-setting][sub-key-in-setting][css-property] = [elements].
  $elements = array(
    'content'       => array(
      'accent'     => array(
        'color'            => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
        'border-color'     => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
        'background-color' => array( 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ),
        'fill'             => array( '.fill-children-accent', '.fill-children-accent *' ),
      ),
      'background' => array(
        'color'            => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link', '.has-background.has-primary-background-color:not(.has-text-color)', '.has-background.has-primary-background-color *:not(.has-text-color)', '.has-background.has-accent-background-color:not(.has-text-color)', '.has-background.has-accent-background-color *:not(.has-text-color)' ),
        'background-color' => array( ':root .has-background-background-color' ),
      ),
      'text'       => array(
        'color'            => array( 'body', '.entry-title a', ':root .has-primary-color' ),
        'background-color' => array( ':root .has-primary-background-color' ),
      ),
      'secondary'  => array(
        'color'            => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ),
        'background-color' => array( ':root .has-secondary-background-color' ),
      ),
      'borders'    => array(
        'border-color'        => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ),
        'background-color'    => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
        'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
        'border-top-color'    => array( '.wp-block-latest-posts.is-grid li' ),
        'color'               => array( ':root .has-subtle-background-color' ),
      ),
    ),
    'header-footer' => array(
      'accent'     => array(
        'color'            => array( 'body:not(.overlay-header) .primary-menu > li > a', 'body:not(.overlay-header) .primary-menu > li > .icon', '.modal-menu a', '.footer-menu a, .footer-widgets a', '#site-footer .wp-block-button.is-style-outline', '.wp-block-pullquote:before', '.singular:not(.overlay-header) .entry-header a', '.archive-header a', '.header-footer-group .color-accent', '.header-footer-group .color-accent-hover:hover' ),
        'background-color' => array( '.social-icons a', '#site-footer button:not(.toggle)', '#site-footer .button', '#site-footer .faux-button', '#site-footer .wp-block-button__link', '#site-footer .wp-block-file__button', '#site-footer input[type="button"]', '#site-footer input[type="reset"]', '#site-footer input[type="submit"]' ),
      ),
      'background' => array(
        'color'            => array( '.social-icons a', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),
        'background-color' => array( '#site-header', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal', '.menu-modal-inner', '.search-modal-inner', '.archive-header', '.singular .entry-header', '.singular .featured-media:before', '.wp-block-pullquote:before' ),
      ),
      'text'       => array(
        'color'               => array( '.header-footer-group', 'body:not(.overlay-header) #site-header .toggle', '.menu-modal .toggle' ),
        'background-color'    => array( 'body:not(.overlay-header) .primary-menu ul' ),
        'border-bottom-color' => array( 'body:not(.overlay-header) .primary-menu > li > ul:after' ),
        'border-left-color'   => array( 'body:not(.overlay-header) .primary-menu ul ul:after' ),
      ),
      'secondary'  => array(
        'color' => array( '.site-description', 'body:not(.overlay-header) .toggle-inner .toggle-text', '.widget .post-date', '.widget .rss-date', '.widget_archive li', '.widget_categories li', '.widget cite', '.widget_pages li', '.widget_meta li', '.widget_nav_menu li', '.powered-by-wordpress', '.to-the-top', '.singular .entry-header .post-meta', '.singular:not(.overlay-header) .entry-header .post-meta a' ),
      ),
      'borders'    => array(
        'border-color'     => array( '.header-footer-group pre', '.header-footer-group fieldset', '.header-footer-group input', '.header-footer-group textarea', '.header-footer-group table', '.header-footer-group table *', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal nav *', '.footer-widgets-outer-wrapper', '.footer-top' ),
        'background-color' => array( '.header-footer-group table caption', 'body:not(.overlay-header) .header-inner .toggle-wrapper::before' ),
      ),
    ),
  );

  
/**
* Filters Twenty Twenty theme elements
*
* @since Twenty Twenty 1.0
*
* @param array Array of elements
*/
  return apply_filters( 'twentytwenty_get_elements_array', $elements );
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 16th June 2020

Primary Sidebar

Information

Function name: twentytwenty_get_elements_array
Plugin ref: Twenty Twenty
Version: 1.6
Sourcefile: functions.php
File ref: functions.php
Deprecated?: No
API Letters: A,E,G,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 5.6.2. PHP: 7.3.27
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-2021. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites