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/class-base.php

    r5867 r6287  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\API;
     3
    34use WordPressdotorg\Plugin_Directory\Plugin_Directory;
     5use WordPressdotorg\Plugin_Directory\Plugin_I18n;
     6use WordPressdotorg\Plugin_Directory\Template;
    47
    58/**
    69 * @package WordPressdotorg_Plugin_Directory
    710 */
    8 
    911class Base {
    1012        /**
    11          * Initialises each API route we offer.
     13         * Initializes REST API customizations.
    1214         */
    13         static function load_routes() {
     15        public static function init() {
     16                self::load_routes();
     17                self::load_fields();
     18        }
     19
     20        /**
     21         * Loads all API route we offer.
     22         */
     23        public static function load_routes() {
    1424                new Routes\Internal_Stats();
    1525                new Routes\Plugin();
    … …  
    2232                new Routes\Plugin_Committers();
    2333                new Routes\Plugin_Support_Reps();
     34        }
     35
     36        /**
     37         * Loads all API field for existing WordPress object types we offer.
     38         */
     39        public static function load_fields() {
     40                new Fields\Plugin\Banners();
     41                new Fields\Plugin\Icons();
     42                new Fields\Plugin\Rating();
     43                new Fields\Plugin\Ratings();
     44                new Fields\Plugin\Screenshots();
    2445        }
    2546
    … …  
    5879                return true;
    5980        }
    60 
    6181}
    62 
    63 
Note: See TracChangeset for help on using the changeset viewer.