ampproject / ampproject/amp-wp

Add ability to override whether mobile switcher link is displayed

Open
#5,386 3 comments 3 reactions 0 assignees View on GitHub
Enhancement P2 WS:Core
Dominant language
PHP
Stars
1.8k
Forks
378
Avg merge
1d 15h
Merged PRs (30d)
10

Description

## Feature description

There have been a few requests regarding the mobile switcher link in the footer. Some users in Transitional mode have an AMP version that is complete parity with non-AMP version. See [support topic](https://wordpress.org/support/topic/translate-and-or-remove-exit-mobile-version-text/). For them, they may want to still have mobile redirection enabled, but skip showing the link.

What remains to be determined is whether there should be UI for this. If so, then the Mobile Redirection section on the settings screen should perhaps be turned into a _drawer_. The redirection toggle can then go into this drawer, along with a toggle for whether to show the mobile switcher link on AMP pages, and conversely whether to show the corresponding same link on non-AMP pages. Otherwise, we may opt to control this all programmatically via a filter like `amp_mobile_version_switcher_link_displayed` (and as mentioned in #5378, if such a filter has been added then any corresponding UI would need to be disabled since it would be potentially overridden).

This is closely related to #5293 (and perhaps an expansion thereof) where some users in Reader mode do not want to have mobile redirection enabled, and yet they really miss the "Exit reader mode" link in the header. For such users, they should be able to force the mobile switcher link to be displayed even though mobile redirection is disabled.

For whether we add a UI, we need to gather more data to learn whether it is a common enough request to add UI complexity. However, if this is collapsed in a Mobile Redirection drawer, then this would be mitigated.

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

* Users with mobile direction enabled can opt to hide the mobile version switcher link on AMP pages.

## Implementation brief

*

## QA testing instructions

*

## Demo

*

## Changelog entry

*

Contributor guide

Open the contributing guide

Research direction

Start with the acceptance criterion and related issues #5378 and #5293, then review the existing mobile redirection and mobile switcher-link entry points in the plugin. Determine whether the behavior should use settings UI or a filter, and verify that enabled redirection can hide the link on AMP pages. Done means the acceptance criterion is met and the behavior has QA coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.