Make WordPress Core


Ignore:
Timestamp:
07/16/2018 01:29:11 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: on the Privacy Settings screen change view to preview when a draft page is selected for the privacy policy.

Props garrett-eclipse, desrosj.
Merges [43374] to the 4.9 branch.
Fixes #44131.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

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

    r43358 r43453  
    156156            <?php
    157157
    158             /* translators: 1: URL to edit page, 2: URL to view page */
    159             printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy page content.' ), $edit_href, $view_href );
     158            if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) {
     159                /* translators: 1: URL to edit page, 2: URL to view page */
     160                printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy page content.' ), $edit_href, $view_href );
     161            } else {
     162                /* translators: 1: URL to edit page, 2: URL to preview page */
     163                printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">preview</a> your privacy policy page content.' ), $edit_href, $view_href );
     164            }
    160165
    161166            ?>
Note: See TracChangeset for help on using the changeset viewer.