Astra_Notices::get_url()
Get base URL for the astra-notices.
Description
Return
(mixed) URL.
Source
File: inc/lib/astra-notices/class-astra-notices.php
public static function get_url() {
$path = wp_normalize_path( dirname( __FILE__ ) );
$theme_dir = wp_normalize_path( get_template_directory() );
if ( strpos( $path, $theme_dir ) !== false ) {
return trailingslashit( get_template_directory_uri() . str_replace( $theme_dir, '', $path ) );
} else {
return plugin_dir_url( __FILE__ );
}
}
Expand full source code Collapse full source code View on Trac