Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom code snippet to change code editor height and background color for the Code Snippets extension.
// Add the following code snippet to the functions.php file of the MainWP Customisations plugin
// Download MainWP Customisations here:
// More about the plugin:
add_filter( 'mainwp_codesnippets_editor_attr', 'myhook_mainwp_codesnippets_editor_attr', 10);
function myhook_mainwp_codesnippets_editor_attr( $data ) {
$data['height'] = 500;
// supported themes: 'erlang-dark', 'night', 'xq-dark', 'xq-light', 'the-matrix', 'eclipse'
$data['theme'] = 'eclipse';
return $data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.