create_initial_theme_features() – Creates the initial theme features when the ‘setup_theme’ action is fired.

You appear to be a bot. Output may be restricted

Description

Creates the initial theme features when the 'setup_theme' action is fired.

See setup_themesetup_theme .

Usage

create_initial_theme_features();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/theme.php


Lines:

1 to 100 of 371
function create_initial_theme_features() {
  register_theme_feature(
    'align-wide',
    array(
      'description'  => __( 'Whether theme opts in to wide alignment CSS class.' ),
      'show_in_rest' => true,
    )
  );
  register_theme_feature(
    'automatic-feed-links',
    array(
      'description'  => __( 'Whether posts and comments RSS feed links are added to head.' ),
      'show_in_rest' => true,
    )
  );
  register_theme_feature(
    'block-templates',
    array(
      'description'  => __( 'Whether a theme uses block-based templates.' ),
      'show_in_rest' => true,
    )
  );
  register_theme_feature(
    'custom-background',
    array(
      'description'  => __( 'Custom background if defined by the theme.' ),
      'type'         => 'object',
      'show_in_rest' => array(
        'schema' => array(
          'properties' => array(
            'default-image'      => array(
              'type'   => 'string',
              'format' => 'uri',
            ),
            'default-preset'     => array(
              'type' => 'string',
              'enum' => array(
                'default',
                'fill',
                'fit',
                'repeat',
                'custom',
              ),
            ),
            'default-position-x' => array(
              'type' => 'string',
              'enum' => array(
                'left',
                'center',
                'right',
              ),
            ),
            'default-position-y' => array(
              'type' => 'string',
              'enum' => array(
                'left',
                'center',
                'right',
              ),
            ),
            'default-size'       => array(
              'type' => 'string',
              'enum' => array(
                'auto',
                'contain',
                'cover',
              ),
            ),
            'default-repeat'     => array(
              'type' => 'string',
              'enum' => array(
                'repeat-x',
                'repeat-y',
                'repeat',
                'no-repeat',
              ),
            ),
            'default-attachment' => array(
              'type' => 'string',
              'enum' => array(
                'scroll',
                'fixed',
              ),
            ),
            'default-color'      => array(
              'type' => 'string',
            ),
          ),
        ),
      ),
    )
  );
  register_theme_feature(
    'custom-header',
    array(
      'description'  => __( 'Custom header if defined by the theme.' ),
      'type'         => 'object',
      'show_in_rest' => array(
        'schema' => array(
          'properties' => array(

 View on GitHub View on Trac