~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-admin/privacy.php

  • Committer: Barry Price
  • Date: 2019-02-22 03:51:26 UTC
  • mfrom: (1.2.12 upstream)
  • Revision ID: barry.price@canonical.com-20190222035126-o28k38qs8jfyjsxt
Merge WP5.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
                        ) {
40
40
                                $privacy_page_updated_message = sprintf(
41
41
                                        /* translators: %s: URL to Customizer -> Menus */
42
 
                                        __( 'Privacy Policy page updated successfully. Remember to <a href="%s">update your menus</a>!' ),
 
42
                                        __( 'Privacy Policy page setting updated successfully. Remember to <a href="%s">update your menus</a>!' ),
43
43
                                        esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) )
44
44
                                );
45
45
                        }
58
58
                }
59
59
 
60
60
                $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
61
 
                $privacy_policy_page_id = wp_insert_post(
 
61
                $privacy_policy_page_id      = wp_insert_post(
62
62
                        array(
63
63
                                'post_title'   => __( 'Privacy Policy' ),
64
64
                                'post_status'  => 'draft',
165
165
 
166
166
                        ?>
167
167
                </strong></p>
168
 
                <p>
169
 
                        <?php
 
168
                <?php
 
169
        }
 
170
        ?>
 
171
        <p>
 
172
                <?php
170
173
 
 
174
                printf(
171
175
                        /* translators: 1: Privacy Policy guide URL, 2: additional link attributes, 3: accessibility text */
172
 
                        printf(
173
 
                                __( 'Need help putting together your new Privacy Policy page? <a href="%1$s" %2$s>Check out our guide%3$s</a> for recommendations on what content to include, along with policies suggested by your plugins and theme.' ),
174
 
                                admin_url( 'tools.php?wp-privacy-policy-guide' ),
175
 
                                '',
176
 
                                ''
177
 
                        );
178
 
 
179
 
                        ?>
180
 
                </p>
181
 
                <?php
182
 
        }
183
 
        ?>
 
176
                        __( 'Need help putting together your new Privacy Policy page? <a href="%1$s" %2$s>Check out our guide%3$s</a> for recommendations on what content to include, along with policies suggested by your plugins and theme.' ),
 
177
                        admin_url( 'tools.php?wp-privacy-policy-guide' ),
 
178
                        '',
 
179
                        ''
 
180
                );
 
181
 
 
182
                ?>
 
183
        </p>
 
184
 
184
185
        <hr>
185
186
        <table class="form-table tools-privacy-policy-page">
186
187
                <tr>
195
196
                        </th>
196
197
                        <td>
197
198
                                <?php
198
 
                                $has_pages = (bool) get_posts( array(
199
 
                                        'post_type' => 'page',
200
 
                                        'posts_per_page' => 1,
201
 
                                        'post_status' => array(
202
 
                                                'publish',
203
 
                                                'draft',
204
 
                                        ),
205
 
                                ) );
 
199
                                $has_pages = (bool) get_posts(
 
200
                                        array(
 
201
                                                'post_type'      => 'page',
 
202
                                                'posts_per_page' => 1,
 
203
                                                'post_status'    => array(
 
204
                                                        'publish',
 
205
                                                        'draft',
 
206
                                                ),
 
207
                                        )
 
208
                                );
206
209
 
207
 
                                if ( $has_pages ) : ?>
 
210
                                if ( $has_pages ) :
 
211
                                        ?>
208
212
                                        <form method="post" action="">
209
213
                                                <label for="page_for_privacy_policy">
210
214
                                                        <?php _e( 'Select an existing page:' ); ?>