Make WordPress Core

Changeset 43161


Ignore:
Timestamp:
05/03/2018 08:09:35 PM (6 years ago)
Author:
azaozz
Message:

Privacy: Redirect to newly created Privacy Policy page to improve UX.

Previously the user was shown a message that the page was created, but might not understand that they still need to visit the page and publish it. Redirecting them to the page makes it more obvious that additional steps are involved.

Props Clorith, xkon, azaozz.
Merges [43160] to the 4.9 branch.
Fixes #43926.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/privacy.php

    r43156 r43161  
    6262            update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id );
    6363
    64             add_settings_error(
    65                 'page_for_privacy_policy',
    66                 'page_for_privacy_policy',
    67                 sprintf(
    68                     /* translators: %s: URL to edit Privacy Policy page */
    69                     __( 'Your privacy policy page created successfully. You&#8217;ll want to <a href="%s">review and edit your policy</a> next.' ),
    70                     'post.php?post=' . $privacy_policy_page_id . '&action=edit'
    71                 ),
    72                 'updated'
    73             );
     64            wp_redirect( admin_url( 'post.php?post=' . $privacy_policy_page_id . '&action=edit' ) );
     65            exit;
    7466        }
    7567    }
Note: See TracChangeset for help on using the changeset viewer.