Title: Altering WP Files
Last modified: August 19, 2016

---

# Altering WP Files

 *  [themelady](https://wordpress.org/support/users/themelady/)
 * (@themelady)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/altering-wp-files/)
 * I’m just getting back into website design and management after having not done
   it due to some private life circumstances. I’m refreshing my mind on HTML, CSS
   and WordPress. The version of WordPress I’m using is several ahead of the last
   time I was using it, a couple of years ago or so.
 * I used to alter files a bit to suit my preferences, and I will do so this time
   unless there are simpler answers, which is what I’m posting this post for.
 * For example, most people when posting images, want the height and width posted
   in their code, but WP’s bit of code doesn’t include this (see below):
 * From quicktags.dev.js:
 *     ```
       function edInsertImage(myField) {
       	var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
       	if (myValue) {
       		myValue = '<img src="'
       				+ myValue
       				+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
       				+ '" />';
       		edInsertContent(myField, myValue);
       	}
       }
       ```
   
 * To add the extra fields, I would add this line to the code in previous versions:
 * + ‘” width=”” height=””‘
 * I’d also do this for the **title** attribute.
 * I looked at the source code for a few sites run by WP, and those ones had the
   _width_ and _height_ attributes in the code. Did people alter the files to include
   width and height when prompted for image information, or is it automatically 
   added? I don’t want to alter code needlessly.
 * I don’t know code very well, so I can’t look and the code and understand if it
   adds these (and other) attributes and additions I’d want to include.
 * In short, my question is, Do I need to edit the WP files to get the width and
   height attributes included (along with other edits I might want), or does it 
   add them automatically?
 * And, I notice quicktags.js and quicktags.dev.js are now part of the files…they
   look the same, but I only skimmed them. Also, quicktags.js doesn’t have the code
   line-by-line; the code is all laid out one Line 1, while quicktags.dev.js looks
   fine, so I can find things as I look through it. Is the difference on purpose?
 * Sorry for such a long post, but thank you to those who will help.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/altering-wp-files/#post-1263237)
 * It is a very bad idea to edit the core files. You would lose your customisations
   when WP is updated. You will need to keep it up to date to keep it secure.
 * The image size should be set automatically when the images are added.
 *  Thread Starter [themelady](https://wordpress.org/support/users/themelady/)
 * (@themelady)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/altering-wp-files/#post-1263239)
 * Thanks. I understand the problem with editing core files, and I did have to remember
   to edit the new files when WP updated, but I also want consistency in my site(
   for instance, I prefer “email” to “e-mail”); however, I’m tired of doing that,
   so I will probably leave it as is. Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Altering WP Files’ is closed to new replies.

## Tags

 * [attribute](https://wordpress.org/support/topic-tag/attribute/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [edit](https://wordpress.org/support/topic-tag/edit/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [themelady](https://wordpress.org/support/users/themelady/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/altering-wp-files/#post-1263239)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
