Last active
December 12, 2023 18:34
-
-
Save kjohnson/a05959c2ebc4123ebbb82f7917b61e70 to your computer and use it in GitHub Desktop.
GiveWP Donor Dashboard Custom Tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
class CustomTab extends \Give\DonorDashboards\Tabs\Contracts\Tab | |
{ | |
public static function id() { | |
return 'custom-tab'; | |
} | |
public function routes() { | |
return [ | |
MyCustomTabRoute::class, // Must extend \Give\DonorDashboards\Tabs\Contracts\Route | |
]; | |
} | |
public function enqueueAssets() | |
{ | |
// Enqueue assets here | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('init', function() { | |
(new \App\CustomTab)->registerTab(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment