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, 'https://'); 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.
- The topic ‘Altering WP Files’ is closed to new replies.