Title: Shorcode API
Last modified: August 20, 2016

---

# Shorcode API

 *  [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/shorcode-api/)
 * Just curious if there is a reason not to use the WordPress Shortcode API for 
   this instead of adding your own filter and preg_replace?
 * Wouldn’t
    /* line break */ add_shortcode(‘br’, ‘jb_linebreak’); function jb_linebreak(){
   return ‘‘; }
 * do the same thing with a lot less code?
 * Also wondering why all the defines up front?
 * [http://wordpress.org/extend/plugins/line-break-shortcode/](http://wordpress.org/extend/plugins/line-break-shortcode/)

The topic ‘Shorcode API’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/line-break-shortcode.svg)
 * [Line Break Shortcode](https://wordpress.org/plugins/line-break-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/line-break-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/line-break-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/line-break-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/line-break-shortcode/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Jon Brown](https://wordpress.org/support/users/jb510/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/shorcode-api/)
 * Status: not resolved