We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52e51de commit d0d3498Copy full SHA for d0d3498
1 file changed
src/S3/S3Options.php
@@ -2,6 +2,7 @@
2
3
namespace WP2Static\S3;
4
5
+use WP2Static\Options;
6
use WP2Static\OptionSpec;
7
8
/*
@@ -121,4 +122,15 @@ public static function optionSpecs(): array {
121
122
self::$cached_option_specs = $ret;
123
return $ret;
124
}
125
+
126
+ public static function getValue( string $slug ): string {
127
+ $name = self::getName( $slug );
128
+ $option_spec = self::optionSpecs()[ $name ];
129
130
+ if ( ! $option_spec ) {
131
+ throw WsLog::ex( "Unknown option: $name" );
132
+ }
133
134
+ return Options::getSpecValue( $option_spec );
135
136
0 commit comments