Skip to content

Commit

Permalink
Add get_svg_url function
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Newcomer committed Jan 16, 2019
1 parent 731dcfd commit e5644ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
define( 'ICONS_VERSION', '1.0.0' );
define( 'ICONS_PATH', dirname( __FILE__ ) . '/' );
define( 'ICONS_TEMPLATES', ICONS_PATH . 'templates/' );
define( 'ICONS_URL', plugin_dir_url( __FILE__ ) );

This comment has been minimized.

Copy link
@AaronHolbrook

AaronHolbrook Jan 30, 2019

Member

This is a wp specific function, and we are trying to keep this package vanilla so we can use it in on laravel as well @philipnewcomer


require_once __DIR__ . '/src/main.php';
8 changes: 8 additions & 0 deletions src/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ function get_svg_path( $svg, $pack = 'feather' ) {
$svg
);
}

function get_svg_url( $svg, $pack = 'feather' ) {

return sprintf( ICONS_URL . 'assets/img/svg/%s/%s.svg',
$pack,
$svg
);
}

0 comments on commit e5644ca

Please sign in to comment.