# code-block-pro/1.3.0/php/settings.php

Code Block Pro – Beautiful Syntax Highlighting, version 1.3.0. 24 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.3.0/code/php/settings.php
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.3.0/raw/php/settings.php
- Modified: 2022-09-04T19:29:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.3.0/code/php/settings.php#L10-L20`.

```php
<?php

defined( 'ABSPATH' ) or die;

add_action('admin_init', 'code_block_pro_register_settings');
add_action('rest_api_init', 'code_block_pro_register_settings');
function code_block_pro_register_settings() {
    register_setting('code_block_pro_settings', 'code_block_pro_settings', [
        'type' => 'object',
        'show_in_rest' => [
            'schema' => [
                'type' => 'object',
                'properties' => [
                    "version" => [ 'type' => ['string', 'number'] ],
                    'previousTheme' => [ 'type' => ['string', 'null']],
                    'previousFontFamily' => [ 'type' => ['string', 'null']],
                    'previousFontSize' => [ 'type' => ['string', 'null']],
                    'previousLineHeight' => [ 'type' => ['string', 'null']],
                ],
            ],
        ],
    ]);
}

```
