Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow shared avatars only for multisite #222

Merged
merged 1 commit into from Aug 3, 2023

Conversation

ocean90
Copy link
Contributor

@ocean90 ocean90 commented Jul 18, 2023

Description of the Change

Fixes #221.

Changes is_avatar_shared() to always return false if not used in a multisite. Brings it in line with

if ( is_multisite() ) {
add_settings_field(
'simple-local-avatars-shared',
__( 'Shared network avatars', 'simple-local-avatars' ),
array( $this, 'avatar_settings_field' ),
'discussion',
'avatars',
array(
'class' => 'simple-local-avatars',
'key' => 'shared',
'desc' => __( 'Uploaded avatars will be shared across the entire network, instead of being unique per site', 'simple-local-avatars' ),
'default' => 1,
)
);
}

How to test the Change

See #221

Changelog Entry

Fixed - Prevent PHP fatal error when switching from a multisite to single site installation.

Credits

Props @ocean90

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@faisal-alvi faisal-alvi merged commit b79ad67 into 10up:develop Aug 3, 2023
10 checks passed
@jeffpaul jeffpaul added this to the 2.7.6 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fatal error due to missing switch_to_blog() function when switching from multisite to single site
4 participants