0

I would like to change the bottom text, "Provide an explanation of the changes you are making. This will help other authors understand your motivations.", in the revision log message section. See attached screenshot.

enter image description here

How should I go about changing the text?

6

Use the following code in a custom module or in your theme's template.php:

/**
 * Implements hook_form_FORM_ID_alter().
 */
function YOURMODULE_form_CONTENTTYPE_node_form_alter(&$form, &$form_state, $form_id) {
  $form['revision_information']['log']['#description'] = t('Your new instructions.');
}

Note: replace YOURMODULE with your module/theme name and CONTENTTYPE with machine name of the content type you want to change.

| improve this answer | |
  • Thank you! I think I will write my own module as to only affect the particular content types. – user785179 Oct 18 '12 at 17:27
  • You are welcome. – Aram Boyajyan Oct 18 '12 at 20:58
2

Another alternative is to use the String Overrides module:

http://drupal.org/project/stringoverrides

One of the major advantage is that you don't have to code anything and you will access to change the wording at any time thru the admin interface.

| improve this answer | |
  • Very cool! Unfortunately I need it to override certain content types, and not the entire website. – user785179 Oct 18 '12 at 17:29
0

Instead of node_form_alter we can alter the revision text by using form_alter also.

Ex:

function your_custom_module_form_alter(&$form, $form_state, $form_id) {  
    if($form_id == "custom_node_form") {
       $form['revision_information']['log']['#description'] = t('Your new instructions.');
    }   
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.