-
-
Save dexit/d7b6af5b96645d8d6a8eb7d40b0f7f7a to your computer and use it in GitHub Desktop.
Customize WP Job Manager wp_editor arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'submit_job_form_wp_editor_args', 'smyles_submit_job_form_wp_editor_args' ); | |
function smyles_submit_job_form_wp_editor_args( $args ){ | |
// @see https://github.com/Automattic/WP-Job-Manager/blob/master/templates/form-fields/wp-editor-field.php#L2 | |
// change quicktags to true | |
$args['quicktags'] = true; | |
// change rows to 10 (default is 8) | |
$args['textarea_rows'] = 10; | |
// Add underline to TinyMCE toolbar @see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols | |
// https://www.tiny.cloud/docs/tinymce/6/basic-setup/#toolbar-configuration | |
$args['tinymce']['toolbar1'] = 'bold,italic,underline,|,bullist,numlist,|,link,unlink,|,undo,redo'; | |
return $args; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Show "advanced toolbar by default" | |
add_filter('tiny_mce_before_init', function($init_array) { | |
// Show the second toolbar by default | |
$init_array['wordpress_adv_hidden'] = false; | |
return $init_array; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment