wp-includes/block-supports/colors.php


Lines:

1 to 23 of 23
<?php

/**
 * Colors block support flag.
 *
 * @package WordPress
 * @since 5.6.0
 */

/* function wp_register_colors_support() – Registers the style and colors block attributes for block types that support it. */


/* function wp_apply_colors_support() – Add CSS classes and inline styles for colors to the incoming attributes array. */

// Register the block support.
WP_Block_Supports::get_instance()->register(
  'colors',
  array(
    'register_attribute' => 'wp_register_colors_support',
    'apply'              => 'wp_apply_colors_support',
  )
);
 

 View on GitHub View on Trac

Called by

    Invoked by

      Call hooks

      API Letters: ,,,,