/** * The main output function for our plugin. * * @param array $atts An array of shortcode attributes. * @return string A WordPress custom menu, via our custom walker. */ function csst_nav($atts = array()) { // Invoke our menu class, passing our atts to it. $csst_nav = new CSST_Nav($atts); // Get the custom menu. $out = $csst_nav->get(); // Shortcodes must return, not echo. return $out; }
/** * The main output function for our plugin. * * @param array $atts An array of shortcode attributes. * @return string A WordPress custom menu, via our custom walker. */ function csst_nav_cb($atts = array()) { $csst_nav = new CSST_Nav($atts); $out = $csst_nav->get(); echo $out; }