WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
wpdk-shortcode.php
Go to the documentation of this file.
1 <?php
20 
28  public function __construct()
29  {
30  $this->registerShortcodes();
31  }
32 
38  public function registerShortcodes()
39  {
40  $shortcodes = $this->shortcodes();
41  foreach ( $shortcodes as $shortcode => $to_register ) {
42  if ( $to_register ) {
43  add_shortcode( $shortcode, array( $this, $shortcode ) );
44  }
45  }
46  }
47 
55  protected function shortcodes()
56  {
57  /* To override. */
58  return array();
59  }
60 
61 } // class WPDKShortcode