sal/class.json-api-site-base.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 341-343 (lines=3) @@
                                 | 
                            
                                                            
                                    | 338 | 
                                     | 
                                    			return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) );  | 
                                
                                                            
                                    | 339 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 340 | 
                                     | 
                                     | 
                                
                                                            
                                    | 341 | 
                                     | 
                                    		if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { | 
                                
                                                            
                                    | 342 | 
                                     | 
                                    			return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) );  | 
                                
                                                            
                                    | 343 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 344 | 
                                     | 
                                     | 
                                
                                                            
                                    | 345 | 
                                     | 
                                    		return true;  | 
                                
                                                            
                                    | 346 | 
                                     | 
                                    	}  | 
                                
                                                                        
                 
                                                            
                    
class.json-api-endpoints.php 1 location
                
                
                    
                                                
                                                    
                                 | 
                                
                                    @@ 1138-1140 (lines=3) @@
                                 | 
                            
                                                            
                                    | 1135 | 
                                     | 
                                    			);  | 
                                
                                                            
                                    | 1136 | 
                                     | 
                                    		}  | 
                                
                                                            
                                    | 1137 | 
                                     | 
                                     | 
                                
                                                            
                                    | 1138 | 
                                     | 
                                    		if ( strlen( $post->post_password ) && ! current_user_can( 'edit_post', $post->ID ) ) { | 
                                
                                                            
                                    | 1139 | 
                                     | 
                                    			return new WP_Error(  | 
                                
                                                            
                                    | 1140 | 
                                     | 
                                    				'unauthorized',  | 
                                
                                                            
                                    | 1141 | 
                                     | 
                                    				'User cannot view password protected post',  | 
                                
                                                            
                                    | 1142 | 
                                     | 
                                    				array(  | 
                                
                                                            
                                    | 1143 | 
                                     | 
                                    					'status_code' => 403,  |