|
11 | 11 | use AMP_Options_Manager; |
12 | 12 | use AMP_Validated_URL_Post_Type; |
13 | 13 | use AMP_Validation_Manager; |
| 14 | +use AmpProject\AmpWP\DependencySupport; |
14 | 15 | use AmpProject\AmpWP\DevTools\UserAccess; |
15 | 16 | use AmpProject\AmpWP\Infrastructure\Delayed; |
16 | 17 | use AmpProject\AmpWP\Infrastructure\Registerable; |
@@ -72,19 +73,28 @@ final class OnboardingWizardSubmenuPage implements Delayed, Registerable, Servic |
72 | 73 | */ |
73 | 74 | private $loading_error; |
74 | 75 |
|
| 76 | + /** |
| 77 | + * DependencySupport instance. |
| 78 | + * |
| 79 | + * @var DependencySupport |
| 80 | + */ |
| 81 | + private $dependency_support; |
| 82 | + |
75 | 83 | /** |
76 | 84 | * OnboardingWizardSubmenuPage constructor. |
77 | 85 | * |
78 | | - * @param GoogleFonts $google_fonts An instance of the GoogleFonts service. |
79 | | - * @param ReaderThemes $reader_themes An instance of the ReaderThemes class. |
80 | | - * @param RESTPreloader $rest_preloader An instance of the RESTPreloader class. |
81 | | - * @param LoadingError $loading_error An instance of the LoadingError class. |
| 86 | + * @param GoogleFonts $google_fonts An instance of the GoogleFonts service. |
| 87 | + * @param ReaderThemes $reader_themes An instance of the ReaderThemes class. |
| 88 | + * @param RESTPreloader $rest_preloader An instance of the RESTPreloader class. |
| 89 | + * @param LoadingError $loading_error An instance of the LoadingError class. |
| 90 | + * @param DependencySupport $dependency_support An instance of the DependencySupport class. |
82 | 91 | */ |
83 | | - public function __construct( GoogleFonts $google_fonts, ReaderThemes $reader_themes, RESTPreloader $rest_preloader, LoadingError $loading_error ) { |
84 | | - $this->google_fonts = $google_fonts; |
85 | | - $this->reader_themes = $reader_themes; |
86 | | - $this->rest_preloader = $rest_preloader; |
87 | | - $this->loading_error = $loading_error; |
| 92 | + public function __construct( GoogleFonts $google_fonts, ReaderThemes $reader_themes, RESTPreloader $rest_preloader, LoadingError $loading_error, DependencySupport $dependency_support ) { |
| 93 | + $this->google_fonts = $google_fonts; |
| 94 | + $this->reader_themes = $reader_themes; |
| 95 | + $this->rest_preloader = $rest_preloader; |
| 96 | + $this->loading_error = $loading_error; |
| 97 | + $this->dependency_support = $dependency_support; |
88 | 98 | } |
89 | 99 |
|
90 | 100 | /** |
@@ -250,6 +260,7 @@ public function enqueue_assets( $hook_suffix ) { |
250 | 260 | 'screenshot' => $theme->get_screenshot() ?: null, |
251 | 261 | 'url' => $theme->get( 'ThemeURI' ), |
252 | 262 | ], |
| 263 | + 'HAS_DEPENDENCY_SUPPORT' => $this->dependency_support->has_support(), |
253 | 264 | 'USING_FALLBACK_READER_THEME' => $this->reader_themes->using_fallback_theme(), |
254 | 265 | 'SCANNABLE_URLS_REST_PATH' => '/amp/v1/scannable-urls', |
255 | 266 | 'SETTINGS_LINK' => $amp_settings_link, |
|
0 commit comments