File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -522,9 +522,15 @@ public static function getDefaultLineDelimitedBlobValue( string $name ): array {
522522 *
523523 * @return array<string, OptionData> array of option name to option object
524524 */
525- public static function getAll () {
525+ public static function getAll (
526+ ?array $ option_specs = null
527+ ) {
526528 global $ wpdb ;
527529
530+ if ( $ option_specs === null ) {
531+ $ option_specs = self ::optionSpecs ();
532+ }
533+
528534 $ table_name = self ::getTableName ();
529535
530536 $ sql = "SELECT name, value, blob_value FROM $ table_name " ;
@@ -537,7 +543,7 @@ public static function getAll() {
537543 }
538544
539545 $ ret = [];
540- foreach ( self :: optionSpecs () as $ opt_spec ) {
546+ foreach ( $ option_specs as $ opt_spec ) {
541547 $ name = $ opt_spec ->name ;
542548 $ opt = $ options_map [ $ name ];
543549 if ( $ opt ) {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public static function renderS3Page(): void {
6767 $ view ['uploads_path ' ] = \WP2Static \SiteInfo::getPath ( 'uploads ' );
6868 $ s3_path = \WP2Static \SiteInfo::getPath ( 'uploads ' ) . 'wp2static-processed-site.s3 ' ;
6969
70- $ view ['options ' ] = Options::getAll ();
70+ $ view ['options ' ] = Options::getAll ( S3Options:: optionSpecs () );
7171
7272 $ view ['s3_url ' ] =
7373 is_file ( $ s3_path ) ?
You can’t perform that action at this time.
0 commit comments