Make WordPress Core


Ignore:
Timestamp:
01/26/2026 07:02:04 PM (3 months ago)
Author:
jorbin
Message:

General: Use legacy content properties for CSS icons.

In modern browsers the CSS content property provides alt text support for assistive technology in the form display / alt text. This introduces support for legacy browsers that do not support the new syntax.

CSS content properties take advantage of the CSS cascade and browsers ignoring values they don't understand by adding duplicate content properties in the form:

content: display;
content: display / alt text;
Modern browsers will use the second property, legacy browsers will use the first.

Follow-up to [60885] for #63603.

Reviewed by wildworks, jorbin.
Merges [61480] to the 6.9 branch.

Props acmoifr, joedolson, jorbin, mydesign78, ov3rfly, peterwilsoncc, presskopp, sabernhardt, siliconforks, swissspidy, threadi, wildworks, wolf45.
Fixes #64350.

Location:
branches/6.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.9

  • branches/6.9/tests/phpunit/tests/pluggable/wpMail.php

    r61393 r61531  
    412412
    413413    /**
    414      * Test that the Sender field in the SMTP envelope is set by Core.
    415      *
    416      * A missing Sender field can lead to messages failing DMARC SPF checks.
    417      *
    418      * @ticket 49687
    419      */
    420     public function test_wp_mail_sender_set() {
    421         wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should have been set.' );
    422 
    423         $mailer = tests_retrieve_phpmailer_instance();
    424 
    425         $this->assertSame( 'wordpress@example.org', $mailer->Sender );
     414     * Test that the Sender field in the SMTP envelope is not set by Core.
     415     *
     416     * Correctly setting the Sender requires knowledge that is not available
     417     * to Core. An incorrect value will often lead to messages being rejected
     418     * by the receiving MTA, so it's the admin's responsibility to
     419     * set it correctly.
     420     *
     421     * @ticket 37736
     422     */
     423    public function test_wp_mail_sender_not_set() {
     424        wp_mail( 'user@example.org', 'Testing the Sender field', 'The Sender field should not have been set.' );
     425
     426        $mailer = tests_retrieve_phpmailer_instance();
     427
     428        $this->assertSame( '', $mailer->Sender );
    426429    }
    427430
Note: See TracChangeset for help on using the changeset viewer.