mirror of
https://github.com/afragen/wp-dismiss-notice.git
synced 2025-11-23 10:57:59 +08:00
Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e2c694ca8 |
2 changed files with 9 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "afragen/wp-dismiss-notice",
|
||||
"description": "Library for time dismissible WordPress admin notices.",
|
||||
"version": "0.3.6",
|
||||
"version": "0.3.7",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@ class WP_Dismiss_Notice {
|
|||
*/
|
||||
$vendor_dir = apply_filters( 'dismiss_notice_vendor_dir', '/vendor' );
|
||||
$composer_js_path = untrailingslashit( $vendor_dir ) . '/afragen/wp-dismiss-notice/js/dismiss-notice.js';
|
||||
|
||||
$theme_js_url = get_theme_file_uri( $composer_js_path );
|
||||
$theme_js_file = parse_url( $theme_js_url, PHP_URL_PATH );
|
||||
|
||||
if ( file_exists( ABSPATH . $theme_js_file ) ) {
|
||||
$js_url = $theme_js_url;
|
||||
}
|
||||
|
||||
if ( '/vendor' !== $vendor_dir ) {
|
||||
$js_url = home_url( $composer_js_path );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue