Skip to content

Commit

Permalink
PLANET-7227 Enable new Media Archive implementation
Browse files Browse the repository at this point in the history
Ref: https://jira.greenpeace.org/browse/PLANET-7227

---

It practically removes the feature flag
and enables the new implementation by default.
  • Loading branch information
comzeradd committed Oct 17, 2023
1 parent 3998e2a commit ad5bf81
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 64 deletions.
6 changes: 1 addition & 5 deletions src/AdminAssets.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace P4\MasterTheme;

use P4\MasterTheme\Features\MediaArchive;

/**
* Add assets to admin pages
*/
Expand All @@ -16,9 +14,7 @@ class AdminAssets
*/
public static function enqueue_js(): void
{
if (MediaArchive::is_active()) {
self::enqueue_media_archive_script();
}
self::enqueue_media_archive_script();

if (get_current_screen()->id !== 'nav-menus') {
return;
Expand Down
49 changes: 0 additions & 49 deletions src/Features/MediaArchive.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/MediaArchive/Rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Exception;
use P4\MasterTheme\Capability;
use P4\MasterTheme\Exception\RemoteCallFailed;
use P4\MasterTheme\Features\MediaArchive;
use WP_Http;
use WP_REST_Request;
use WP_REST_Response;
Expand All @@ -25,9 +24,6 @@ class Rest
*/
public static function register_endpoints(): void
{
if (! MediaArchive::is_active()) {
return;
}
$fetch_archive_images = static function (WP_REST_Request $request) {
try {
$api_client = ApiClient::from_cache_or_credentials();
Expand Down
4 changes: 0 additions & 4 deletions src/MediaArchive/UiIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace P4\MasterTheme\MediaArchive;

use P4\MasterTheme\Capability;
use P4\MasterTheme\Features\MediaArchive;
use P4\MasterTheme\Loader;

/**
Expand All @@ -24,9 +23,6 @@ public function __construct()
*/
private static function hooks(): void
{
if (! MediaArchive::is_active()) {
return;
}
add_action('admin_menu', [ self::class, 'picker_page' ], 10);
add_action('admin_menu', [ self::class, 'ml_credentials_page' ], 10);
}
Expand Down
2 changes: 0 additions & 2 deletions src/Settings/Features.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use P4\MasterTheme\Features\Dev\ListingPageGridView;
use P4\MasterTheme\Features\Dev\WPTemplateEditor;
use P4\MasterTheme\Features\EngagingNetworks;
use P4\MasterTheme\Features\MediaArchive;
use P4\MasterTheme\Features\LazyYoutubePlayer;
use P4\MasterTheme\Features\PurgeOnFeatureChanges;
use P4\MasterTheme\Features\RedirectRedirectPages;
Expand Down Expand Up @@ -105,7 +104,6 @@ public static function all_features(): array
// Perhaps an alphabetical order within a group would make most sense?
// That way controlling whether the feature is live is in one place.
return [
MediaArchive::class,
EngagingNetworks::class,
CloudflareDeployPurge::class,
PurgeOnFeatureChanges::class,
Expand Down

0 comments on commit ad5bf81

Please sign in to comment.