\1', '
  • \1
  • ', '\1', '\1', '
    \1
    ', '\1', '\1', '\2', '\1', '\2', '\1', '', '\1', '\1', '\1', '\2', 'Image', '\2', '\2', '

    \1

    ', '

    \1

    ', '

    \1

    ', '

    \1

    ', '', '', '
    \1
    ' ); function bbc2html($subject) { wp_enqueue_script('mingle-forum', plugins_url('js/script.js', __FILE__), array('jquery')); $codes = array(array(), array()); preg_match_all('/\[code\](.+)\[\/code\]/Uis', $subject, $codes); foreach ($codes[0] as $num => $code) { $subject = str_replace($code, "[code$num]", $subject); } $subject = preg_replace($this->patterns, $this->replacements, $subject); foreach ($codes[1] as $num => $code) { $subject = str_replace("[code$num]", '
    '.$code.'
    ', $subject); } return $subject; } function get_editor($text='') { global $mingleforum; function mingle_get_editor_mce_external_plugins($plugins) { $plugins['bbcodev2'] = plugins_url('/js/plugins/bbcodev2/editor_plugin_src.js', __FILE__); $plugins['emotions'] = plugins_url('/js/plugins/emotions/editor_plugin_src.js', __FILE__); return $plugins; } add_filter('mce_external_plugins', 'mingle_get_editor_mce_external_plugins'); ob_start(); wp_editor($text, 'message', array( 'wpautop' => false, 'tinymce' => array( 'plugins' => 'bbcodev2,emotions', 'theme_advanced_buttons1' => 'bold,italic,underline,strikethrough,pre,blockquote,spoil,justifyleft,justifycenter,justifyright,justifyfull,bullist,link,unlink,image,forecolor,yt,map,emotions', 'theme_advanced_buttons2' => '', 'apply_source_formatting' => false, 'setup' => 'function (ed) { ed.addButton("pre", { title: "'.__("Code").'", image: "'.$mingleforum->skin_url.'/images/bbc/code.png" }) ed.addButton("yt", { title: "'.__("Embed YouTube Video").'", image: "'.$mingleforum->skin_url.'/images/bbc/yt.png" }) ed.addButton("map", { title: "'.__("Embed Google Map").'", image: "'.$mingleforum->skin_url.'/images/bbc/gm.png" }) ed.addButton("spoil", { title: "'.__("Spoiler").'", image: "'.$mingleforum->skin_url.'/images/bbc/spoil.png" }) }' ) )); return ob_get_clean(); } } }