Skip to content

Commit

Permalink
Merge pull request #222 from wearerequired/fix/shared-only-multisite
Browse files Browse the repository at this point in the history
Allow shared avatars only for multisite
  • Loading branch information
faisal-alvi authored Aug 3, 2023
2 parents 0668280 + 0d8e579 commit b79ad67
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions includes/class-simple-local-avatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ public function is_enforced() {
* @return boolean
*/
public function is_avatar_shared() {
if ( ! is_multisite() ) {
return false;
}

if (
is_multisite() // Are we on multisite.
&& ! isset( $this->options['shared'] ) // And our shared option doesn't exist.
|| (
isset( $this->options['shared'] ) // Or our shared option is set.
&& 1 === $this->options['shared']
)
! isset( $this->options['shared'] ) // Our shared option doesn't exist.
|| 1 === $this->options['shared'] // Or our shared option is set.
) {
return true;
}
Expand Down

0 comments on commit b79ad67

Please sign in to comment.