Code-Snippets-Functions/Execute a function on a child site/Classic Editor/classic-editor-replace-gutenberg-with-classic-editor.txt

17 lines
436 B
Text

<?php
$option_name = 'classic-editor-replace' ;
$new_value = 'replace' ;
if ( get_option( $option_name ) !== false ) {
// The option already exists, so we just update it.
update_option( $option_name, $new_value );
} else {
// The option hasn't been added yet. We'll add it with $autoload set to 'no'.
$deprecated = null;
$autoload = 'no';
add_option( $option_name, $new_value, $deprecated, $autoload );
}
?>