includes/api/class-wc-rest-customers-controller.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 592-603 (lines=12) @@
                                 | 
                            
                                                            
                                    | 589 | 
                                     | 
                                    	 * @param WP_User $customer Customer object.  | 
                                
                                                            
                                    | 590 | 
                                     | 
                                    	 * @return array Links for the given customer.  | 
                                
                                                            
                                    | 591 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 592 | 
                                     | 
                                    	protected function prepare_links( $customer ) { | 
                                
                                                            
                                    | 593 | 
                                     | 
                                    		$links = array(  | 
                                
                                                            
                                    | 594 | 
                                     | 
                                    			'self' => array(  | 
                                
                                                            
                                    | 595 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $customer->ID ) ),  | 
                                
                                                            
                                    | 596 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 597 | 
                                     | 
                                    			'collection' => array(  | 
                                
                                                            
                                    | 598 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ),  | 
                                
                                                            
                                    | 599 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 600 | 
                                     | 
                                    		);  | 
                                
                                                            
                                    | 601 | 
                                     | 
                                     | 
                                
                                                            
                                    | 602 | 
                                     | 
                                    		return $links;  | 
                                
                                                            
                                    | 603 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 604 | 
                                     | 
                                     | 
                                
                                                            
                                    | 605 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 606 | 
                                     | 
                                    	 * Get the Customer's schema, conforming to JSON Schema.  | 
                                
                                                                        
                 
                                                            
                    
includes/api/class-wc-rest-taxes-controller.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 543-554 (lines=12) @@
                                 | 
                            
                                                            
                                    | 540 | 
                                     | 
                                    	 * @param stdClass $tax Tax object.  | 
                                
                                                            
                                    | 541 | 
                                     | 
                                    	 * @return array Links for the given tax.  | 
                                
                                                            
                                    | 542 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 543 | 
                                     | 
                                    	protected function prepare_links( $tax ) { | 
                                
                                                            
                                    | 544 | 
                                     | 
                                    		$links = array(  | 
                                
                                                            
                                    | 545 | 
                                     | 
                                    			'self' => array(  | 
                                
                                                            
                                    | 546 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $tax->tax_rate_id ) ),  | 
                                
                                                            
                                    | 547 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 548 | 
                                     | 
                                    			'collection' => array(  | 
                                
                                                            
                                    | 549 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ),  | 
                                
                                                            
                                    | 550 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 551 | 
                                     | 
                                    		);  | 
                                
                                                            
                                    | 552 | 
                                     | 
                                     | 
                                
                                                            
                                    | 553 | 
                                     | 
                                    		return $links;  | 
                                
                                                            
                                    | 554 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 555 | 
                                     | 
                                     | 
                                
                                                            
                                    | 556 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 557 | 
                                     | 
                                    	 * Get the Taxes schema, conforming to JSON Schema.  | 
                                
                                                                        
                 
                                                            
                    
includes/abstracts/abstract-wc-rest-posts-controller.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 481-492 (lines=12) @@
                                 | 
                            
                                                            
                                    | 478 | 
                                     | 
                                    	 * @param WP_Post $post Post object.  | 
                                
                                                            
                                    | 479 | 
                                     | 
                                    	 * @return array Links for the given post.  | 
                                
                                                            
                                    | 480 | 
                                     | 
                                    	 */  | 
                                
                                                            
                                    | 481 | 
                                     | 
                                    	protected function prepare_links( $post ) { | 
                                
                                                            
                                    | 482 | 
                                     | 
                                    		$links = array(  | 
                                
                                                            
                                    | 483 | 
                                     | 
                                    			'self' => array(  | 
                                
                                                            
                                    | 484 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s/%d', $this->namespace, $this->rest_base, $post->ID ) ),  | 
                                
                                                            
                                    | 485 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 486 | 
                                     | 
                                    			'collection' => array(  | 
                                
                                                            
                                    | 487 | 
                                     | 
                                    				'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ),  | 
                                
                                                            
                                    | 488 | 
                                     | 
                                    			),  | 
                                
                                                            
                                    | 489 | 
                                     | 
                                    		);  | 
                                
                                                            
                                    | 490 | 
                                     | 
                                     | 
                                
                                                            
                                    | 491 | 
                                     | 
                                    		return $links;  | 
                                
                                                            
                                    | 492 | 
                                     | 
                                    	}  | 
                                
                                                            
                                    | 493 | 
                                     | 
                                     | 
                                
                                                            
                                    | 494 | 
                                     | 
                                    	/**  | 
                                
                                                            
                                    | 495 | 
                                     | 
                                    	 * Determine the allowed query_vars for a get_items() response and  |