Changeset 48242
- Timestamp:
- 07/01/2020 04:22:25 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r48156 r48242 362 362 wp_tinymce_inline_scripts(); 363 363 wp_enqueue_editor(); 364 wp_enqueue_script( 'wp-block-directory' ); 364 365 365 366 /** … … 368 369 wp_enqueue_style( 'wp-edit-post' ); 369 370 wp_enqueue_style( 'wp-format-library' ); 371 wp_enqueue_style( 'wp-block-directory' ); 370 372 371 373 /** -
trunk/src/wp-admin/includes/plugin-install.php
r48115 r48242 174 174 175 175 if ( $ssl && is_wp_error( $request ) ) { 176 trigger_error( 177 sprintf( 178 /* translators: %s: Support forums URL. */ 179 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 180 __( 'https://wordpress.org/support/forums/' ) 181 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 182 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 183 ); 176 if ( ! wp_is_json_request() ) { 177 trigger_error( 178 sprintf( 179 /* translators: %s: Support forums URL. */ 180 __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), 181 __( 'https://wordpress.org/support/forums/' ) 182 ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), 183 headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE 184 ); 185 } 186 184 187 $request = wp_remote_get( $http_url, $http_args ); 185 188 } -
trunk/src/wp-includes/rest-api.php
r48198 r48242 284 284 // Themes. 285 285 $controller = new WP_REST_Themes_Controller; 286 $controller->register_routes(); 287 288 // Plugins. 289 $controller = new WP_REST_Plugins_Controller(); 290 $controller->register_routes(); 291 292 // Block Directory. 293 $controller = new WP_REST_Block_Directory_Controller(); 286 294 $controller->register_routes(); 287 295 -
trunk/src/wp-settings.php
r48173 r48242 258 258 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php'; 259 259 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php'; 260 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php'; 261 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php'; 260 262 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php'; 261 263 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php'; -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r48173 r48242 127 127 '/wp/v2/settings', 128 128 '/wp/v2/themes', 129 '/wp/v2/plugins', 130 '/wp/v2/plugins/(?P<plugin>[^.\/]+(?:\/[^.\/]+)?)', 131 '/wp/v2/block-directory/search', 129 132 ); 130 133 -
trunk/tests/qunit/fixtures/wp-api-generated.js
r48173 r48242 4703 4703 "_links": { 4704 4704 "self": "http://example.org/index.php?rest_route=/wp/v2/themes" 4705 } 4706 }, 4707 "/wp/v2/plugins": { 4708 "namespace": "wp/v2", 4709 "methods": [ 4710 "GET", 4711 "POST" 4712 ], 4713 "endpoints": [ 4714 { 4715 "methods": [ 4716 "GET" 4717 ], 4718 "args": { 4719 "context": { 4720 "required": false, 4721 "default": "view", 4722 "enum": [ 4723 "view", 4724 "embed", 4725 "edit" 4726 ], 4727 "description": "Scope under which the request is made; determines fields present in response.", 4728 "type": "string" 4729 }, 4730 "search": { 4731 "required": false, 4732 "description": "Limit results to those matching a string.", 4733 "type": "string" 4734 }, 4735 "status": { 4736 "required": false, 4737 "description": "Limits results to plugins with the given status.", 4738 "type": "array", 4739 "items": { 4740 "type": "string", 4741 "enum": [ 4742 "inactive", 4743 "active" 4744 ] 4745 } 4746 } 4747 } 4748 }, 4749 { 4750 "methods": [ 4751 "POST" 4752 ], 4753 "args": { 4754 "slug": { 4755 "required": true, 4756 "description": "WordPress.org plugin directory slug.", 4757 "type": "string" 4758 }, 4759 "status": { 4760 "required": false, 4761 "default": "inactive", 4762 "enum": [ 4763 "inactive", 4764 "active" 4765 ], 4766 "description": "The plugin activation status.", 4767 "type": "string" 4768 } 4769 } 4770 } 4771 ], 4772 "_links": { 4773 "self": [ 4774 { 4775 "href": "http://example.org/index.php?rest_route=/wp/v2/plugins" 4776 } 4777 ] 4778 } 4779 }, 4780 "/wp/v2/plugins/(?P<plugin>[^.\\/]+(?:\\/[^.\\/]+)?)": { 4781 "namespace": "wp/v2", 4782 "methods": [ 4783 "GET", 4784 "POST", 4785 "PUT", 4786 "PATCH", 4787 "DELETE" 4788 ], 4789 "endpoints": [ 4790 { 4791 "methods": [ 4792 "GET" 4793 ], 4794 "args": { 4795 "context": { 4796 "required": false, 4797 "default": "view", 4798 "enum": [ 4799 "view", 4800 "embed", 4801 "edit" 4802 ], 4803 "description": "Scope under which the request is made; determines fields present in response.", 4804 "type": "string" 4805 }, 4806 "plugin": { 4807 "required": false, 4808 "type": "string" 4809 } 4810 } 4811 }, 4812 { 4813 "methods": [ 4814 "POST", 4815 "PUT", 4816 "PATCH" 4817 ], 4818 "args": { 4819 "context": { 4820 "required": false, 4821 "default": "view", 4822 "enum": [ 4823 "view", 4824 "embed", 4825 "edit" 4826 ], 4827 "description": "Scope under which the request is made; determines fields present in response.", 4828 "type": "string" 4829 }, 4830 "plugin": { 4831 "required": false, 4832 "type": "string" 4833 }, 4834 "status": { 4835 "required": false, 4836 "enum": [ 4837 "inactive", 4838 "active" 4839 ], 4840 "description": "The plugin activation status.", 4841 "type": "string" 4842 } 4843 } 4844 }, 4845 { 4846 "methods": [ 4847 "DELETE" 4848 ], 4849 "args": { 4850 "context": { 4851 "required": false, 4852 "default": "view", 4853 "enum": [ 4854 "view", 4855 "embed", 4856 "edit" 4857 ], 4858 "description": "Scope under which the request is made; determines fields present in response.", 4859 "type": "string" 4860 }, 4861 "plugin": { 4862 "required": false, 4863 "type": "string" 4864 } 4865 } 4866 } 4867 ] 4868 }, 4869 "/wp/v2/block-directory/search": { 4870 "namespace": "wp/v2", 4871 "methods": [ 4872 "GET" 4873 ], 4874 "endpoints": [ 4875 { 4876 "methods": [ 4877 "GET" 4878 ], 4879 "args": { 4880 "context": { 4881 "required": false, 4882 "default": "view", 4883 "enum": [ 4884 "view" 4885 ], 4886 "description": "Scope under which the request is made; determines fields present in response.", 4887 "type": "string" 4888 }, 4889 "page": { 4890 "required": false, 4891 "default": 1, 4892 "description": "Current page of the collection.", 4893 "type": "integer" 4894 }, 4895 "per_page": { 4896 "required": false, 4897 "default": 10, 4898 "description": "Maximum number of items to be returned in result set.", 4899 "type": "integer" 4900 }, 4901 "term": { 4902 "required": true, 4903 "description": "Limit result set to blocks matching the search term.", 4904 "type": "string" 4905 } 4906 } 4907 } 4908 ], 4909 "_links": { 4910 "self": [ 4911 { 4912 "href": "http://example.org/index.php?rest_route=/wp/v2/block-directory/search" 4913 } 4914 ] 4705 4915 } 4706 4916 }
Note: See TracChangeset
for help on using the changeset viewer.