wp/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
   111 	public function get_items( $request ) {
   111 	public function get_items( $request ) {
   112 		$data              = array();
   112 		$data              = array();
   113 		$statuses          = get_post_stati( array( 'internal' => false ), 'object' );
   113 		$statuses          = get_post_stati( array( 'internal' => false ), 'object' );
   114 		$statuses['trash'] = get_post_status_object( 'trash' );
   114 		$statuses['trash'] = get_post_status_object( 'trash' );
   115 
   115 
   116 		foreach ( $statuses as $slug => $obj ) {
   116 		foreach ( $statuses as $obj ) {
   117 			$ret = $this->check_read_permission( $obj );
   117 			$ret = $this->check_read_permission( $obj );
   118 
   118 
   119 			if ( ! $ret ) {
   119 			if ( ! $ret ) {
   120 				continue;
   120 				continue;
   121 			}
   121 			}