# restrict-user-access/2.8/src/Shortcode/ShortcodeService.php

Restrict User Access – Ultimate Membership &amp; Content Protection, version 2.8. 24 lines.

- Page: https://pluginprobe.com/plugins/restrict-user-access/2.8/code/src/Shortcode/ShortcodeService.php
- Raw: https://pluginprobe.com/plugins/restrict-user-access/2.8/raw/src/Shortcode/ShortcodeService.php
- Modified: 2025-10-06T06:47:32+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/restrict-user-access/2.8/code/src/Shortcode/ShortcodeService.php#L10-L20`.

```php
<?php

namespace RestrictUserAccess\Shortcode;

/**
 * Class ShortcodeService
 *
 * @author Joachim Jensen <joachim@dev.institute>
 * @license https://www.gnu.org/licenses/gpl-3.0.html
 */
class ShortcodeService
{
    /**
     * @param ShortcodeInterface $shortcode
     * @return void
     */
    public function register(ShortcodeInterface $shortcode)
    {
        foreach ($shortcode->get_names() as $name) {
            add_shortcode($name, [$shortcode, 'get_callback']);
        }
    }
}

```
