Changeset 6287 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-base.php
- Timestamp:
- 12/19/2017 04:22:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/class-base.php
r5867 r6287 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\API; 3 3 4 use WordPressdotorg\Plugin_Directory\Plugin_Directory; 5 use WordPressdotorg\Plugin_Directory\Plugin_I18n; 6 use WordPressdotorg\Plugin_Directory\Template; 4 7 5 8 /** 6 9 * @package WordPressdotorg_Plugin_Directory 7 10 */ 8 9 11 class Base { 10 12 /** 11 * Initiali ses each API route we offer.13 * Initializes REST API customizations. 12 14 */ 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() { 14 24 new Routes\Internal_Stats(); 15 25 new Routes\Plugin(); … … 22 32 new Routes\Plugin_Committers(); 23 33 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(); 24 45 } 25 46 … … 58 79 return true; 59 80 } 60 61 81 } 62 63
Note: See TracChangeset
for help on using the changeset viewer.