Skip to content

Instantly share code, notes, and snippets.

@codearachnid
Created February 2, 2019 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codearachnid/85592bf882653651ac6a55e5ccf98b8e to your computer and use it in GitHub Desktop.
Save codearachnid/85592bf882653651ac6a55e5ccf98b8e to your computer and use it in GitHub Desktop.
If you have Sabai and you want to customize the dashboard to be part of another page (like inside of woocommerce my account) use this shortcode
<?php
add_shortcode('sabai-directory-dashboard', 'sabai_directory_dashboard_get_shortcode');
function sabai_directory_dashboard_get_shortcode($atts, $content, $tag){
$platform = get_sabai_platform();
$path = $platform->getSabai()->getAddon('Directory')->getSlug('dashboard');
return $platform->shortcode($path, (array)$atts, $content);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment