| 1 |
<?php |
| 2 |
|
| 3 |
namespace RestrictUserAccess\Shortcode; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class ShortcodeService |
| 7 |
* |
| 8 |
* @author Joachim Jensen <joachim@dev.institute> |
| 9 |
* @license https://www.gnu.org/licenses/gpl-3.0.html |
| 10 |
*/ |
| 11 |
class ShortcodeService |
| 12 |
{ |
| 13 |
/** |
| 14 |
* @param ShortcodeInterface $shortcode |
| 15 |
* @return void |
| 16 |
*/ |
| 17 |
public function register(ShortcodeInterface $shortcode) |
| 18 |
{ |
| 19 |
foreach ($shortcode->get_names() as $name) { |
| 20 |
add_shortcode($name, [$shortcode, 'get_callback']); |
| 21 |
} |
| 22 |
} |
| 23 |
} |
| 24 |
|