174 | | <form method="post" action=""> |
175 | | <label for="page_for_privacy_policy"> |
176 | | <?php _e( 'Either select an existing page:' ); ?> |
177 | | </label> |
178 | | <input type="hidden" name="action" value="set-privacy-page" /> |
179 | | <?php |
180 | | wp_dropdown_pages( |
181 | | array( |
182 | | 'name' => 'page_for_privacy_policy', |
183 | | 'show_option_none' => __( '— Select —' ), |
184 | | 'option_none_value' => '0', |
185 | | 'selected' => $privacy_policy_page_id, |
186 | | 'post_status' => array( 'draft', 'publish' ), |
187 | | ) |
188 | | ); |
189 | | |
190 | | wp_nonce_field( 'set-privacy-page' ); |
191 | | |
192 | | submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); |
193 | | ?> |
194 | | </form> |
| 174 | <?php |
| 175 | $page_list = wp_dropdown_pages( |
| 176 | array( |
| 177 | 'post_status' => array( 'draft', 'publish' ), |
| 178 | 'echo' => 0, |
| 179 | ) |
| 180 | ); |
| 181 | if ( !empty ( $page_list ) ) : ?> |
| 182 | <form method="post" action=""> |
| 183 | <label for="page_for_privacy_policy"> |
| 184 | <?php _e( 'Either select an existing page:' ); ?> |
| 185 | </label> |
| 186 | <input type="hidden" name="action" value="set-privacy-page" /> |
| 187 | <?php |
| 188 | wp_dropdown_pages( |
| 189 | array( |
| 190 | 'name' => 'page_for_privacy_policy', |
| 191 | 'show_option_none' => __( '— Select —' ), |
| 192 | 'option_none_value' => '0', |
| 193 | 'selected' => $privacy_policy_page_id, |
| 194 | 'post_status' => array( 'draft', 'publish' ), |
| 195 | ) |
| 196 | ); |
| 197 | |
| 198 | wp_nonce_field( 'set-privacy-page' ); |
| 199 | |
| 200 | submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); |
| 201 | ?> |
| 202 | </form> |
| 203 | <?php endif; ?> |