BSF_Admin_Notices::get_url()

Get base URL for the library assets.


Description


Return

(mixed) URL.


Source

File: inc/lib/astra-notices/class-bsf-admin-notices.php

		public static function get_url() {
			$path      = wp_normalize_path( dirname( __FILE__ ) ); // phpcs:ignore Modernize.FunctionCalls.Dirname.FileConstant
			$theme_dir = wp_normalize_path( get_template_directory() );

			if ( false !== strpos( $path, $theme_dir ) ) {
				return trailingslashit( get_template_directory_uri() . str_replace( $theme_dir, '', $path ) );
			} else {
				return plugin_dir_url( __FILE__ );
			}
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.