# extendify/3.1.5/app/QuickEdit/Schemas/SocialLink.php

Extendify, version 3.1.5. 36 lines.

- Page: https://pluginprobe.com/plugins/extendify/3.1.5/code/app/QuickEdit/Schemas/SocialLink.php
- Raw: https://pluginprobe.com/plugins/extendify/3.1.5/raw/app/QuickEdit/Schemas/SocialLink.php
- Modified: 2026-06-11T18:37:12+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/QuickEdit/Schemas/SocialLink.php#L10-L20`.

```php
<?php

namespace Extendify\QuickEdit\Schemas;

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

class SocialLink implements Schema
{
    public function fields(): array
    {
        return [
            [
                'key'     => 'url',
                'control' => 'link',
                'label'   => __('Link URL', 'extendify-local'),
            ],
        ];
    }

    public function apply(array $block, string $fieldKey, $value): array
    {
        if ($fieldKey !== 'url') {
            return $block;
        }
        $url = is_string($value) ? esc_url_raw($value) : '';
        $attrs = $block['attrs'] ?? [];
        if ($url === '') {
            unset($attrs['url']);
        } else {
            $attrs['url'] = $url;
        }
        $block['attrs'] = $attrs;
        return $block;
    }
}

```
