WordPress.org

Make WordPress Core

Changeset 48627


Ignore:
Timestamp:
07/26/2020 09:47:56 PM (14 months ago)
Author:
SergeyBiryukov
Message:

REST API: Use a consistent name for the textdomain schema property between plugins, themes, and block directory controllers.

Follow-up to [48242].

See #50321, #50776.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php

    r48626 r48627  
    549549            'requires_wp'  => $item['RequiresWP'],
    550550            'requires_php' => $item['RequiresPHP'],
    551             'text_domain'  => $item['TextDomain'],
     551            'textdomain'   => $item['TextDomain'],
    552552        );
    553553
     
    909909                    'context'     => array( 'view', 'edit', 'embed' ),
    910910                ),
    911                 'text_domain'  => array(
     911                'textdomain'   => array(
    912912                    'description' => __( 'The plugin\'s text domain.' ),
    913913                    'type'        => 'string',
  • trunk/tests/phpunit/tests/rest-api/rest-plugins-controller.php

    r48524 r48627  
    978978        $this->assertArrayHasKey( 'requires_wp', $properties );
    979979        $this->assertArrayHasKey( 'requires_php', $properties );
    980         $this->assertArrayHasKey( 'text_domain', $properties );
     980        $this->assertArrayHasKey( 'textdomain', $properties );
    981981    }
    982982
     
    10021002        $this->assertEquals( '5.6.0', $data['requires_php'] );
    10031003        $this->assertEquals( '5.4.0', $data['requires_wp'] );
    1004         $this->assertEquals( 'test-plugin', $data['text_domain'] );
     1004        $this->assertEquals( 'test-plugin', $data['textdomain'] );
    10051005    }
    10061006
Note: See TracChangeset for help on using the changeset viewer.