oik version 1.10 includes quite a few new shortcodes, some changes and some fixes.
New shortcodes are:
- [bw_attachments] for listing attachments
- [bw_pdf] for listing .pdf type attachments
- [bw_tree] for producing a hierarchical tree of children of a ‘page’
- [bw_copyright] for creating a Copyright statement to use in footers
- [stag] and [etag] shortcodes to use when using the HTML doesn’t seem to work
- [bwtrace] button for easier access to trace reset
In this version of oik we’ve introduced support for lazy shortcodes – where the shortcode function is not loaded until it’s needed. Added an oik_boot.inc file to provide some ‘early use’ APIs, made some API changes, added a bit of CSS for some of the more common styling needs and fixed a couple of bugs.
The main ‘fix’ was to enable documentation of shortcodes without having to leave a space between the left square bracket and the shortcode. The comments and documentation suggested that this could be done by wrapping the shortcode in two square brackets e.g.
[[wrapme]] would expand to [wrapme].
This wasn’t working in earlier version of oik. After much investigation, which led to a couple of minor improvements to the tracing code, I tracked the problem down to just one line of code in oik.php
I had
add_filter('the_content', 'do_shortcode' );
but in WordPress the filter was being added, in wp_includes/shortcode.php, with a priority of 11.
add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
This bug has existed since the first version. Ouch, fob and bong!!









Recent Comments