Skip to content

Commit

Permalink
fix: disable REST API image replacement when the user is logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed Jul 4, 2019
1 parent 51e180e commit f577723
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ function ( $url ) {
*/
public function replace_content( $html ) {

if ( defined( 'REST_REQUEST' ) && REST_REQUEST && is_user_logged_in() ) {
return $html;
}

$html = $this->process_images_from_content( $html );

$html = $this->process_urls_from_content( $html );
Expand Down

0 comments on commit f577723

Please sign in to comment.