Here, add this to your theme’s functions.php file.
class my_custom_fileaway_class
{
public function __construct()
{
add_shortcode('fa_manager_toggle', array($this, 'toggle'));
}
public function toggle()
{
if(!class_exists('fileaway')) return false;
if(isset($_REQUEST['fa_manager']))
{
$link = fileaway_utility::querystring(get_permalink(), $_SERVER["QUERY_STRING"], array('fa_manager'), true);
$output = '<a class="your-css-class" href="'.$link.'" target="_self">Disable Manager Mode</a><br>';
$output .= do_shortcode('[fileaway directories=true manager=true]');
}
else
{
$link = fileaway_utility::querystring(get_permalink(), $_SERVER["QUERY_STRING"], array('fa_manager' => '1'));
$output = '<a class="your-css-class" href="'.$link.'" target="_self">Enable Manager Mode</a><br>';
$output .= do_shortcode('[fileaway directories=true playback=extended]');
}
return $output;
}
}
new my_custom_fileaway_class;
You’ll want to modify the shortcodes, and you can specify the css class for the link.
Then on your page, just use this shortcode:
[fa_manager_toggle]