Skip to content

ThemePlate/HTMX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThemePlate HTMX

Usage

$htmx = new ThemePlate\HTMX(/* identifier */);

add_action( 'init', array( $htmx, 'setup' ) );
add_action( 'wp_enqueue_scripts', array( $htmx->cdn(/* version */), 'assets' ) );

Identifier is used as:

  • the route namespace
  • swap templates location

*Defaults to htmx

Local script copy

add_action( 'wp_enqueue_scripts', function() use ( $htmx ) {
	wp_enqueue_script( 'htmx', '/path/to/htmx.min.js' );
	$htmx->assets();
} );

About

Effortless HTMX implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages