Compare commits

..

No commits in common. "main" and "0.3.6" have entirely different histories.
main ... 0.3.6

2 changed files with 1 additions and 9 deletions

View file

@ -1,7 +1,7 @@
{ {
"name": "afragen/wp-dismiss-notice", "name": "afragen/wp-dismiss-notice",
"description": "Library for time dismissible WordPress admin notices.", "description": "Library for time dismissible WordPress admin notices.",
"version": "0.3.7", "version": "0.3.6",
"type": "library", "type": "library",
"license": "MIT", "license": "MIT",
"authors": [ "authors": [

View file

@ -39,14 +39,6 @@ class WP_Dismiss_Notice {
*/ */
$vendor_dir = apply_filters( 'dismiss_notice_vendor_dir', '/vendor' ); $vendor_dir = apply_filters( 'dismiss_notice_vendor_dir', '/vendor' );
$composer_js_path = untrailingslashit( $vendor_dir ) . '/afragen/wp-dismiss-notice/js/dismiss-notice.js'; $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 ) { if ( '/vendor' !== $vendor_dir ) {
$js_url = home_url( $composer_js_path ); $js_url = home_url( $composer_js_path );
} }