Baseline Changes
Contents:
Scriblio mostly runs as a set of plugins, but you’ll want to make a few changes to the WordPress core to really use it. Well, so it looks right anyway.
wpautop
When WordPress displays text in posts, it does a lot to make the text you enter as a post look good in a browser. The downside to this is that some of the things it does can interfere with the markup in a catalog entry. The good news is that the fix is easy, and it doesn’t make regular posts look bad. The problem is that it’s inserting lines after block-level elements, specifically h tags.
Open up wp-includes/formatting.php
and look for the wpautop
function.
Find this line:
$allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])’;
We’re removing some of the entries.
$allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|
ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])’;
And it should look something like this when we’re done:
$allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|pre|select|form|blockquote|address|math|style|script|object|input|param|p)';
Leave a Reply
Comments should show a courteous regard for the presence of other voices in the discussion. We reserve the right to edit or delete comments that do not adhere to this standard.