Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mobile Apps: completely remove the edit post link when in app
Fixes wordpress-mobile/WordPress-iOS#13314 This issue was introduced in #12867. The original goal of this change was to to hide the Edit Post link whenever you would access your site via the mobile app's in-app browser. To hide the Edit Post link, we originally opted to hook into the edit_post_link filter. While this works, it only changes the string returned for the Edit Post link itself. It does not account for any "before" or "after" parameters that may be passed when calling the edit_post_link function; those are not part of the filter: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1439 Instead, let's shortcircuit that link earlier, by hooking into the get_edit_post_link filter. If that filter is set to return an empty string, the edit_post_link function will return early: https://github.com/WordPress/WordPress/blob/001ffe81fbec4438a9f594f330e18103d21fbcd7/wp-includes/link-template.php#L1420
- Loading branch information