_sync_custom_logo_to_site_logo()
Updates the site_logo option when the custom_logo theme-mod gets updated.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
Mixed.
Usage
_sync_custom_logo_to_site_logo( $value );
- $value(mixed) (required)
- Attachment ID of the custom logo or an empty value.
Changelog
| Since 5.8.0 | Introduced. |
_sync_custom_logo_to_site_logo() sync custom logo to site logo code WP 7.0
function _sync_custom_logo_to_site_logo( $value ) {
if ( empty( $value ) ) {
delete_option( 'site_logo' );
} else {
update_option( 'site_logo', $value );
}
return $value;
}