[wp-trac] [WordPress Trac] #55900: Installer screen, when submitting a faulty form the search engine checkbox is reset

WordPress Trac noreply at wordpress.org
Wed Aug 17 02:43:53 UTC 2022


#55900: Installer screen, when submitting a faulty form the search engine checkbox
is reset
-------------------------------------------------+-------------------------
 Reporter:  ramon fincken                        |       Owner:  whaze
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  Upgrade/Install                      |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots has-patch needs-     |     Focuses:  ui
  testing changes-requested dev-feedback         |
-------------------------------------------------+-------------------------
Changes (by costdev):

 * keywords:
     has-screenshots has-patch needs-testing changes-requested dev-feedback
     2nd-opinion
     => has-screenshots has-patch needs-testing changes-requested dev-
     feedback


Comment:

 I concur with @khokansardar's suggestion that
 [https://github.com/WordPress/wordpress-develop/pull/2772/ PR 2772] is a
 better approach.

 It's also worth noting that the `blog_privacy_selector` action exists,
 [https://github.com/WordPress/wordpress-develop/pull/2777 PR 2777] will
 currently fail to maintain the previously selected option.

 This would require
 {{{#!php
 <?php
 // PR 2777: Line 198
 $checked = ( isset( $_POST['blog_public'] ) && $blog_public ) ? '
 checked="checked"' : '';
 }}}
 to be moved to ~Line 186 and `$checked` also used on Lines 189 and 191.
 Rather than making multiple changes here, [https://github.com/WordPress
 /wordpress-develop/pull/2772/ PR 2772] makes a single change that works
 with and without the `blog_privacy_selector` action being used.

 To test the `blog_privacy_selector`, you can drop this into a Must-Use
 plugin prior to visiting the install screen.

 {{{#!php
 <?php

 /**
  * Plugin Name: Blog Privacy Selector
  * Description: Enables radio options for search engine visibility.
  * Author:      WordPress Core Contributors
  * Author URI:  https://make.wordpress.org/core
  * License:     GPLv2 or later
  * Version:     1.0.0
  */

 // Comment this out to test without the blog privacy selector.
 add_action( 'blog_privacy_selector', '__return_empty_string' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55900#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list