Last active
February 7, 2022 07:33
-
-
Save khoipro/b7db1cc2b8d7c2beb7e793b64f4eeab3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| /** | |
| * Register assets | |
| * | |
| * @package Example_Plugin | |
| * @author codetot | |
| * @since 0.0.1 | |
| */ | |
| class Example_Assets { | |
| /** | |
| * Singleton instance | |
| * | |
| * @var Example_Assets | |
| */ | |
| private static $instance; | |
| /** | |
| * Get singleton instance. | |
| * | |
| * @return Example_Assets | |
| */ | |
| public final static function instance() | |
| { | |
| if (is_null(self::$instance)) { | |
| self::$instance = new self(); | |
| } | |
| return self::$instance; | |
| } | |
| public function __construct() { | |
| add_action( 'wp_enqueue_scripts', array( $this, 'frontend_assets' ) ); | |
| } | |
| /** | |
| * Enqueue frontend assets | |
| * | |
| * @return void | |
| */ | |
| public function frontend_assets() {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment