Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit e5644ca

Browse files
author
Philip Newcomer
committed
Add get_svg_url function
1 parent 731dcfd commit e5644ca

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

package.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
define( 'ICONS_VERSION', '1.0.0' );
66
define( 'ICONS_PATH', dirname( __FILE__ ) . '/' );
77
define( 'ICONS_TEMPLATES', ICONS_PATH . 'templates/' );
8+
define( 'ICONS_URL', plugin_dir_url( __FILE__ ) );
89

910
require_once __DIR__ . '/src/main.php';

src/main.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@ function get_svg_path( $svg, $pack = 'feather' ) {
99
$svg
1010
);
1111
}
12+
13+
function get_svg_url( $svg, $pack = 'feather' ) {
14+
15+
return sprintf( ICONS_URL . 'assets/img/svg/%s/%s.svg',
16+
$pack,
17+
$svg
18+
);
19+
}

0 commit comments

Comments
 (0)