PluginProbe
Blocks – Reusable Content, Shortcodes & Site Variables / trunk
Blocks – Reusable Content, Shortcodes & Site Variables vtrunk
26.09.03.15 26.08.31.21 26.08.22.20 26.08.22.22 26.08.22.17 26.08.22.13 26.08.21.19 26.08.07.23 26.07.19.14 26.07.13.21 26.07.13.17 26.07.12.13 026.07.07.21 026.07.05.18 026.06.26.20 026.06.26.21 026.06.08.20 026.05.13.14 026.04.29.10 trunk 026.02.22.22 026.03.16.23 026.04.23.13
blocks / src / Settings / PublicTokenRegistry.php

PublicTokenRegistry.php in Blocks – Reusable Content, Shortcodes & Site Variables trunk, at src/Settings/PublicTokenRegistry.php

40 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace RenzoJohnson\Blocks\Settings;
6
7 \defined( 'ABSPATH' ) || exit;
8
9 final class PublicTokenRegistry {
10 /** @var array<string, string> */
11 private const TOKENS = array(
12 'blocks_favicon' => 'favicon_url',
13 'blocks_logo' => 'logo_url',
14 'blocks_logo_inverse' => 'logo_inverse_url',
15 'blocks_default_social_image' => 'social_image_url',
16 'blocks_place_id' => 'place_id',
17 'blocks_ga4_measurement_id' => 'ga4_measurement_id',
18 'blocks_site_title' => 'site_title',
19 'blocks_tagline' => 'tagline',
20 'blocks_company_name' => 'company_name',
21 'blocks_email' => 'email',
22 'blocks_phone' => 'phone',
23 'blocks_address' => 'address',
24 'blocks_facebook' => 'facebook',
25 'blocks_twitter' => 'twitter',
26 'blocks_instagram' => 'instagram',
27 'blocks_linkedin' => 'linkedin',
28 'blocks_youtube' => 'youtube',
29 );
30
31 /** @return array<string, string> */
32 public static function all(): array {
33 return self::TOKENS;
34 }
35
36 public static function for_option( string $option_name ): ?string {
37 return self::TOKENS[ $option_name ] ?? null;
38 }
39 }
40