# extendify/3.1.5/app/Shared/Controllers/ImageGenerationController.php

Extendify, version 3.1.5. 43 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.5/code/app/Shared/Controllers/ImageGenerationController.php
- Raw: https://pluginprobe.com/plugins/extendify/3.1.5/raw/app/Shared/Controllers/ImageGenerationController.php
- Modified: 2025-10-23T16:20:58+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/extendify/3.1.5/code/app/Shared/Controllers/ImageGenerationController.php#L10-L20`.

```php
<?php

/**
 * Controls Draft Settings
 */

namespace Extendify\Shared\Controllers;

defined('ABSPATH') || die('No direct access.');

use Extendify\Shared\Services\Sanitizer;

/**
 * The controller for keeping draft settings in sync
 */

class ImageGenerationController
{
    /**
     * Return the data
     *
     * @return \WP_REST_Response
     */
    public static function get()
    {
        $data = get_option('extendify_draft_settings', []);
        return new \WP_REST_Response($data);
    }

    /**
     * Persist the data
     *
     * @param \WP_REST_Request $request - The request.
     * @return \WP_REST_Response
     */
    public static function store($request)
    {
        $data = json_decode($request->get_param('state'), true);
        update_option('extendify_draft_settings', Sanitizer::sanitizeArray($data));
        return new \WP_REST_Response($data);
    }
}

```
