WordPress.org

Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #23477


Ignore:
Timestamp:
02/14/13 23:26:12 (2 years ago)
Author:
nacin
Comment:

Could you provide a specific example, with expected and actual results? Could make it easier to understand.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23477

    • Property Severity changed from normal to minor
    • Property Summary changed from Change 21789 creates a breaking change in behavior for get_submit_button to r21789 creates a breaking change in behavior for get_submit_button
  • Ticket #23477 – Description

    initial v3  
    1 A recent change made to get_submit_button (http://core.trac.wordpress.org/changeset/21789/trunk/wp-admin/includes/template.php) has caused an unwanted change in behavior for a button on a site I maintain. Previously, the string passed as the second argument, `$type`, was matched against a switch statement with several unique cases. In the event of a non-match in the switch, the default action prior to #21789 was to assign the parameter's value as the `$class` string without altering it. 
     1A recent change made to get_submit_button (http://core.trac.wordpress.org/changeset/21789/trunk/wp-admin/includes/template.php) has caused an unwanted change in behavior for a button on a site I maintain. Previously, the string passed as the second argument, `$type`, was matched against a switch statement with several unique cases. In the event of a non-match in the switch, the default action prior to [21789] was to assign the parameter's value as the `$class` string without altering it. 
    22 
    3 The change introduced in #21789 now breaks a string into individual classes, which prevents the use of the unique class names within a string of additional class names. For example, the string `button-secondary save-button action` used to generate a class string in HTML of `button-secondary save-button action`, but now generates the unexpected result `button save-button action` (note lack of '-secondary') because it matches against the following if check on line 1600: 
     3The change introduced in [21789] now breaks a string into individual classes, which prevents the use of the unique class names within a string of additional class names. For example, the string `button-secondary save-button action` used to generate a class string in HTML of `button-secondary save-button action`, but now generates the unexpected result `button save-button action` (note lack of '-secondary') because it matches against the following if check on line 1600: 
    44 
    55`if ( 'secondary' === $t || 'button-secondary' === $t )`