Make WordPress Core


Ignore:
Timestamp:
07/19/2022 04:20:54 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use consistent placement for ::prepare_links() methods.

This moves the ::prepare_links() methods in REST API classes next to ::prepare_item_for_response() where they are used, to bring some consistency across the classes and make code navigation easier.

Includes wrapping some long lines for better readability.

Follow-up to [52079], [52051], [52342], [53721], [53722].

See #55647.

File:
1 edited

Legend:

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

    r51958 r53724  
    654654        return array(
    655655            'self' => array(
    656                 'href' => rest_url( sprintf( '%s/users/%d/application-passwords/%s', $this->namespace, $user->ID, $item['uuid'] ) ),
     656                'href' => rest_url(
     657                    sprintf(
     658                        '%s/users/%d/application-passwords/%s',
     659                        $this->namespace,
     660                        $user->ID,
     661                        $item['uuid']
     662                    )
     663                ),
    657664            ),
    658665        );
Note: See TracChangeset for help on using the changeset viewer.