Making WordPress.org


Ignore:
Timestamp:
12/19/2017 04:22:37 PM (9 years ago)
Author:
obenland
Message:

PLugins: Clean up formatting with phpcbf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-commit-subscriptions.php

    r3510 r6287  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\API\Routes;
     3
    34use WordPressdotorg\Plugin_Directory\Plugin_Directory;
    45use WordPressdotorg\Plugin_Directory\API\Base;
    … …  
    1415        public function __construct() {
    1516                register_rest_route( 'plugins/v1', '/plugin/(?P<plugin_slug>[^/]+)/commit-subscription', array(
    16                         'methods'  => \WP_REST_Server::READABLE,
    17                         'callback' => array( $this, 'subscribe' ),
    18                         'args' => array(
     17                        'methods'             => \WP_REST_Server::READABLE,
     18                        'callback'            => array( $this, 'subscribe' ),
     19                        'args'                => array(
    1920                                'plugin_slug' => array(
    2021                                        'validate_callback' => array( $this, 'validate_plugin_slug_callback' ),
    2122                                ),
    22                                 'subscribe' => array(
    23                                         'validate_callback' => function( $bool ) { return is_numeric( $bool ); },
     23                                'subscribe'   => array(
     24                                        'validate_callback' => function( $bool ) {
     25                                                return is_numeric( $bool );
     26                                        },
    2427                                ),
    2528                                'unsubscribe' => array(
    26                                         'validate_callback' => function( $bool ) { return is_numeric( $bool ); },
     29                                        'validate_callback' => function( $bool ) {
     30                                                return is_numeric( $bool );
     31                                        },
    2732                                ),
    2833                        ),
    29                         'permission_callback' => 'is_user_logged_in'
     34                        'permission_callback' => 'is_user_logged_in',
    3035                ) );
    3136        }
    … …  
    4247
    4348                $result = array(
    44                         "location" => $location,
     49                        'location' => $location,
    4550                );
    4651
Note: See TracChangeset for help on using the changeset viewer.