register_initial_settings() – Registers default settings available in WordPress.

You appear to be a bot. Output may be restricted

Description

Registers default settings available in WordPress.

The settings registered here are primarily useful for the REST API, so this does not encompass all settings available in WordPress.

Usage

register_initial_settings();

Parameters

Returns

void

Source

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


Lines:

1 to 100 of 215
function register_initial_settings() {
  register_setting(
    'general',
    'blogname',
    array(
      'show_in_rest' => array(
        'name' => 'title',
      ),
      'type'         => 'string',
      'description'  => __( 'Site title.' ),
    )
  );

  register_setting(
    'general',
    'blogdescription',
    array(
      'show_in_rest' => array(
        'name' => 'description',
      ),
      'type'         => 'string',
      'description'  => __( 'Site tagline.' ),
    )
  );

  if ( ! is_multisite() ) {
    register_setting(
      'general',
      'siteurl',
      array(
        'show_in_rest' => array(
          'name'   => 'url',
          'schema' => array(
            'format' => 'uri',
          ),
        ),
        'type'         => 'string',
        'description'  => __( 'Site URL.' ),
      )
    );
  }

  if ( ! is_multisite() ) {
    register_setting(
      'general',
      'admin_email',
      array(
        'show_in_rest' => array(
          'name'   => 'email',
          'schema' => array(
            'format' => 'email',
          ),
        ),
        'type'         => 'string',
        'description'  => __( 'This address is used for admin purposes, like new user notification.' ),
      )
    );
  }

  register_setting(
    'general',
    'timezone_string',
    array(
      'show_in_rest' => array(
        'name' => 'timezone',
      ),
      'type'         => 'string',
      'description'  => __( 'A city in the same timezone as you.' ),
    )
  );

  register_setting(
    'general',
    'date_format',
    array(
      'show_in_rest' => true,
      'type'         => 'string',
      'description'  => __( 'A date format for all date strings.' ),
    )
  );

  register_setting(
    'general',
    'time_format',
    array(
      'show_in_rest' => true,
      'type'         => 'string',
      'description'  => __( 'A time format for all time strings.' ),
    )
  );

  register_setting(
    'general',
    'start_of_week',
    array(
      'show_in_rest' => true,
      'type'         => 'integer',
      'description'  => __( 'A day number of the week that the week should start on.' ),
    )
  );

 View on GitHub View on Trac