Skip to content

Commit

Permalink
Merge pull request #479 from xwp/feature/439-theme-url
Browse files Browse the repository at this point in the history
Remove theme_url hook and use WP.org theme download url
  • Loading branch information
derekherman committed Feb 10, 2021
2 parents 1e68fa8 + cd8468f commit 6a06b2a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions php/class-onboarding-rest-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,6 @@ public function install_theme( $request ) {
include_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';
include_once ABSPATH . '/wp-admin/includes/class-theme-upgrader.php';

// @todo Remove after the theme is published to WP theme repo.
add_filter(
'themes_api',
function( $return, $action, $args ) {
if ( 'theme_information' === $action && isset( $args->slug ) && Plugin::THEME_SLUG === $args->slug ) {
return (object) [
'name' => 'Material Design Google',
'download_link' => 'https://storage.googleapis.com/xwp-mdc/theme/material-design-google.zip',
];
}

return $return;
},
10,
3
);
// @codeCoverageIgnoreEnd

$api = themes_api(
'theme_information',
[
Expand Down

0 comments on commit 6a06b2a

Please sign in to comment.