• I wanted to add the [code] tag to the bbcode function.
    Here's what I changed:
    wp_bbcode['in']:
    '#\[code](.+?)]\[/code]#is', // Code tag
    wp_bbcode['out']:
    '<div class=\"code\">$1</div>', // Code
    Any ideas?
    Edit: Oh, right... yeah it doesn't work. 🙁 I added this in /wp-includes/var.php above the two commented out e-mail tags (by default...)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter alienvenom

    (@alienvenom)

    Any ideas? Anyone?

    <div class=\”code\”>$1</div>
    This part might be wrong.
    You don’t have to put in the \ around the quotes for the array string, since it starts with a single quote.

    Okay.
    Let’s talk wacko. I got it to work.
    Do this.
    Copy the line for the bold [b] tags in the “in” array.
    Paste it into a new line after the bold code.
    Then change the “b” to “code”.
    Make sure you move the “out” array line up to the line after the bolde code line.
    I guess it has to do with a tab or spacing or someting odd.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding own BBCode’ is closed to new replies.