Hello, Snowme.
I do not know what you tell me and I do not know how to help.
Is Nobita no longer carrying the support?
Thank you very much.
Hello.
Sorry, I made a mistake in answering here.
Thanks.
Hi @snowme
Unfortunately, the raindrops theme doesn’t consider wp-cli.
One salvation is that this theme is defined as a pluggable function for most functions.
In other words, if a function with the same name exists in functions.php of the child theme, that function will be used.
https://github.com/tenman/raindrops/blob/master/functions.php#L7644-L7661
You can also rewrite the function in which this error occurs as follows.
function raindrops_doctype_elements( $xhtml, $html5, $echo = true ) {
$doc_type = raindrops_warehouse_clone( 'raindrops_doc_type_settings' );
if ( true == $echo ) {
if ( 'html5' == $doc_type ) {
echo $html5;
} else {
echo $xhtml;
}
} else {
if ( 'html5' == $doc_type ) {
return $html5;
} else {
return $xhtml;
}
}
}
I can’t help you enough, but if you need it, give it a try.
Thank you.
Thread Starter
snowme
(@snowme)
I appreciate you offering support. Adding the function fixed the PHP error, but using WP CLI still resets the theme customization settings. I understand this is not supported so I’ll continue to look into the issue.
The theme reset is done with the following function.
https://github.com/tenman/raindrops/blob/master/functions.php#L406-L440
raindrops_warehouse_clone( 'raindrops_reset_options' )
This is generally the same as:
get_option( 'raindrops_theme_settings' )['raindrops_reset_options']
Thank you.