# code-engine/0.0.1/constants/init.php

Code Engine – PHP Snippets, AI Functions &amp; Automation for WordPress, version 0.0.1. 18 lines.

- Page: https://pluginprobe.com/plugins/code-engine/0.0.1/code/constants/init.php
- Raw: https://pluginprobe.com/plugins/code-engine/0.0.1/raw/constants/init.php
- Modified: 2024-06-23T02:35:18+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-engine/0.0.1/code/constants/init.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) exit;

define( 'CDEGN_OPTIONS', [] );

function cdegn_enqueue_scripts(  ) {
    $screen = get_current_screen();
    if ( $screen->id === 'settings_page_cdegn_settings' ) {
        wp_register_script( 'code-engine', CDEGN_URL . 'js/code-engine.js', [], CDEGN_VERSION, true );
        wp_enqueue_script( 'code-engine' );
        wp_localize_script( 'code-engine', 'code_engine', [
            'rest_url' => rest_url( 'code-engine/v1' ),
        ]);
    }
}

add_action( 'admin_enqueue_scripts', 'cdegn_enqueue_scripts' );
```
